Skip to main content

Redemptions Redeem Response Body

AttributesDescription
redemptionsarrayArray of Redemption
parent_redemptionSee: Redemption
orderContains the order details associated with the redemption.Order Calculated
inapplicable_redeemablesarrayLists validation results of each inapplicable redeemable.Array of Inapplicable Redeemable
skipped_redeemablesarrayLists validation results of each redeemable. If a redeemable can be applied, the API returns "status": "APPLICABLE".Array of Skipped Redeemable

Redemption

AttributesDescription
idstringUnique redemption ID.Example:r_0bc92f81a6801f9bca
objectstringThe type of object represented by the JSONAvailable values: redemption
datestringTimestamp representing the date and time when the object was created in ISO 8601 format.Example:2021-12-22T10:13:06.487Z
customer_idstring, nullUnique customer ID of the redeeming customer.Example:cust_i8t5Tt6eiKG5K79KQlJ0Vs64
tracking_idstring, nullHashed customer source ID.
metadataobject, nullThe metadata object stores all custom attributes assigned to the redemption.
amountintegerA 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.Example:10000
redemptionstring, nullUnique redemption ID of the parent redemption.Example:r_0c656311b5878a2031
resultstringRedemption result.Available values: SUCCESS, FAILURE
statusstringRedemption status.Available values: SUCCEEDED, FAILED, ROLLED_BACK
related_redemptionsobjectAttributes 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 in ISO 8601 format. Example: 2021-12-22T10:13:06.487Z 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 in ISO 8601 format. Example: 2021-12-22T10:13:06.487Z
failure_codestringIf the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.Example:customer_rules_violated
failure_messagestringIf the result is FAILURE, this parameter will provide a more expanded reason as to why the redemption failed.
orderOrder Calculated No Customer Data
channelobjectDefines 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. Example: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH channel_typestring The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard and an API corresponds to the API. Available values: USER, API
customerSimple Customer
related_object_typestringDefines the related object.Available values: voucher, promotion_tier, redemption
related_object_idstringUnique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
voucherDefines the details of the voucher being redeemed.Voucher
promotion_tierContains details of the promotion tier and the parent campaign.Promotion Tier
rewardSee: Redemption Reward Result
giftobjectContains the amount being subtracted from the gift card for the redemption.Attributes Descriptionamountinteger The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00).
loyalty_cardobjectStores the number of points being added back to the loyalty card for the reward redemption rollback.Attributes Descriptionpointsinteger Number of points being added back to the loyalty card for the reward redemption rollback.

Order Calculated

All of:
  1. Order Response Base
  2. Order Calculated

    AttributesDescription
    customerOne of: Customer With Summary Loyalty Referrals, Customer Id
    referrerOne of: Referrer With Summary Loyalty Referrals, Referrer Id

Inapplicable Redeemable

AttributesDescription
statusstringIndicates whether the redeemable can be applied or not applied based on the validation rules.Available values: INAPPLICABLE
idstringRedeemable ID, i.e. the voucher code.
objectstringRedeemable’s object type.Available values: voucher, promotion_tier
resultobjectAttributes Descriptionerror See: Error Object

Skipped Redeemable

AttributesDescription
statusstringIndicates whether the redeemable can be applied or not applied based on the validation rules.Available values: SKIPPED
idstringRedeemable ID, i.e. the voucher code.
objectstringRedeemable’s object type.Available values: voucher, promotion_tier
resultobjectAttributes Description

Order Calculated No Customer Data

All of:
  1. Order Response Base
  2. Order Customer And Referrer Ids Objects

    AttributesDescription
    customerIf only customer_id was provided, customer return data will be limited.Customer Id
    referrerIf only referrer_id was provided, referrer return data will be limited.Referrer Id

Simple Customer

AttributesDescription
idstringThe ID of an existing customer that will be linked to redemption in this request.
source_idstringA unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
namestringCustomer’s first and last name.
emailstringCustomer’s email address.
metadataobjectA set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.
objectstringThe type of object represented by JSON.Available values: customer

Voucher

