Campaign
All of:
- Campaign Base
Campaign Additional Data
Attributes Description promotion
See: Promotion Tiers validation_rules_assignments
See: Validation Rules Assignments List
Campaign Base
Attributes | Description |
---|---|
id | Unique campaign ID, assigned by Voucherify. Example: camp_f7fBbQxUuTN7dI7tGOo5XMDA |
name | Campaign name. |
description | An optional field to keep any extra textual information about the campaign such as a campaign description and details. |
campaign_type | Type of campaign. Available values:
|
type | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers.
Available values:
|
voucher | See: Campaign Voucher |
auto_join | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. |
join_once | If this value is set to
|
use_voucher_metadata_schema | Flag indicating whether the campaign is to use the voucher’s metadata schema instead of the campaign metadata schema. |
validity_timeframe | See: Validity Timeframe |
validity_day_of_week | See: Validity Day Of Week |
validity_hours | See: Validity Hours |
activity_duration_after_publishing | 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. |
vouchers_count | Total number of unique vouchers in campaign. |
start_date | 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_date | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date. Example: 2022-09-30T00:00:00.000Z |
active | A flag to toggle the campaign on or off. You can disable a campaign even though it’s within the active period defined by the
|
metadata | 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_at | 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_at | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. Example: 2022-09-20T09:18:19.623Z |
category | Unique category name. |
creation_status | Indicates the status of the campaign creation. Available values:
|
vouchers_generation_status | Indicates the status of the campaign’s voucher generation. Available values:
|
readonly | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. It is also not returned for restricted users who use the GET Campaign summary endpoint. |
protected | Indicates whether the resource can be deleted. |
category_id | Unique category ID that this campaign belongs to. Example: cat_0b688929a2476386a7 |
categories | Contains details about the campaign category. For the GET
List campaigns
endpoint, this is returned only if the
|
object | The type of the object represented by JSON. This object stores information about the campaign. |
referral_program | See: Referral Program |
loyalty_tiers_expiration | See: Loyalty Tiers Expiration |
access_settings_assignments | See: Access Settings Campaign Assignments List |
Promotion Tiers
Attributes | Description |
---|---|
object | The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary. |
data_ref | Identifies the name of the attribute that contains the array of promotion tier objects. |
tiers | Contains array of promotion tier objects. Array of Promotion Tier |
total | Total number of promotion tiers. |
has_more | As query results are always limited (by the limit parameter), the
|
Validation Rules Assignments List
Attributes | Description |
---|---|
object | The type of the object represented by JSON. This object stores information about validation rules assignments. Available values:
|
data_ref | Identifies the name of the attribute that contains the array of validation rules assignments. Available values:
|
data | Contains array of validation rules assignments. Array of Business Validation Rule Assignment |
total | Total number of validation rules assignments. |
Campaign Voucher
Attributes | Description | ||||
---|---|---|---|---|---|
type | Type of voucher. | ||||
discount | Defines the voucher discount type and details. Discount | ||||
gift | Defines the voucher gift details. Gift | ||||
loyalty_card | Defines the voucher loyalty card details. Campaign Loyalty Card | ||||
redemption | Defines the redemption limits on vouchers.
| ||||
code_config | Code Config | ||||
is_referral_code | Flag indicating whether this voucher is a referral code;
| ||||
start_date | 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_date | 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 |
Validity Timeframe
Attributes | Description |
---|---|
duration | Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a
Example: PT1H |
interval | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|
daily | Defines the reccuring period(s) when the resource is active. The periods should not overlap. Array of:
|
Category
Attributes | Description |
---|---|
id | Unique category ID assigned by Voucherify. |
name | Category name. |
hierarchy | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. |
object | The type of the object represented by the JSON. This object stores information about the category. Available values:
|
created_at | 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_at | 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 |
Referral Program
Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
conversion_event_type | Define how a referral is triggered. Available values:
| ||||||||||||||||
custom_event | Contains details about the custom event.
| ||||||||||||||||
referee_reward | Defines the referee reward.
|
Loyalty Tiers Expiration
Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
qualification_type | Tier qualification.
Available values:
| ||||||||||
qualification_period | 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.
Available values:
| ||||||||||
start_date | Defines the conditions for the start date of the tier.
| ||||||||||
expiration_date | Defines the conditions for the expiration date of a tier.
|
Access Settings Campaign Assignments List
Attributes | Description |
---|---|
object | The type of the object represented by JSON. Default is
Available values:
|
data_ref | Identifies the name of the attribute that contains the array of campaign assignments. Available values:
|
data | Contains an array of campaign assignments. Array of Areas and Stores Campain Assignment |
total | Total number of areas and stores to which the campaign is assigned. |
Promotion Tier
Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | Unique promotion tier ID. Example: promo_63fYCt81Aw0h7lzyRkrGZh9p | ||||||||||||||||||||
created_at | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. Example: 2021-12-15T11:34:01.333Z | ||||||||||||||||||||
updated_at | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. Example: 2022-02-09T09:20:05.603Z | ||||||||||||||||||||
name | Name of the promotion tier. | ||||||||||||||||||||
banner | Text to be displayed to your customers on your website. | ||||||||||||||||||||
action | Contains details about the discount applied by the promotion tier.
| ||||||||||||||||||||
metadata | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | ||||||||||||||||||||
hierarchy | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer’s order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | ||||||||||||||||||||
promotion_id | Promotion unique ID. | ||||||||||||||||||||
campaign | Contains details about promotion tier’s parent campaign.
| ||||||||||||||||||||
campaign_id | Promotion tier’s parent campaign’s unique ID. | ||||||||||||||||||||
active | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it’s within the active period defined by the
| ||||||||||||||||||||
start_date | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date. Example: 2022-09-23T00:00:00.000Z | ||||||||||||||||||||
expiration_date | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date. Example: 2022-09-26T00:00:00.000Z | ||||||||||||||||||||
validity_timeframe | See: Validity Timeframe | ||||||||||||||||||||
validity_day_of_week | See: Validity Day Of Week | ||||||||||||||||||||
validity_hours | See: Validity Hours | ||||||||||||||||||||
summary | Contains statistics about promotion tier redemptions and orders.
| ||||||||||||||||||||
object | The type of the object represented by JSON. This object stores information about the promotion tier. | ||||||||||||||||||||
validation_rule_assignments | See: Validation Rule Assignments List | ||||||||||||||||||||
category_id | Promotion tier category ID. Example: cat_0c9da30e7116ba6bba | ||||||||||||||||||||
categories | Array of Category |
Business Validation Rule Assignment
Attributes | Description |
---|---|
id | The unique identifier for a assignment |
rule_id | The unique identifier for a rule |
related_object_id | The unique identifier for a related object |
related_object_type | The type of related object |
created_at | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example: 2022-03-09T11:19:04.819Z |
updated_at | Timestamp representing the date and time when the object was last updated in ISO 8601 format. Example: 2022-03-09T11:19:04.819Z |
object | The type of the object represented by JSON. Available values:
|
validation_status | The validation status of the assignment Available values:
|
validation_omitted_rules | The list of omitted rules |
Discount
Contains information about discount.
One of:
Gift
Attributes | Description |
---|---|
amount | Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example
|
subtracted_amount | Total amount of subtracted credits over the gift card lifetime. |
balance | Available funds. The value is multiplied by 100 to represent 2 decimal places. For example
|
effect | Defines how the credits are applied to the customer’s order. Available values:
|
Campaign Loyalty Card
Attributes | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
points | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. | ||||||||||||||
expiration_rules | Defines the loyalty point expiration rule. This expiration rule applies when there are no
|
Code Config
Attributes | Description |
---|---|
length | Number of characters in a generated code (excluding prefix and postfix). |
charset | Characters that can appear in the code. Examples:
|
prefix | A text appended before the code. |
postfix | A text appended after the code. |
pattern | A pattern for codes where hashes (#) will be replaced with random characters. Overrides
|
initial_count | Internal value, does not change anything if provided. |
Areas and Stores Campain Assignment
Attributes | Description |
---|---|
id | Unique identifier of the campaign assignment. Example: arsca_0ef5ee192117ae2416 |
area_id | Unique identifier of the area to which the campaign is assigned. Example: ar_0ea6cd7b781b8f857f |
all_stores | Determines if the campaign is assigned to all of the stores in the area, i.e. if an area ID is passed in the
|
area_store_id | Unique identifier of the store to which the campaign is assigned. Example: ars_0ec347e2016bed85f4 |
created_at | Date and time when the assignment was made. The value is shown in the ISO 8601 format. Example: 2024-06-25T19:04:16.260Z |
object | The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores. Available values:
|
Validation Rule Assignments List
Attributes | Description |
---|---|
object | The type of the object represented by JSON. This object stores information about validation rule assignments. |
data_ref | Identifies the name of the JSON property that contains the array of validation rule assignments. |
data | A dictionary that contains an array of validation rule assignments. Array of Validation Rule Assignment |
total | Total number of validation rule assignments. |
Amount
Attributes | Description |
---|---|
type | Defines the type of the voucher. Available values:
|
amount_off | Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. |
amount_off_formula | Formula used to dynamically calculate the discount. |
aggregated_amount_limit | Maximum discount amount per order. |
effect | Defines how the discount is applied to the customer’s order. Discount Amount Vouchers Effect Types |
is_dynamic | Flag indicating whether the discount was calculated using a formula. |
Unit
Attributes | Description |
---|---|
type | Discount type. Available values:
|
unit_off | Number of units to be granted a full value discount. |
unit_off_formula | Formula used to dynamically calculate the number of units. |
effect | Defines how the unit is added to the customer’s order. Discount Unit Vouchers Effect Types |
unit_type | The product deemed as free, chosen from product inventory (e.g. time, items). |
product | Contains information about the product. Simple Product Discount Unit |
sku | See: Simple Sku Discount Unit |
is_dynamic | Flag indicating whether the discount was calculated using a formula. |
Unit Multiple
Attributes | Description |
---|---|
type | Discount type. Available values:
|
effect | Defines how the discount is applied to the customer’s order. Available values:
|
units | Array of One Unit |
Percent
Attributes | Description |
---|---|
type | Defines the type of the voucher. Available values:
|
percent_off | The percent discount that the customer will receive. |
percent_off_formula | Formula used to dynamically calculate the discount. |
amount_limit | Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. |
aggregated_amount_limit | Maximum discount amount per order. |
effect | Defines how the discount is applied to the customer’s order. Discount Percent Vouchers Effect Types |
is_dynamic | Flag indicating whether the discount was calculated using a formula. |
Fixed
Attributes | Description |
---|---|
type | Defines the type of the voucher. Available values:
|
fixed_amount | Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the
|
fixed_amount_formula | Formula used to dynamically calculate the discount. |
effect | Defines how the discount is applied to the customer’s order. Discount Fixed Vouchers Effect Types |
is_dynamic | Flag indicating whether the discount was calculated using a formula. |
Validation Rule Assignment
Attributes | Description |
---|---|
id | Validation rule assignment ID. Example: asgm_74F7QZoYbUoljwQO |
rule_id | Validation rule ID. Example: val_4j7DCRm2IS59 |
related_object_id | The resource ID to which the validation rule was assigned. Example: v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT |
related_object_type | The type of resource to which the validation rule was assigned. Available values:
|
created_at | Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format. Example: 2022-02-17T08:18:15.085Z |
object | The type of the object represented by the ID. Available values:
|
Discount Amount Vouchers Effect Types
Available values:
APPLY_TO_ORDER
,
APPLY_TO_ITEMS
,
APPLY_TO_ITEMS_PROPORTIONALLY
,
APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY
,
APPLY_TO_ITEMS_BY_QUANTITY
Discount Unit Vouchers Effect Types
Available values:
ADD_MISSING_ITEMS
,
ADD_NEW_ITEMS
,
ADD_MANY_ITEMS
Simple Product Discount Unit
Attributes | Description |
---|---|
id | Unique product ID, assigned by Voucherify. |
source_id | Product’s source ID. |
name | Product name. |
Simple Sku Discount Unit
Attributes | Description |
---|---|
id | Unique SKU ID, assigned by Voucherify. |
source_id | Product variant’s source ID. |
name | Sku name |
One Unit
Attributes | Description |
---|---|
unit_off | Number of units to be granted a full value discount. |
unit_off_formula | Formula used to dynamically calculate the number of units. |
effect | Defines how the unit is added to the customer’s order. Available values:
|
unit_type | The product deemed as free, chosen from product inventory (e.g. time, items). |
product | Contains information about the product. Simple Product Discount Unit |
sku | Contains information about the sku. Simple Sku Discount Unit |
Discount Percent Vouchers Effect Types
Available values:
APPLY_TO_ORDER
,
APPLY_TO_ITEMS
Discount Fixed Vouchers Effect Types
Available values:
APPLY_TO_ORDER
,
APPLY_TO_ITEMS