Redemptions Redeem Response Body
Attributes | Description |
---|---|
redemptionsarray | Array of Redemption |
parent_redemption | See: Redemption |
order | Contains the order details associated with the redemption.All of: 1. Order Calculated No Customer Data |
2.Attributes Descriptionitemsarray Array of items applied to the order. It can include up to 500 items. | |
inapplicable_redeemablesarray | Lists validation results of each inapplicable redeemable.Array of Inapplicable Redeemable |
skipped_redeemablesarray | Lists validation results of each redeemable. If a redeemable can be applied, the API returns "status": "APPLICABLE" .Array of Skipped Redeemable |
Redemption
This is an object representing a redemption for POSTv1/redemptions
and POST /client/v1/redemptions
.
All of:
- Redemption Base
-
Attributes Description voucher Defines the details of the voucher being redeemed.All of: 1. Voucher with categories and validation rules assignments
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 | This is the sum of the order items’ amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). |
initial_amountinteger | This is the sum of the order items’ amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). |
discount_amountinteger | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). |
items_discount_amountinteger | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). |
total_discount_amountinteger | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). |
total_amountinteger | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). |
applied_discount_amountinteger | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). |
items_applied_discount_amountinteger | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount) |
total_applied_discount_amountinteger | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount |
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. It can be used to define business validation rules or discount formulas. |
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 identifier of the customer making the purchase. The ID is assigned by Voucherify.Example:cust_7iUa6ICKyU6gH40dBU25kQU1 |
referrer_idstring , null | Unique referrer ID.Example:cust_nM4jqPiaXUvQdVSA6vTRUnix |
customer | Customer Id |
referrer | Referrer Id |
redemptionsobject | Attributes Description[propertyName] See: Order Redemptions |
Inapplicable Redeemable
Attributes | Description |
---|---|
statusstring | Indicates whether the redeemable can be applied or not applied based on the validation rules.Available values: INAPPLICABLE |
idstring | Redeemable ID, i.e. the voucher code. |
objectstring | Redeemable’s object type.Available values: voucher , promotion_tier |
resultobject | Includes the error object with details about the reason why the redeemable is inapplicableAttributes Descriptionerror See: Error Object detailsobject Provides details about the reason why the redeemable is inapplicable. Attributes Descriptionmessagestring Generic message from the message string shown in the error object or the message configured in a validation rule. keystring Generic message from the key string shown in the error object. bundle See: Bundle Details |
metadataobject | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. |
categoriesarray | Array of Category with Stacking Rules Type |
campaign_namestring | Campaign name. Displayed only if the options.expand is passed with a redeemable value in the validation request body. |
campaign_idstring | Unique campaign ID assigned by Voucherify. Displayed only if the options.expand is passed with a redeemable value in the validation request body.Example:camp_pqZjuhG6Mgtp4GD0zD7b8hA3 |
namestring | Name of the promotion tier. Displayed only if the options.expand is passed with a redeemable value in the validation request body. |
Skipped Redeemable
Attributes | Description |
---|---|
statusstring | Indicates whether the redeemable can be applied or not applied based on the validation rules.Available values: SKIPPED |
idstring | Redeemable ID, i.e. the voucher code. |
objectstring | Redeemable’s object type.Available values: voucher , promotion_tier |
resultobject | Provides details about the reason why the redeemable is skipped.Attributes Descriptiondetails One of: Validations Redeemable Skipped Result Limit Exceeded, Validations Redeemable Skipped Result Category Limit Exceeded, Validations Redeemable Skipped Result Redeemables Limit Exceeded, Validations Redeemable Skipped Result Redeemables Category Limit Exceeded, Validations Redeemable Skipped Result Exclusion Rules Not Met, Validations Redeemable Skipped Result Preceding Validation Failed |
metadataobject | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. |
categoriesarray | Array of Category with Stacking Rules Type |
campaign_namestring | Campaign name. Displayed only if the options.expand is passed with a redeemable value in the validation request body. |
campaign_idstring | Unique campaign ID assigned by Voucherify. Displayed only if the options.expand is passed with a redeemable value in the validation request body.Example:camp_pqZjuhG6Mgtp4GD0zD7b8hA3 |
namestring | Name of the promotion tier. Displayed only if the options.expand is passed with a redeemable value in the validation request body. |
Redemption Base
Attributes | Description |
---|---|
idstring | Unique redemption ID.Example:r_0bc92f81a6801f9bca |
objectstring | The type of the object represented by the JSONAvailable values: redemption |
datestring | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.Example:2021-12-22T10:13:06.487Z |
customer_idstring , null | Unique customer ID of the redeeming customer.Example:cust_i8t5Tt6eiKG5K79KQlJ0Vs64 |
tracking_idstring , null | Hashed customer source ID. |
metadataobject , null | The metadata object stores all custom attributes assigned to the redemption. |
amountinteger | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.For loyalty cards, this is the number of loyalty points used in the transaction.Example:10000 |
redemptionstring , null | Unique redemption ID of the parent redemption.Example:r_0c656311b5878a2031 |
resultstring | Redemption result.Available values: SUCCESS , FAILURE |
statusstring | Redemption status.Available values: SUCCEEDED , FAILED , ROLLED_BACK |
sessionobject | Contains details about the redemption session lock. Sessions can be established only for discount vouchers, promotions, and gift cards.Attributes Descriptionkeystring The session unique ID assigned by Voucherify or your own unique session ID sent in the request. |
related_redemptionsobject | Attributes Descriptionrollbacksarray Array of: Redemption Related Redemptions Rollbacks Item Attributes Descriptionidstring Unique rollback redemption ID. Example: rr_0bc92f81a6801f9bca datestring Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example: 2021-12-22T10:13:06.487Z rollback_order_modestring Defines the rollback mode for the order. WITH_ORDER is a default setting. The redemption is rolled back together with the data about the order, including related discount values. WITHOUT_ORDER allows rolling the redemption back without affecting order data, including the applied discount values. This is returned only in GET v1/redemptions/ and GET v1/redemptions/{redemptionId} endpoints. Available values: WITH_ORDER, WITHOUT_ORDER redemptionsarray Array of: Redemption Related Redemptions Item Attributes Descriptionidstring Unique redemption ID. Example: r_0bc92f81a6801f9bca datestring Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example: 2021-12-22T10:13:06.487Z |
failure_codestring | If the result is FAILURE , this parameter will provide a generic reason as to why the redemption failed.Example:customer_rules_violated |
failure_messagestring | If the result is FAILURE , this parameter will provide a more expanded reason as to why the redemption failed. |
order | All of: 1. Order Calculated No Customer Data |
2.Attributes Descriptionitemsarray Array of items applied to the order. It can include up to 500 items. | |
channelobject | Defines the details of the channel through which the redemption was issued.Attributes Descriptionchannel_idstring Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For AUTO_REDEEM, it is the reward assignment ID. Example: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH channel_typestring The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard, API corresponds to the API, and AUTO_REDEEM corresponds to a loyalty campaign reward that has been redeemed automatically. Available values: USER, API, AUTO_REDEEM |
customer | Simple Customer |
related_object_typestring | Defines the related object.Available values: voucher , promotion_tier , redemption |
related_object_idstring | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. |
promotion_tier | Contains details of the promotion tier and the parent campaign.Promotion Tier |
reward | See: Redemption Reward Result |
giftobject | Contains the amount subtracted from the gift card for the redemption.Attributes Descriptionamountinteger Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). |
loyalty_cardobject | Contains the number of points subtracted from the loyalty card for the redemption.Attributes Descriptionpointsinteger Number of points subtracted from the loyalty card as a result of the redemption. |
Voucher with categories and validation rules assignments
This is an object representing a voucher with categories and validation rules assignments for POSTv1/qualifications
, POST v1/redemptions
, and POST v1/validations
.
All of:
- Voucher Base
-
Attributes Description categories array
Contains details about the category.Array of Category with Stacking Rules Type validation_rules_assignments See: Validation Rules Assignments List
Voucher Holder
Attributes | Description |
---|---|
holder | See: Simple Customer |
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
Customer IdOrder 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 time 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. |
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 |
errorobject | Includes additional information about the error.Attributes Descriptionmessagestring The message configured by the user in a validation rule. |
Bundle Details
Attributes | Description |
---|---|
quantityinteger | Determines how many bundles are qualified. If there are missing bundle products, the value is 0 . If the bundle is qualified, the value is 1 . The maximum number of identified bundles can equal the number set in limit . Also defines the multiplier of the discount for AMOUNT , PERCENT , and UNIT discount types. To inform end-customers that more products can be added to meet additional bundles, compare this parameter with limit . |
limitinteger | Determines the maximum number of identified bundles. This also defines the maximum multiplier of the bundle discount. |
identifiedarray | Determines products from the customer’s order items that meet bundle conditions. SKUs meet the conditions for their product that is used in the bundle. Returns only the products and their quantity that meet the bundle.Array of:Attributes Descriptionidstring Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify. objectstring Determines the type of the object that meets the bundle condition. Available values: product, sku item_indexinteger Number assigned to the order line item in accordance with the order sent in the request. It starts with 0 for the first order line item in the request. item_quantityinteger Quantity of items that meet the bundle conditions. If the quantity in the order is higher than the quantity required by the bundle, this returns only the number that meets the bundle. For example, if the bundle requires 5 coffees, but the order includes 10 coffees, item_quantity returns 5. |
missingarray | Determines products, SKUs, or collections from the bundle that are missing in the customer’s order items. Determines also the missing quantity. For collections, this means that order items do not include a sufficient number of items that belong to the collection. Not returned when all required bundle items are in the order.Array of:Attributes Descriptionidstring Unique identifier of the collection, product, or SKU that is missing in the customer’s order items. This is an ID assigned by Voucherify. objectstring Determines the type of the object that is missing in the customer’s order items. Available values: product, products_collection, sku item_quantityinteger Quantity of items that are missing in the order items to meet the bundle conditions. |
Category with Stacking Rules Type
Category object withstacking_rules_type
All of:
- Category
-
Attributes Description stacking_rules_type string
The type of the stacking rule eligibility.Available values: JOINT
,EXCLUSIVE
Validations Redeemable Skipped Result Limit Exceeded
Attributes | Description |
---|---|
keystring | Available values: applicable_redeemables_limit_exceeded |
messagestring | Example:Applicable redeemables limit exceeded |
Validations Redeemable Skipped Result Category Limit Exceeded
Attributes | Description |
---|---|
keystring | Available values: applicable_redeemables_per_category_limit_exceeded |
messagestring | Example:Applicable redeemables limit per category exceeded |
Validations Redeemable Skipped Result Redeemables Limit Exceeded
Attributes | Description |
---|---|
keystring | Available values: applicable_exclusive_redeemables_limit_exceeded |
messagestring | Example:Applicable exclusive redeemables limit exceeded |
Validations Redeemable Skipped Result Redeemables Category Limit Exceeded
Attributes | Description |
---|---|
keystring | Available values: applicable_exclusive_redeemables_per_category_limit_exceeded |
messagestring | Example:Applicable exclusive redeemables limit per category exceeded |
Validations Redeemable Skipped Result Exclusion Rules Not Met
Attributes | Description |
---|---|
keystring | Available values: exclusion_rules_not_met |
messagestring | Example:Redeemable cannot be applied due to exclusion rules |
Validations Redeemable Skipped Result Preceding Validation Failed
Attributes | Description |
---|---|
keystring | Available values: preceding_validation_failed |
messagestring | Example:Redeemable cannot be applied due to preceding validation failure |
Simple Customer
Attributes | Description |
---|---|
idstring | Unique identifier of an existing customer. It is assigned by Voucherify. |
namestring | Customer’s first and last name. |
emailstring | Customer’s email address. |
source_idstring | A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service. |
metadataobject | A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer. |
objectstring | The type of the object represented by JSON.Available values: customer |
Promotion Tier
Attributes | Description |
---|---|
idstring | Unique promotion tier ID.Example:promo_63fYCt81Aw0h7lzyRkrGZh9p |
created_atstring | 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_atstring | 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 |
namestring | Name of the promotion tier. |
bannerstring | Text to be displayed to your customers on your website. |
actionobject | Contains details about the discount applied by the promotion tier.Attributes Descriptiondiscount See: Discount |
metadataobject | 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. |
hierarchyinteger | 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_idstring | Promotion unique ID. |
campaignobject | Contains details about promotion tier’s parent campaign.Attributes Descriptionidstring Unique campaign ID. 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-22T00: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 activeboolean A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it’s within the active period defined by the start_date and expiration_date using the Disable Campaign endpoint. true indicates an active campaign false indicates an inactive campaign category_idstring Unique category ID that this campaign belongs to. Example: cat_0b688929a2476386a6 objectstring The type of the object represented by the campaign object. This object stores information about the campaign. |
campaign_idstring | Promotion tier’s parent campaign’s unique ID. |
activeboolean | 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 and expiration_date .- true indicates an active promotion tier |
-
false
indicates an inactive promotion tier | | start_datestring
| 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_datestring
| 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 | | summaryobject
| Contains statistics about promotion tier redemptions and orders.Attributes Descriptionredemptionsobject Contains statistics about promotion tier redemptions. Attributes Descriptiontotal_redeemedinteger Number of times the promotion tier was redeemed. ordersobject Contains statistics about orders related to the promotion tier. Attributes Descriptiontotal_amountinteger Sum of order totals. total_discount_amountinteger Sum of total discount applied using the promotion tier. | | objectstring
| 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_idstring
| Promotion tier category ID.Example:cat_0c9da30e7116ba6bba | | categoriesarray
| Array of Category |
Redemption Reward Result
Attributes | Description |
---|---|
customer | Simple Customer |
assignment_idstring , null | Unique reward assignment ID assigned by Voucherify. |
voucher | Voucher |
product | Product |
sku | SKU Object |
loyalty_tier_idstring , null | Unique loyalty tier ID assigned by Voucherify. |
idstring | Unique reward ID.Example:rew_0bc92f81a6801f9bca |
namestring | Name of the reward.Example:Reward Name |
objectstring | The type of the object represented by the JSONAvailable values: reward |
created_atstring | Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.Example:2021-12-22T10:13:06.487Z |
updated_atstring | Timestamp in ISO 8601 format indicating when the reward was updated.Example:2022-10-03T12:24:58.008Z |
parametersobject | These are parameters representing a material reward.Attributes Descriptioncampaignobject Defines the product redeemed as a reward. Attributes Descriptionidstring Campaign unique ID. Example: camp_13BbZ0kQsNinhqsX3wUts2UP balanceinteger Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points. typestring Defines the type of the campaign. productobject Defines the product redeemed as a reward. Attributes Descriptionidstring Unique product ID, assigned by Voucherify. Example: prod_0b7d7dfb05cbe5c616 sku_idstring Unique identifier of the SKU. It is assigned by Voucherify. Example: sku_0a41e31c7b41c28358 coinobject Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio. Attributes Descriptionexchange_ratiointeger 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. |
metadataobject | A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward. |
typestring | Reward type.Available values: CAMPAIGN , COIN , MATERIAL |
Voucher Base
Attributes | Description |
---|---|
idstring | Assigned by the Voucherify API, identifies the voucher.Example:v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV |
codestring | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.Example:WVPblOYX |
campaignstring | A unique campaign name, identifies the voucher’s parent campaign.Example:Gift Card Campaign |
campaign_idstring | Assigned by the Voucherify API, identifies the voucher’s parent campaign.Example:camp_FNYR4jhqZBM9xTptxDGgeNBV |
categorystring | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. |
category_idstring | Unique category ID assigned by Voucherify.Example:cat_0bb343dee3cdb5ec0c |
typestring | Defines the type of the voucher.Available values: GIFT_VOUCHER , DISCOUNT_VOUCHER , LOYALTY_CARD |
discount | See: Discount |
giftobject | Object representing gift parameters. Child attributes are present only if type is GIFT_VOUCHER . Defaults to null .Attributes Descriptionamountinteger
Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for 100.00.