AttributesDescription
idstringAssigned by the Voucherify API, identifies the voucher.Example:v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
codestringA code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.Example:WVPblOYX
campaignstringA unique campaign name, identifies the voucher’s parent campaign.Example:Gift Card Campaign
campaign_idstringAssigned by the Voucherify API, identifies the voucher’s parent campaign.Example:camp_FNYR4jhqZBM9xTptxDGgeNBV
categorystringTag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
category_idstringUnique category ID assigned by Voucherify.Example:cat_0bb343dee3cdb5ec0c
categoriesarrayContains details about the category.Array of Category
typestringDefines the type of the voucher.Available values: GIFT_VOUCHER, DISCOUNT_VOUCHER, LOYALTY_CARD
discountSee: Discount
giftobjectObject 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. Value is multiplied by 100 to precisely represent 2 decimal places. For example, 100 amount is written as 10000.

Example:

10000


balanceinteger 

Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, 100 amount is written as 10000. Example: 500 effectstring Defines how the credits are applied to the customer’s order. Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
loyalty_cardobjectObject representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.Attributes Descriptionpointsinteger Total points incurred over lifespan of loyalty card. Example: 7000 balanceinteger Points available for reward redemption. 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.
start_datestringActivation 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_datestringExpiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.Example:2021-12-31T00:00:00.000Z
validity_timeframeobjectSet recurrent time periods when the voucher is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.Attributes Descriptiondurationstring Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher 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, a voucher with an interval of P2D will be active every other day. Example: P2D
validity_day_of_weekarrayInteger array corresponding to the particular days of the week in which the voucher is valid.- 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday | | 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 type REFERRAL_PROGRAM. | | created_atstring | Timestamp representing the date and time when the voucher was created in 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 ID of voucher owner.Example:cust_eWgXlBBiY6THFRJwX45Iakv4 | | holder | See: Simple Customer | | objectstring | The type of object represented by JSON. Default is voucher. | | distributionsarray | Array of: | | deletedboolean | Flag indicating whether this voucher is deleted. | | validation_rules_assignments | See: Validation Rules Assignments List | | publishobject | This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or publish voucher API method.Required Optionaltype:LOYALTY_CARD type:DISCOUNT_VOUCHER is_referral_code:true type:GIFT_VOUCHERAttributes Descriptionobjectstring The type of 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_amountinteger Total amount redeemed. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 balance is written as 10000. Example: 100000 redeemed_pointsinteger Total loyalty points redeemed. Example: 100000 objectstring The type of 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 |

Promotion Tier

AttributesDescription
idstringUnique promotion tier ID.Example:promo_63fYCt81Aw0h7lzyRkrGZh9p
created_atstringTimestamp representing the date and time when the promotion tier was created in ISO 8601 format.Example:2021-12-15T11:34:01.333Z
updated_atstringTimestamp representing the date and time when the promotion tier was updated in ISO 8601 format.Example:2022-02-09T09:20:05.603Z
namestringName of the promotion tier.
bannerstringText to be displayed to your customers on your website.
actionobjectContains details about the discount applied by the promotion tier.Attributes Descriptiondiscount See: Discount
metadataobjectThe 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.
hierarchyintegerThe 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_idstringPromotion unique ID.
campaignobjectContains 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_timeframeobject Recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day. Attributes Descriptionintervalstring Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an interval of P2D will be active every other day. durationstring Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a duration of P1D will be valid for a duration of one day. validity_day_of_weekarray Integer array corresponding to the particular days of the week in which the campaign is valid. 0 Sunday 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 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 object represented by the campaign object. This object stores information about the campaign.
campaign_idstringPromotion tier’s parent campaign’s unique ID.
activebooleanA 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_timeframeobject | Set recurrent time periods when the promotion tier is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.Attributes Descriptionintervalstring Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an interval of P2D will be active every other day. durationstring Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a duration of P1D will be valid for a duration of one day. | | validity_day_of_weekarray | Integer array corresponding to the particular days of the week in which the promotion tier is valid.- 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday | | 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 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

