The loyalty campaign object

Data model description

The loyalty campaign object contains details about the loyalty campaign. You can list loyalty campaigns, list loyalty card holders, member activities, active rewards, earning rules, loyalty tiers for given loyalty campaign.

Attributes

Description

Example

id
string

System generated campaign id.

camp_pqZjuhG6Mgtp4GD0zD7b8hA3

name
string

Campaign name.

Loyalty Program 2022

campaign_type
string

Default campaign type for loyalty campaign is LOYALTY_PROGRAM

LOYALTY_PROGRAM

type
string

Campaign's type.

Voucherify offers two types:

  • STATIC - after you define a predefined number of loyalty cards system will not generate new vouchers to this campaign.
  • AUTO-UPDATE - this mode creates a campaign that can be enhanced by new vouchers automatically when the initial batch of loyalty cards runs out.

STATIC or AUTO_UPDATE (default)

description
string

A field to keep any extra textual information.

start_date
`string, ISO 8601 date format`

When the campaign begins. Before this date loyalty cards are inactive.

2021-12-09T08:31:18.114Z

expiration_date
`string, ISO 8601 date format`

When the campaign ends. After this date loyalty cards are inactive.

2021-12-09T08:31:18.114Z

activity_duration_after_publishing

Loyalty cards can be active for a specific time frame after publishing.

validity_timeframe

You can set recurrent time periods when the loyalty cards are valid.

validity_day_of_week
array_int

Integer array corresponding to the particular days of the week that the loyalty campaign is valid.

Sunday - 0
Monday - 1
Tuesday - 2
Wednesday - 3
Thursday - 4
Friday - 5
Saturday - 6

[ 0, 1, 2 ]

metadata
object

Object with custom attributes assigned to the campaign as metadata.

created_at

Timestamp of loyalty campaign object creation.

2021-12-09T08:31:18.114Z

vouchers_count

The size of the list of vouchers generated for the loyalty campaign.

5

vouchers_generation_status

Shows if the loyalty cards are already created and ready to use.

DRAFT, DONE

active
boolean

A flag that allows to disable a campaign.

true or false

voucher

A description of the vouchers collected in the loyalty campaign. It contains the entire voucher definition which is used to generate unique codes during the campaign creation. The same parameters are used when you add new codes after the campaign creation date.

{
        "code_config": {
            "length": 8,
            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
            "pattern": "########"
        },
        "type": "LOYALTY_CARD",
        "is_referral_code": false,
        "loyalty_card": {
            "points": 0,
            "balance": 0
        },
        "redemption": {
            "quantity": null
        }
    }

validation_rules_assignments

List of The validation rule assignment object.

{
        "data": [],
        "object": "list",
        "total": 0,
        "data_ref": "data"
    }

auto_join
boolean

Optional campaign mode ensuring that when a customer meets at least one earning rule, he/she will automatically get a loyalty card published (assigned) to his/her profile with an updated points balance.

true or false

join_once
boolean

Optional campaign mode ensuring that each customer can own only one loyalty card from the campaign.

true or false

use_voucher_metadata_schema
boolean

true or false