Loyalty Campaign Object
Attributes | Description |
---|---|
idstring | Unique campaign ID, assigned by Voucherify.Example:camp_f7fBbQxUuTN7dI7tGOo5XMDA |
namestring | Loyalty campaign name. |
campaign_typestring | Type of campaign.Available values: LOYALTY_PROGRAM |
typestring | Defines whether the campaign can be updated with new vouchers after campaign creation.- AUTO_UPDATE : the campaign is dynamic, i.e. vouchers will generate based on set criteria |
STATIC
: vouchers need to be manually publishedAvailable values:AUTO_UPDATE
,STATIC
| | voucher | See: Loyalty Card | | auto_joinboolean
| Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | | join_onceboolean
| If this value is set totrue
, customers will be able to join the campaign only once. | | use_voucher_metadata_schemaboolean
| Flag indicating whether the campaign is to use the voucherβs metadata schema instead of the campaign metadata schema. | | start_datestring
| Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.Example:2022-09-20T00:00:00.000Z | | expiration_datestring
| Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.Example:2022-09-30T00:00:00.000Z | | validity_timeframe | See: Validity Timeframe | | validity_day_of_week | See: Validity Day Of Week | | validity_hours | See: Validity Hours | | activity_duration_after_publishingstring
| Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | | descriptionstring
| An optional field to keep any extra textual information about the campaign such as a campaign description and details. | | vouchers_countinteger
| Total number of unique vouchers in campaign. | | activeboolean
| A flag to toggle the campaign on or off. You can disable a campaign even though itβs within the active period defined by thestart_date
andexpiration_date
.-true
indicates an active campaignfalse
indicates an inactive campaign | | metadataobject
| The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | | created_atstring
| Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.Example:2021-12-01T08:00:50.038Z | | updated_atstring
| Timestamp representing the date and time when the voucher was updated. The value is shown in the ISO 8601 format.Example:2022-09-20T09:18:19.623Z | | creation_statusstring
| Indicates the status of the campaign creation.Available values:DONE
,IN_PROGRESS
,FAILED
,DRAFT
,MODIFYING
| | vouchers_generation_statusstring
| Indicates the status of the campaignβs vouchers.Available values:DONE
,IN_PROGRESS
,FAILED
,DRAFT
| | protectedboolean
| Indicates whether the resource can be deleted. | | access_settings_assignments | See: Access Settings Campaign Assignments List | | category_idstring
| Unique category ID that this campaign belongs to.Example:cat_0b688929a2476386a7 | | categories | See: Category | | loyalty_tiers_expirationobject
| Defines the expiration mechanism for loyalty tiers.One of: Balance, Points in Period | | objectstring
| The type of the object represented by JSON. This object stores information about the campaign. |
Loyalty Card
Attributes | Description |
---|---|
typestring | Type of voucher. |
loyalty_cardobject | Defines the loyalty card details.Attributes Descriptionpointsinteger Initial loyalty card income in points to be applied to the loyalty card at voucher generation. expiration_rulesobject Defines point expiration rules. Attributes Descriptionperiod_typestring The expiration period. Available values: MONTH period_valueinteger How many periods should pass before the expiration occurs. rounding_typestring Round up expiration till the end of the given period type. Available values: END_OF_MONTH, END_OF_QUARTER, END_OF_HALF_YEAR, END_OF_YEAR, PARTICULAR_MONTH |
redemptionobject | Defines the redemption limits on vouchers.Attributes Descriptionquantityinteger How many times a voucher can be redeemed. A null value means unlimited. |
code_configobject | Defines codeβs pattern (prefix, suffix, length, charset, etc).Attributes Descriptionlengthstring Number of characters in a generated code (excluding prefix and postfix). charsetstring Characters that can appear in the code. Examples: Alphanumeric: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ Alphabetic: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ Alphabetic Lowercase: abcdefghijklmnopqrstuvwxyz Alphabetic Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ Numbers: 0123456789 Custom: a custom character set prefixstring A text appended before the code. postfixstring A text appended after the code. patternstring A pattern for codes where hashes (#) will be replaced with random characters. Overrides length. |
is_referral_codeboolean | Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM . |
Validity Timeframe
Attributes | Description |
---|---|
durationstring | Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour.Example:PT1H |
intervalstring | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day.Example:P2D |
Validity Day Of Week
Integer array corresponding to the particular days of the week in which the voucher is valid.0
Sunday1
Monday2
Tuesday3
Wednesday4
Thursday5
Friday6
Saturday
Validity Hours
Attributes | Description |
---|---|
dailyarray | Defines the reccuring period(s) when the resource is active. The periods should not overlap.Array of:Attributes Descriptionstart_timestring Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example: 12:00 days_of_weekarray Integer array corresponding to the particular days of the week in which the resource is valid. 0 Sunday 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday expiration_timestring Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example: 14:00 |
Access Settings Campaign Assignments List
Attributes | Description |
---|---|
objectstring | The type of the object represented by JSON. Default is list . This object stores information about campaign assignments to areas and storesAvailable values: list |
data_refstring | Identifies the name of the attribute that contains the array of campaign assignments.Available values: data |
dataarray | Contains an array of campaign assignments.Array of Areas and Stores Campain Assignment |
totalinteger | Total number of areas and stores to which the campaign is assigned. |
Category
Attributes | Description |
---|---|
idstring | Unique category ID assigned by Voucherify. |
namestring | Category name. |
hierarchyinteger | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. |
objectstring | The type of the object represented by the JSON. This object stores information about the category.Available values: category |
created_atstring | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.Example:2022-07-14T10:45:13.156Z |
updated_atstring | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.Example:2022-08-16T10:52:08.094Z |
Balance
Attributes | Description |
---|---|
qualification_typestring | Tier qualification.BALANCE : Points balance is based on the customerβs current points balance. Customers qualify for the tier if their points balance is in the points range of the tier.Available values: BALANCE |
start_dateobject | Defines the conditions for the start date of the tier.Attributes Descriptiontypestring What triggers the tier to be valid for a customer.IMMEDIATE: After reaching the minimum required points. Available values: IMMEDIATE |
expiration_date | Defines the conditions for the expiration date of a tier.One of: Balance Drop, Custom |
Points in Period
Attributes | Description |
---|---|
qualification_typestring | Tier qualification.POINTS_IN_PERIOD : A customer qualifies for the tier only if the sum of the accumulated points in a defined time interval reaches the tier threshold.Available values: POINTS_IN_PERIOD |
qualification_periodstring | Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period.Period DefinitionCalendar Month Points collected in one calendar monthJanuary, February, March, etc.
Calendar Quarter Points collected in the quarter- January - March- April - June- July - September- October - December
Calendar Half-year Points collected in the half-year- January - June- July - December
Calendar Year Points collected in one calendar yearJanuary - DecemberAvailable values: MONTH , QUARTER , HALF_YEAR , YEAR |
start_dateobject | Defines the conditions for the start date of the tier.Attributes Descriptiontypestring What triggers the tier to be valid for a customer.IMMEDIATE: After reaching the minimum required points.NEXT_PERIOD: When the next qualification period starts. Available values: IMMEDIATE, NEXT_PERIOD |
expiration_dateobject | Defines the conditions for the expiration date of a tier.Attributes Descriptiontypestring What triggers the tier to expire for a customer.END_OF_PERIOD: Expire tier at the end of the period.END_OF_NEXT_PERIOD: Expire tier at the end of the next period. Available values: END_OF_PERIOD, END_OF_NEXT_PERIOD extendstring Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of P3M will be valid for an additional duration of 3 months and a tier with a duration of P1D will be valid for an additional duration of 1 day. |
Areas and Stores Campain Assignment
Attributes | Description |
---|---|
idstring | Unique identifier of the campaign assignment.Example:arsca_0ef5ee192117ae2416 |
area_idstring | Unique identifier of the area to which the campaign is assigned.Example:ar_0ea6cd7b781b8f857f |
all_storesboolean | Determines if the campaign is assigned to all of the stores in the area, i.e. if an area ID is passed in the access_settings.assign.area_all_stores_ids in the request. |
area_store_idstring | Unique identifier of the store to which the campaign is assigned.Example:ars_0ec347e2016bed85f4 |
created_atstring | Date and time when the assignment was made. The value is shown in the ISO 8601 format.Example:2024-06-25T19:04:16.260Z |
objectstring | The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.Available values: area_store_campaign_assignment |
Balance Drop
Attributes | Description |
---|---|
typestring | What triggers the tier to expire for a customer.BALANCE_DROP : Tier expires when the points balance drops below the required range of the tier.Available values: BALANCE_DROP |
Custom
Attributes | Description |
---|---|
typestring | What triggers the tier to expire for a customer.CUSTOM : Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier.Available values: CUSTOM |
extendstring | Defines the amount of time the tier will remain active in ISO 8601 format. The expiration date counter starts at the moment when the customer reaches the minimum required points that are required to be in the tier. For example, a tier with a duration of P3M will be valid for a duration of 3 months. |
rounding | Defines the rounding mechanism for tier expiration.One of: Calendar Periods, Specific Month |
Calendar Periods
Attributes | Description |
---|---|
typestring | Period to which the expiration will be rounded to.- MONTH : The expiration date will be rounded to the end of the month. |
QUARTER
: The expiration date will be rounded to the end of the quarter.HALF_YEAR
: The expiration date will be rounded to the half year.YEAR
: The expiration date will be rounded to the end of the year.Available values:MONTH
,QUARTER
,HALF_YEAR
,YEAR
| | strategystring
| Which portion of the given period should the rounding be applied to.Available values:END
|
Specific Month
Attributes | Description |
---|---|
typestring | This mechanism describes a custom rounding for the expiration date.Available values: CUSTOM |
strategystring | Which portion of the given period should the rounding be applied to.Available values: END |
unitstring | Defines the type of unit of time in which the rounding period is counted.Available values: MONTH |
valueinteger | Value for the unit of time that the rounding applies to. Units for this parameter are defined by the rounding.unit parameter.- 0 : January |
1
: February2
: March3
: April4
: May5
: June6
: July7
: August8
: September9
: October10
: November11
: December |