AttributesDescription
customerSimple Customer
assignment_idstring, nullUnique reward assignment ID assigned by Voucherify.
voucherDefines of the voucher.Voucher
productDefines of the product.Product
skuDefines of the sku.SKU Object
loyalty_tier_idstring, nullUnique loyalty tier ID assigned by Voucherify.
idstringUnique reward ID.Example:rew_0bc92f81a6801f9bca
namestringName of the reward.Example:Reward Name
objectstringThe type of object represented by the JSONAvailable values: reward
created_atstringTimestamp representing the date and time when the redemption was created in ISO 8601 format.Example:2021-12-22T10:13:06.487Z
updated_atstringTimestamp in ISO 8601 format indicating when the reward was updated.Example:2022-10-03T12:24:58.008Z
parametersobjectThese 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. 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 A unique SKU ID 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.
typestringReward type.Available values: CAMPAIGN, COIN, MATERIAL

Order Response Base

AttributesDescription
idstringUnique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
source_idstring, nullUnique source ID of an existing order that will be linked to the redemption of this request.
created_atstringTimestamp representing the date and time when the order was created in ISO 8601 format.Example:2021-12-22T10:13:06.487Z
updated_atstring, nullTimestamp representing the date and time when the order was last updated in ISO 8601 format.Example:2021-12-22T10:14:45.316Z
statusstringThe order status.Available values: CREATED, PAID, CANCELED, FULFILLED
amountintegerA 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_amountintegerA 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_amountintegerSum of all order-level discounts applied to the order.
items_discount_amountintegerSum of all product-specific discounts applied to the order.
total_discount_amountintegerSum of all order-level AND all product-specific discounts applied to the order.
total_amountintegerOrder amount after undoing all the discounts through the rollback redemption.
applied_discount_amountintegerThis field shows the order-level discount applied.
items_applied_discount_amountintegerSum of all product-specific discounts applied in a particular request.sum(items, i => i.applied_discount_amount)
total_applied_discount_amountintegerSum of all order-level AND all product-specific discounts applied in a particular request.total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount
itemsarrayArray of items applied to the order.Array of Order Item Calculated
metadataobjectA 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.
customer_idstring, nullUnique customer ID of the customer making the purchase.Example:cust_7iUa6ICKyU6gH40dBU25kQU1
referrer_idstring, nullUnique referrer ID.Example:cust_nM4jqPiaXUvQdVSA6vTRUnix
objectstringThe type of object represented by JSON.Available values: order
redemptionsobjectAttributes Description[propertyName] See: Order Redemptions

Customer With Summary Loyalty Referrals

All of:
  1. Customer Response Data

    AttributesDescription
    idstringThe ID of an existing customer that will be linked to redemption in this request.
    source_idstringA unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
    summaryCustomer Summary
    loyaltyCustomer Loyalty
    referralsCustomer Referrals
    system_metadataobjectObject used to store system metadata information.
    created_atstringTimestamp representing the date and time when the customer was created in ISO 8601 format.Example:2022-08-30T06:32:07.380Z
    updated_atstringTimestamp representing the date and time when the customer was updated in ISO 8601 format.Example:2022-08-31T06:32:07.380Z
    assetsobjectContains information about the customer’s cockpit.Attributes Descriptioncockpit_urlstring Customer’s cockpit URL address.
    objectstringThe type of object represented by JSON.Available values: customer
  2. Customer Base

Customer Id

AttributesDescription
idstringA unique identifier of an existing customer.
objectstringThe type of object represented by JSON.Available values: customer

Referrer With Summary Loyalty Referrals

Customer With Summary Loyalty Referrals

Referrer Id

Customer Id

Error Object

AttributesDescription
codeintegerError’s HTTP status code.
keystringShort string describing the kind of error which occurred.
messagestringA human-readable message providing a short description about the error.
detailsstringA human-readable message providing more details about the error.
request_idstringThis ID is useful when troubleshooting and/or finding the root cause of an error response by our support team.Example:v-0a885062c80375740f
resource_idstringUnique resource ID that can be used in another endpoint to get more details.Example:rf_0c5d710a87c8a31f86
resource_typestringThe resource type.Example:voucher

Category

AttributesDescription
idstringUnique category ID assigned by Voucherify.
namestringCategory name.
hierarchyintegerCategory hierarchy.
objectstringThe type of object represented by the JSON. This object stores information about the category.Available values: category
created_atstringTimestamp representing the date and time when the category was created in ISO 8601 format.Example:2022-07-14T10:45:13.156Z
updated_atstringTimestamp representing the date and time when the category was updated in ISO 8601 format.Example:2022-08-16T10:52:08.094Z
stacking_rules_typestringThe type of the stacking rule eligibility.Available values: JOINT, EXCLUSIVE

