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.

AttributesDescriptionExample
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_PROGRAMLOYALTY_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_publishingLoyalty cards can be active for a specific time frame after publishing.
validity_timeframeYou 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_atTimestamp of loyalty campaign object creation.2021-12-09T08:31:18.114Z
vouchers_countThe size of the list of vouchers generated for the loyalty campaign.5
vouchers_generation_statusShows 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
voucherA 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_assignmentsList 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
loyalty_tiers_expiration
object
Loyalty tiers expiration settings: how a customer is qualified into a tier, when the start date of the tier occurs and how the expiration date is defined."loyalty_tiers_expiration": {
"qualification_type": "BALANCE",
"start_date": {
"type": "IMMEDIATE"
},
"expiration_date": {
"type": "BALANCE_DROP"
}
}

"loyalty_tiers_expiration": {
"qualification_type": "BALANCE",
"start_date": {
"type": "IMMEDIATE"
},
"expiration_date": {
"type": "CUSTOM",
"extend": "P3M",
"rounding": {
"type": "MONTH",
"strategy": "END"
}
}
}
category_id
string
Loyalty program category ID."category_id": "cat_0b8b5a427a0283c854"
categories
object
Contains details about the category of the program."categories": [
{
"id": "cat_0b8b5a427a0283c854",
"name": "Eighth",
"hierarchy": 8,
"created_at": "2022-08-16T11:45:54.171Z",
"object": "category"
}
]