Scenario Guide
Read our dedicated guide to learn about some use cases these endpoints can cover here.
Qualifications Check Eligibility Response Body
Attributes | Description |
---|---|
redeemables | See: Redeemables |
tracking_idstring | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. |
orderobject | Order Calculated No Customer Data |
stacking_rules | See: Stacking Rules |
Redeemables
Attributes | Description |
---|---|
objectstring | The type of the object represented by JSON. Default is list |
data_refstring | Identifies the name of the attribute that contains the array of qualified redeemables. Available values:data |
dataarray | Array of qualified redeemables. Array of Combined response of redeemable object and multiple redeemables within |
totalinteger | The number of redeemables returned in the API request. Example:5 |
has_moreboolean | As results are always limited, the |
more_starting_afterstring | Timestamp representing the date and time to use in 2023-10-31T12:13:16.374Z |
Order Calculated No Customer Data
Attributes | Description | ||||
---|---|---|---|---|---|
idstring | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | ||||
source_idstring , null | Unique source ID of an existing order that will be linked to the redemption of this request. | ||||
statusstring | The order status. Available values:CREATED , PAID , CANCELED , FULFILLED | ||||
amountinteger | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | ||||
initial_amountinteger | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | ||||
discount_amountinteger | Sum of all order-level discounts applied to the order. | ||||
items_discount_amountinteger | Sum of all product-specific discounts applied to the order. | ||||
total_discount_amountinteger | Sum of all order-level AND all product-specific discounts applied to the order. | ||||
total_amountinteger | Order amount after undoing all the discounts through the rollback redemption. | ||||
applied_discount_amountinteger | This field shows the order-level discount applied. | ||||
items_applied_discount_amountinteger | Sum of all product-specific discounts applied in a particular request. | ||||
total_applied_discount_amountinteger | Sum of all order-level AND all product-specific discounts applied in a particular request. | ||||
itemsarray | Array of items applied to the order. It can include up 500 items. Array of Order Item Calculated | ||||
metadataobject | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | ||||
objectstring | The type of the object represented by JSON. Available values:order | ||||
created_atstring | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. Example:2021-12-22T10:13:06.487Z | ||||
updated_atstring , null | Timestamp representing the date and time when the order was last updated in ISO 8601 format. Example:2021-12-22T10:14:45.316Z | ||||
customer_idstring , null | Unique customer ID of the customer making the purchase. Example:cust_7iUa6ICKyU6gH40dBU25kQU1 | ||||
referrer_idstring , null | Unique referrer ID. Example:cust_nM4jqPiaXUvQdVSA6vTRUnix | ||||
customer | Customer Id | ||||
referrer | Referrer Id | ||||
redemptionsobject |
|
Stacking Rules
Attributes | Description |
---|---|
redeemables_limitinteger | Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!). |
applicable_redeemables_limitinteger | Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED. |
applicable_redeemables_per_category_limitinteger | Defines how many redeemables per category can be applied in one request. |
applicable_exclusive_redeemables_limitinteger | Defines how many redeemables with an exclusive category can be applied in one request. |
applicable_exclusive_redeemables_per_category_limitinteger | Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. |
exclusive_categoriesarray | Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint. |
joint_categoriesarray | Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns. |
redeemables_application_modestring | Defines redeemables application mode. Available values:ALL , PARTIAL |
redeemables_sorting_rulestring | Defines redeemables sorting rule. Available values:CATEGORY_HIERARCHY , REQUESTED_ORDER |
redeemables_products_application_modestring | Defines redeemables products application mode. Available values:STACK , ONCE |
redeemables_no_effect_rulestring | Defines redeemables no effect rule. Available values:REDEEM_ANYWAY , SKIP |
Combined response of redeemable object and multiple redeemables within
All of:
- Single redeemable
-
Attributes Description redeemables array
Array of Single redeemable
Order Item Calculated
Attributes | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
idstring | Unique identifier of the order line item. | ||||||||||||||
sku_idstring | Unique identifier of the SKU. It is assigned by Voucherify. | ||||||||||||||
product_idstring | Unique identifier of the product. It is assigned by Voucherify. | ||||||||||||||
related_objectstring | Used along with the source_id property, can be set to either sku or product. Available values:product , sku | ||||||||||||||
source_idstring | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | ||||||||||||||
quantityinteger | The quantity of the particular item in the cart. | ||||||||||||||
discount_quantityinteger | Number of dicounted items. | ||||||||||||||
initial_quantityinteger | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity. | ||||||||||||||
amountinteger | The total amount of the order item (price * quantity). | ||||||||||||||
discount_amountinteger | Sum of all order-item-level discounts applied to the order. | ||||||||||||||
applied_discount_amountinteger | This field shows the order-level discount applied. | ||||||||||||||
applied_discount_quantityinteger | Number of the discounted items applied in the transaction. | ||||||||||||||
applied_quantityinteger | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced. | ||||||||||||||
applied_quantity_amountinteger | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced. | ||||||||||||||
initial_amountinteger | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | ||||||||||||||
priceinteger | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example | ||||||||||||||
subtotal_amountinteger | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the | ||||||||||||||
productobject | An object containing details of the related product.
| ||||||||||||||
skuobject | An object containing details of the related SKU.
| ||||||||||||||
objectstring | The type of the object represented by JSON. Available values:order_item | ||||||||||||||
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. |
Customer Id
Attributes | Description |
---|---|
idstring | A unique identifier of an existing customer. |
objectstring | The type of the object represented by JSON. Available values:customer |
Referrer Id
Order Redemptions
Attributes | Description |
---|---|
datestring | Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format. Example:2022-09-02T17:06:56.649Z |
rollback_idstring | Unique ID of the redemption rollback. Example:rr_0c63c84eb78ee0a6c0 |
rollback_datestring | Timestamp representing the date and tiem when the redemption rollback was created. The value is shown in the ISO 8601 format. Example:2023-01-31T14:18:37.150Z |
related_object_typestring | The source of the incentive. |
related_object_idstring | Unique ID of the parent redemption. Example:r_0ba186c4824e4881e1 |
related_object_parent_idstring | Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign. |
stackedarray | Contains a list of unique IDs of child redemptions, which belong to the stacked incentives. |
rollback_stackedarray | Lists the rollback redemption IDs of the particular child redemptions. |
Single redeemable
Attributes | Description |
---|---|
idstring | Id of the redeemable. |
objectstring | Object type of the redeemable. Available values:campaign , promotion_tier , promotion_stack , voucher |
created_atstring | 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 |
result | See: Redeemable Result |
order | See: Order Calculated No Customer Data |
validation_rule_idstring | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. |
applicable_to | Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted. Applicable To Result List |
inapplicable_to | Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted. Inapplicable To Result List |
metadataobject | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. |
categoriesarray | List of category information. Array of Category with Stacking Rules Type |
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. Example:Order Paid - You will get 100 points |
namestring | Name of the redeemable. Example:promotion_tier_get_points |
campaign_namestring | Name of the campaign associated to the redeemable. This field is available only if object is not PromotionCampaign |
campaign_idstring | Id of the campaign associated to the redeemable. This field is available only if object is not camp_Mow7u4gSxagLlZ2oDQ01ZS5N |
validation_rules_assignments | See: Validation Rules Assignments List |
Redeemable Result
Attributes | Description |
---|---|
discount | See: Discount |
gift | See: Redeemable Gift |
loyalty_card | Loyalty Card object response Redeemable Loyalty Card |
error | Error in result Error Object |
Applicable To Result List
Attributes | Description |
---|---|
dataarray | Contains array of items to which the discount can apply. Array of Applicable To |
totalinteger | Total number of objects defining included products, SKUs, or product collections. |
objectstring | The type of the object represented by JSON. Available values:list |
data_refstring | The type of the object represented by JSON. Available values:data |
Inapplicable To Result List
Attributes | Description |
---|---|
dataarray | Contains array of items to which the discount cannot apply. Array of Inapplicable To |
totalinteger | Total number of objects defining included products, SKUs, or product collections. |
objectstring | The type of the object represented by JSON. Available values:list |
data_refstring | The type of the object represented by JSON. Available values:data |
Category with Stacking Rules Type
Category object with stacking_rules_type
All of:
- Category
-
Attributes Description stacking_rules_type string
The type of the stacking rule eligibility.
Available values:JOINT
,EXCLUSIVE
Validation Rules Assignments List
Attributes | Description |
---|---|
objectstring | The type of the object represented by JSON. This object stores information about validation rules assignments. Available values:list |
data_refstring | Identifies the name of the attribute that contains the array of validation rules assignments. Available values:data |
dataarray | Contains array of validation rules assignments. Array of Business Validation Rule Assignment |
totalinteger | Total number of validation rules assignments. |
Discount
Contains information about discount.
One of:
Amount, Unit, Unit Multiple, Percent, Fixed
Redeemable Gift
Attributes | Description |
---|---|
balancenumber | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. |
creditsnumber | The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. Value is multiplied by 100 to precisely represent 2 decimal places. For example |
Redeemable Loyalty Card
Attributes | Description |
---|---|
pointsinteger | Total points incurred over the lifespan of the loyalty card. Example:7000 |
balanceinteger | Points available for reward redemption. Example:6970 |
exchange_rationumber | The cash equivalent of the points defined in the points_ratio property. |
points_ratiointeger | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. |
transfersarray | Array of Loyalties Transfer Points |
Error Object
Attributes | Description |
---|---|
codeinteger | Error's HTTP status code. |
keystring | Short string describing the kind of error which occurred. |
messagestring | A human-readable message providing a short description of the error. |
detailsstring | A human-readable message providing more details about the error. |
request_idstring | This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team. Example:v-0a885062c80375740f |
resource_idstring | Unique resource ID that can be used in another endpoint to get more details. Example:rf_0c5d710a87c8a31f86 |
resource_typestring | The resource type. Example:voucher |
Applicable To
Attributes | Description |
---|---|
objectstring | This object stores information about the resource to which the discount is applicable. Available values:product , sku , products_collection |
idstring | Unique product collection, product, or SKU identifier assigned by Voucherify. |
source_idstring | The source identifier from your inventory system. |
product_idstring | Parent product's unique ID assigned by Voucherify. |
product_source_idstring | Parent product's source ID from your inventory system. |
strictboolean | |
pricenumber | New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price. |
price_formulanumber | Formula used to calculate the discounted price of an item. |
effect | Defines how the discount is applied to the customer's order. Applicable To Effect |
quantity_limitinteger | The maximum number of units allowed to be discounted per order line item. |
aggregated_quantity_limitinteger | The maximum number of units allowed to be discounted combined across all matched order line items. |
amount_limitinteger | Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. |
aggregated_amount_limitinteger | Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:
|
order_item_indicesarray | Determines the order in which the discount is applied to the products or SKUs sent in the |
repeatinteger | Determines the recurrence of the discount, e.g. |
skip_initiallyinteger | Determines how many items are skipped before the discount is applied. |
targetstring | Determines to which kinds of objects the discount is applicable. ITEM |
Inapplicable To
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 |
Business Validation Rule Assignment
Attributes | Description |
---|---|
idstring | The unique identifier for a assignment |
rule_idstring | The unique identifier for a rule |
related_object_idstring | The unique identifier for a related object |
related_object_typestring | The type of related object |
created_atstring | 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_atstring | Timestamp representing the date and time when the object was last updated in ISO 8601 format. Example:2022-03-09T11:19:04.819Z |
objectstring | The type of the object represented by JSON. Available values:validation_rules_assignment |
validation_statusstring | The validation status of the assignment Available values:VALID , PARTIALLY_VALID , INVALID |
validation_omitted_rulesarray | The list of omitted rules |
Amount
Attributes | Description |
---|---|
typestring | Defines the type of the voucher. Available values:AMOUNT |
amount_offnumber | 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_formulastring | |
aggregated_amount_limitinteger | Maximum discount amount per order. |
effect | Defines how the discount is applied to the customer's order. Discount Amount Vouchers Effect Types |
is_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Unit
Attributes | Description |
---|---|
typestring | Discount type. Available values:UNIT |
unit_offinteger | Number of units to be granted a full value discount. |
unit_off_formulastring | |
effect | Defines how the unit is added to the customer's order. Discount Unit Vouchers Effect Types |
unit_typestring | 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_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Unit Multiple
Attributes | Description |
---|---|
typestring | Discount type. Available values:UNIT |
effectstring | Defines how the discount is applied to the customer's order. Available values:ADD_MANY_ITEMS |
unitsarray | Array of One Unit |
Percent
Attributes | Description |
---|---|
typestring | Defines the type of the voucher. Available values:PERCENT |
percent_offnumber | The percent discount that the customer will receive. |
percent_off_formulastring | |
amount_limitnumber | 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_limitinteger | Maximum discount amount per order. |
effect | Defines how the discount is applied to the customer's order. Discount Percent Vouchers Effect Types |
is_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Fixed
Attributes | Description |
---|---|
typestring | Defines the type of the voucher. Available values:FIXED |
fixed_amountnumber | 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_formulastring | |
effect | Defines how the discount is applied to the customer's order. Discount Fixed Vouchers Effect Types |
is_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Loyalties Transfer Points
Attributes | Description |
---|---|
codestring | Unique loyalty card code from which the user wants to transfer loyalty points (source). |
pointsinteger | The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source). |
reasonstring | Reason for the transfer. |
source_idstring | The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. |
Applicable To Effect
Available values: APPLY_TO_EVERY
, APPLY_TO_CHEAPEST
, APPLY_FROM_CHEAPEST
, APPLY_TO_MOST_EXPENSIVE
, APPLY_FROM_MOST_EXPENSIVE
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 |
---|---|
idstring | Unique product ID, assigned by Voucherify. |
source_idstring | Product's source ID. |
namestring | Product name. |
Simple Sku Discount Unit
Attributes | Description |
---|---|
idstring | Unique SKU ID, assigned by Voucherify. |
source_idstring | Product variant's source ID. |
namestring | Sku name |
One Unit
Attributes | Description |
---|---|
unit_offnumber | Number of units to be granted a full value discount. |
unit_off_formulastring | |
effectstring | Defines how the unit is added to the customer's order. Available values:ADD_NEW_ITEMS , ADD_MISSING_ITEMS |
unit_typestring | 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