Discount

Contains information about discount. One of: Amount, Unit, Unit Multiple, Percent, Fixed

Voucher Assets

AttributesDescription
qrobjectStores 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
barcodeobjectStores 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

Validation Rules Assignments List

AttributesDescription
objectstringThe type of object represented by JSON. This object stores information about validation rules assignments.Available values: list
data_refstringIdentifies the name of the attribute that contains the array of validation rules assignments.Available values: data
dataarrayContains array of validation rules assignments.Array of Business Validation Rule Assignment
totalintegerTotal number of validation rules assignments.

Validation Rule Assignments List

AttributesDescription
objectstringThe type of object represented by JSON. This object stores information about validation rule assignments.
data_refstringIdentifies the name of the JSON property that contains the array of validation rule assignments.
dataarrayA dictionary that contains an array of validation rule assignments.Array of Validation Rule Assignment
totalintegerTotal number of validation rule assignments.

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:
  1. Product without Skus Object
  2. AttributesDescription
    skusSee: Skus List For Product

SKU Object

AttributesDescription
idstringA unique identifier that represents the SKU and is assigned by Voucherify.Example:sku_0b1621b319d248b79f
source_idstring, nullA unique SKU identifier from your inventory system.Example:sku_source_id_4
product_idstringThe parent product’s unique ID.Example:prod_0b15f6b9f650c16990
skustring, nullUnique user-defined SKU name.Example:Large Pink Shirt
priceinteger, nullUnit 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, nullSKU price currency.Example:USD
attributesobjectThe 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, nullThe HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
metadataobjectThe 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.
created_atstringTimestamp representing the date and time when the SKU was created in ISO 8601 format.Example:2022-05-17T10:36:30.187Z
updated_atstring, nullTimestamp representing the date and time when the SKU was updated in ISO 8601 format.Example:2022-05-17T10:55:09.137Z
objectstringThe type of object represented by JSON. This object stores information about the SKU.Available values: sku

Order Item Calculated

AttributesDescription
sku_idstringA unique SKU ID assigned by Voucherify.
product_idstringA unique product ID assigned by Voucherify.
related_objectstringUsed along with the source_id property, can be set to either sku or product.Available values: product, sku
source_idstringThe 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.
quantityintegerThe quantity of the particular item in the cart.
discount_quantityintegerNumber of dicounted items.
initial_quantityintegerA positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items’ quantity.
amountintegerThe total amount of the order item (price * quantity).
discount_amountintegerSum of all order-item-level discounts applied to the order.
applied_discount_amountintegerThis field shows the order-level discount applied.
initial_amountintegerA 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.
total_applied_discount_amountintegerSum of all order-level AND all product-specific discounts applied in a particular request.total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount
priceintegerUnit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.
subtotal_amountintegerFinal order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.subtotal_amount=amount-applied_discount_amount
productobjectAn object containing details of the related product.Attributes Descriptionidstring A unique identifier that represents the product and is assigned by Voucherify. source_idstring The merchant’s product ID (if it is different than Voucherify’s product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. overrideboolean The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. namestring Product name. metadataobject A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. pricenumber Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).
skuobjectAn object containing details of the related SKU.Attributes Descriptionidstring A unique identifier that represents the SKU and is assigned by Voucherify. source_idstring The merchant’s SKU ID (if it is different than Voucherify’s SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. overrideboolean The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. skustring The SKU name. pricenumber SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).
objectstringThe type of object represented by JSON.Available values: order_item
metadataobjectA 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.

Order Redemptions

AttributesDescription
datestringTimestamp representing the date and time when the redemption was created in ISO 8601 format.Example:2022-09-02T17:06:56.649Z
rollback_idstringUnique ID of the redemption rollback.Example:rr_0c63c84eb78ee0a6c0
rollback_datestringTimestamp representing the date and tiem when the redemption rollback was created in ISO 8601 format.Example:2023-01-31T14:18:37.150Z
related_object_typestringThe source of the incentive.
related_object_idstringUnique ID of the parent redemption.Example:r_0ba186c4824e4881e1
related_object_parent_idstringRepresent’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.
stackedarrayContains a list of unique IDs of child redemptions, which belong to the stacked incentives.
rollback_stackedarrayLists the rollback redemption IDs of the particular child redemptions.