Example:

10000


subtracted\_amountinteger 

Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for 100.00.
balanceinteger
Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Example:
500
effectstring
Defines how the credits are applied to the customer’s order.
Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS |
loyalty_cardobject | Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD . Defaults to null .Attributes Descriptionpointsinteger
Total number of points added to the loyalty card over its lifespan.
Example:
7000
balanceinteger
Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points.
Example:
6970
next_expiration_datestring
The next closest date when the next set of points are due to expire.
Example:
2023-05-30
next_expiration_pointsinteger
The amount of points that are set to expire next.
pending_pointsinteger
Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually.
expired_pointsinteger
Shows the total number of expired points over the lifetime of the loyalty card.
subtracted_pointsinteger
Shows the total number of subtracted points over the lifetime of the loyalty card. |
start_datestring | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.Example:2021-12-01T00:00:00.000Z |
expiration_datestring | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.Example:2021-12-31T00:00:00.000Z |
validity_timeframe | See: Validity Timeframe |
validity_day_of_week | See: Validity Day Of Week |
validity_hours | See: Validity Hours |
activeboolean , null | A flag to toggle the voucher on or off. You can disable a voucher even though it’s within the active period defined by the start_date and expiration_date .- true indicates an active voucher |
-
false
indicates an inactive voucher | | additional_infostring
| An optional field to keep any extra textual information about the code such as a code description and details. | | metadataobject
| The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | | assets | See: Voucher Assets | | is_referral_codeboolean
,null
| Flag indicating whether this voucher is a referral code;true
for campaign typeREFERRAL_PROGRAM
. | | created_atstring
| Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.Example:2021-12-22T10:13:06.487Z | | updated_atstring
| Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.Example:2021-12-22T10:14:45.316Z | | holder_idstring
| Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.Example:cust_eWgXlBBiY6THFRJwX45Iakv4 | | referrer_idstring
| Unique identifier of the referring person.Example:cust_Vzck5i8U3OhcEUFY6MKhN9Rv | | objectstring
| The type of the object represented by JSON. Default isvoucher
. | | publishobject
| Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.Attributes Descriptionobjectstring The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. countinteger Publication events counter. Example: 0 urlstring The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications Example: /v1/vouchers/WVPblOYX/publications?page=1&limit=10 | | redemptionobject
| Stores a summary of redemptions that have been applied to the voucher.Attributes Descriptionquantityinteger How many times a voucher can be redeemed. A null value means unlimited. redeemed_quantityinteger How many times a voucher has already been redeemed. Example: 1 redeemed_pointsinteger Total loyalty points redeemed. Example: 100000 objectstring The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. urlstring The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions Example: /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
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. |
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 |
Discount
Contains information about discount. One of: Amount, Unit, Unit Multiple, Percent, FixedValidity 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 |
Validation Rule Assignments List
Attributes | Description |
---|---|
objectstring | The type of the object represented by JSON. This object stores information about validation rule assignments. |
data_refstring | Identifies the name of the JSON property that contains the array of validation rule assignments. |
dataarray | A dictionary that contains an array of validation rule assignments.Array of Validation Rule Assignment |
totalinteger | Total number of validation rule assignments. |
Voucher
This is an object representing a voucher with categories and validation rules assignments. All of:- Voucher Base
-
Attributes Description categories array
Contains details about the category.Array of Category validation_rules_assignments See: Validation Rules Assignments List
Product
This is an object representing a product. This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns. All of:- Product without Skus Object
-
Attributes Description skus See: Skus List For Product
SKU Object
Attributes | Description |
---|---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify.Example:sku_0b1621b319d248b79f |
source_idstring , null | A unique SKU identifier from your inventory system.Example:sku_source_id_4 |
product_idstring | The parent product’s unique ID.Example:prod_0b15f6b9f650c16990 |
skustring , null | Unique user-defined SKU name.Example:Large Pink Shirt |
priceinteger , null | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000 . |
currencystring , null | SKU price currency.Example:USD |
attributesobject | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. |
image_urlstring , null | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. |
metadataobject | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
created_atstring | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.Example:2022-05-17T10:36:30.187Z |
updated_atstring , null | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.Example:2022-05-17T10:55:09.137Z |
objectstring | The type of the object represented by JSON. This object stores information about the SKU .Available values: sku |
Voucher Assets
Attributes | Description |
---|---|
qrobject | Stores Quick Response (QR) representation of encrypted code.Attributes Descriptionidstring Encrypted voucher code ID. Example: U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q== urlstring URL to QR code Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code. size: integer value from 1 to 100 format: string, either png (default) or svg Example: https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D |
barcodeobject | Stores barcode representation of encrypted code.Attributes Descriptionidstring Encrypted voucher code ID. Example: U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ== urlstring URL to barcode Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code. size: integer value from 1 to 100 format: string, either png (default) or svg Example: https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D |
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 assignmentAvailable 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 | Formula used to dynamically calculate the discount. |
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 | 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_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 | Formula used to dynamically calculate the discount. |
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_formula parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value. |
fixed_amount_formulastring | 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_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Validation Rule Assignment
Attributes | Description |
---|---|
idstring | Validation rule assignment ID.Example:asgm_74F7QZoYbUoljwQO |
rule_idstring | Validation rule ID.Example:val_4j7DCRm2IS59 |
related_object_idstring | The resource ID to which the validation rule was assigned.Example:v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT |
related_object_typestring | The type of resource to which the validation rule was assigned.Available values: voucher , campaign , earning_rule , reward_assignment , promotion_tier , distribution |
created_atstring | 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 |
objectstring | The type of the object represented by the ID.Available values: validation_rules_assignment |
Product without Skus Object
Attributes | Description |
---|---|
idstring | Unique product ID assigned by Voucherify.Example:prod_0b1da8105693710357 |
source_idstring , null | Unique product source ID.Example:productSourceID16 |
namestring , null | Unique user-defined product name.Example:T-shirt |
priceinteger , null | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000 . |
attributesarray | A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"] . Each child SKU can have a unique value for a given attribute. |
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. It can be used to create product collections. |
image_urlstring , null | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.Example:https://images.com/original.jpg |
created_atstring | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.Example:2022-05-23T06:52:55.008Z |
updated_atstring , null | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.Example:2022-05-23T09:24:07.405Z |
objectstring | The type of the object represented by JSON. This object stores information about the product.Available values: product |
Skus List For Product
Attributes | Description |
---|---|
objectstring | The type of the object represented by JSON. This object stores information about SKUs. |
data_refstring | Identifies the name of the JSON property that contains the array of SKUs. |
dataarray | A dictionary that contains an array of SKUs.Array of SKU Object |
totalinteger | Total number of SKUs in the product. |
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 | Formula used to dynamically calculate the number of units. |
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