Customer Summary

AttributesDescription
redemptionsSee: Customer Summary Redemptions
ordersSee: Customer Summary Orders

Customer Loyalty

AttributesDescription
pointsintegerCustomer’s loyalty points.
referred_customersintegerTotal number of customers referred by the customer.
campaignsobjectContains campaigns with details about point balances and how many customers were referred by the customer.Attributes Description[propertyName]object Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign. Attributes Descriptionpointsinteger Remaining point balance in campaign. loyalty_tierstring Customer’s loyalty tier within the campaign. Example: ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x referred_customersinteger Number of customers referred by the customer in campaign.

Customer Referrals

AttributesDescription
totalintegerTotal number of times this customer received a referral, i.e. was referred by another customer.
campaignsarrayContains an array of campaigns that served as the source of a referral for the customer.Array of:### Customer Referrals Campaigns ItemAttributes Descriptioncampaign_idstring Unique campaign ID, assigned by Voucherify. Example: camp_rRsfatlwN7unSeUIJDCYedal referrer_idstring Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. Example: cust_sehkNIi8Uq2qQuRqSr7xn4Zi related_object_idstring Related object id Example: r_0b9d4cc4aa164dd073 related_object_typestring Related object type, i.e. redemption. datestring Timestamp representing the date and time when the customer was referred in ISO 8601 format. Example: 2022-08-30T10:19:39.196Z

Customer Base

AttributesDescription
namestringCustomer’s first and last name.
descriptionstringAn arbitrary string that you can attach to a customer object.
emailstringCustomer’s email address.
phonestringCustomer’s phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
birthdaystringDeprecated Customer’s birthdate; format YYYY-MM-DD.
birthdatestringCustomer’s birthdate; format YYYY-MM-DD.
addressobject, nullCustomer’s address.Attributes Descriptioncitystring City statestring State line_1string First line of address. line_2string Second line of address. countrystring Country. postal_codestring Postal code.
metadataobjectA set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.

Amount

AttributesDescription
typestringDefines the type of the voucher.Available values: AMOUNT
amount_offnumberAmount 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_limitintegerMaximum discount amount per order.
effectDefines how the discount is applied to the customer’s order.Discount Amount Vouchers Effect Types
is_dynamicbooleanFlag indicating whether the discount was calculated using a formula.

Unit

AttributesDescription
typestringDiscount type.Available values: UNIT
unit_offintegerNumber of units to be granted a full value discount.
unit_off_formulastring
effectDefines how the unit is added to the customer’s order.Discount Unit Vouchers Effect Types
unit_typestringThe product deemed as free, chosen from product inventory (e.g. time, items).
productContains information about the product.Simple Product Discount Unit
skuSee: Simple Sku Discount Unit
is_dynamicbooleanFlag indicating whether the discount was calculated using a formula.

Unit Multiple

AttributesDescription
typestringDiscount type.Available values: UNIT
effectstringDefines how the discount is applied to the customer’s order.Available values: ADD_MANY_ITEMS
unitsarrayArray of One Unit

Percent

AttributesDescription
typestringDefines the type of the voucher.Available values: PERCENT
percent_offnumberThe percent discount that the customer will receive.
percent_off_formulastring
amount_limitnumberUpper 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_limitintegerMaximum discount amount per order.
effectDefines how the discount is applied to the customer’s order.Discount Percent Vouchers Effect Types
is_dynamicbooleanFlag indicating whether the discount was calculated using a formula.

Fixed

AttributesDescription
typestringDefines the type of the voucher.Available values: FIXED
fixed_amountnumberSets 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
effectDefines how the discount is applied to the customer’s order.Discount Fixed Vouchers Effect Types
is_dynamicbooleanFlag indicating whether the discount was calculated using a formula.

Business Validation Rule Assignment

AttributesDescription
idstringThe unique identifier for a assignment
rule_idstringThe unique identifier for a rule
related_object_idstringThe unique identifier for a related object
related_object_typestringThe type of related object
created_atstringTimestamp representing the date and time when the object was created in ISO 8601 format.Example:2022-03-09T11:19:04.819Z
updated_atstringTimestamp representing the date and time when the object was last updated in ISO 8601 format.Example:2022-03-09T11:19:04.819Z
objectstringThe type of object represented by JSON.Available values: validation_rules_assignment
validation_statusstringThe validation status of the assignmentAvailable values: VALID, PARTIALLY_VALID, INVALID
validation_omitted_rulesarrayThe list of omitted rules

Validation Rule Assignment

AttributesDescription
idstringValidation rule assignment ID.Example:asgm_74F7QZoYbUoljwQO
rule_idstringValidation rule ID.Example:val_4j7DCRm2IS59
related_object_idstringThe resource ID to which the validation rule was assigned.Example:v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
related_object_typestringThe type of resource to which the validation rule was assigned.Available values: voucher, campaign, earning_rule, reward_assignment, promotion_tier, distribution
created_atstringTimestamp representing the date and time when the validation rule assignment was created in ISO 8601 format.Example:2022-02-17T08:18:15.085Z
objectstringThe type of object represented by the ID.Available values: validation_rules_assignment

Product without Skus Object

AttributesDescription
idstringUnique product ID assigned by Voucherify.Example:prod_0b1da8105693710357
source_idstring, nullUnique product source ID.Example:productSourceID16
namestring, nullUnique user-defined product name.Example:T-shirt
priceinteger, nullUnit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.
attributesarrayA 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.
metadataobjectThe 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.
image_urlstring, nullThe 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_atstringTimestamp representing the date and time when the product was created in ISO 8601 format.Example:2022-05-23T06:52:55.008Z
updated_atstring, nullTimestamp representing the date and time when the product was updated in ISO 8601 format.Example:2022-05-23T09:24:07.405Z
objectstringThe type of object represented by JSON. This object stores information about the product.Available values: product

Skus List For Product

AttributesDescription
objectstringThe type of object represented by JSON. This object stores information about SKUs.
data_refstringIdentifies the name of the JSON property that contains the array of SKUs.
dataarrayA dictionary that contains an array of SKUs.Array of SKU Object
totalintegerTotal number of SKUs in the product.

Customer Summary Redemptions

AttributesDescription
total_redeemedintegerTotal number of redemptions made by the customer.
total_failedintegerTotal number of redemptions that failed.
total_succeededintegerTotal number of redemptions that succeeded.
total_rolled_backintegerTotal number of redemptions that were rolled back for the customer.
total_rollback_failedintegerTotal number of redemption rollbacks that failed.
total_rollback_succeededintegerTotal number of redemption rollbacks that succeeded.
giftobjectSummary of gift card credits.Attributes Descriptionredeemed_amountinteger Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for 100.00.


amount\_to\_gointeger 

Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for 100.00.
loyalty_cardobjectSummary of loyalty points.Attributes Descriptionredeemed_pointsinteger Total number of loyalty points redeemed by the customer. points_to_gointeger Sum of remaining available point balance across all loyalty cards.

Customer Summary Orders

AttributesDescription
total_amountintegerThe total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.
total_countintegerTotal number of orders made by the customer.
average_amountintegerAverage amount spent on orders. total_amount ÷ total_count. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.
last_order_amountintegerAmount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.
last_order_datestringTimestamp representing the date and time of the customer’s last order in ISO 8601 format.Example:2022-08-30T11:51:08.029Z

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

AttributesDescription
idstringUnique product ID, assigned by Voucherify.
source_idstringProduct’s source ID.
namestringProduct name.

Simple Sku Discount Unit

AttributesDescription
idstringUnique SKU ID, assigned by Voucherify.
source_idstringProduct variant’s source ID.
namestringSku name

One Unit

AttributesDescription
unit_offnumberNumber of units to be granted a full value discount.
unit_off_formulastring
effectstringDefines how the unit is added to the customer’s order.Available values: ADD_NEW_ITEMS, ADD_MISSING_ITEMS
unit_typestringThe product deemed as free, chosen from product inventory (e.g. time, items).
productContains information about the product.Simple Product Discount Unit
skuContains 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
I