Redemption Object

Redemptions Redeem Response Body

AttributesDescription
redemptions
array
Array of Simple Redemption
parent_redemptionSee: Simple Redemption
order

Contains the order details associated with the redemption.

Order Calculated
inapplicable_redeemables
array

Lists validation results of each inapplicable redeemable.

Array of Inapplicable Redeemable
skipped_redeemables
array

Lists validation results of each redeemable. If a redeemable can be applied, the API returns "status": "APPLICABLE".

Array of Skipped Redeemable

Simple Redemption

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

customer_id
string, null

Unique customer ID of the redeeming customer.

Example:

cust_i8t5Tt6eiKG5K79KQlJ0Vs64

tracking_id
string

Hashed customer source ID.

date
string

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

amount
integer

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.
In the case of redemption rollback, the numbers are expressed as negative integers.

Example:

10000

orderSee: Simple Order
rewardSee: Simple Redemption Reward Result
customerSee: Simple Customer
result
string

Redemption result.

Available values: SUCCESS, FAILURE
status
string, null
Available values: SUCCEEDED, FAILED, ROLLED BACK
voucher

Defines the details of the voucher being redeemed.

Simple Voucher
promotion_tierSee: Simple Promotion Tier
redemption
string

Unique redemption ID of the parent redemption.

Example:

r_0c656311b5878a2031

object
string

The type of the object represented by the JSON. This object stores information about the redemption.

Order Calculated

All of:

  1. Order Response Base
  2. Order Calculated

    AttributesDescription
    customerOne of: Customer Id
    referrerOne of: Referrer Id

Inapplicable Redeemable

AttributesDescription
status
string

Indicates whether the redeemable can be applied or not applied based on the validation rules.

Available values: INAPPLICABLE
id
string

Redeemable ID, i.e. the voucher code.

object
string

Redeemable's object type.

Available values: voucher, promotion_tier
result
object

Includes the error object with details about the reason why the redeemable is inapplicable

AttributesDescription
errorSee: Error Object
details
object

Provides details about the reason why the redeemable is inapplicable.

AttributesDescription
message
string

Generic message from the message string shown in the error object or the message configured in a validation rule.

key
string

Generic message from the key string shown in the error object.

metadata
object

The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.

categories
array
Array of Category

Skipped Redeemable

AttributesDescription
status
string

Indicates whether the redeemable can be applied or not applied based on the validation rules.

Available values: SKIPPED
id
string

Redeemable ID, i.e. the voucher code.

object
string

Redeemable's object type.

Available values: voucher, promotion_tier
result
object

Provides details about the reason why the redeemable is skipped.

metadata
object

The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.

categories
array
Array of Category

Simple Order

AttributesDescription
id
string

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

source_id
string

Unique source ID of an existing order that will be linked to the redemption of this request.

status
string

The order status.

Available values: CREATED, PAID, CANCELED, FULFILLED
customer_id
string, null

Unique customer ID of the customer making the purchase.

Example:

cust_7iUa6ICKyU6gH40dBU25kQU1

referrer_id
string, null

Unique referrer ID.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

discount_amount
integer

Sum of all order-level discounts applied to the order.

applied_discount_amount
integer

This field shows the order-level discount applied.

items_discount_amount
integer

Sum of all product-specific discounts applied to the order.

items_applied_discount_amount
integer

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

total_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied to the order.

total_applied_discount_amount
integer

Sum 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

total_amount
integer

Order amount after undoing all the discounts through the rollback redemption.

items
array

Array of items applied to the order.

Array of Simple Order Item
metadata
object

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.

object
string

The type of the object represented by JSON.

Available values: order

Simple Redemption Reward Result

AttributesDescription
customerSee: Simple Customer
assignment_id
string

Unique reward assignment ID assigned by Voucherify.

voucher

Defines of the voucher.

Simple Voucher
product

Defines of the product.

Simple Product
sku

Defines of the sku.

Simple Sku
loyalty_tier_id
string

Unique loyalty tier ID assigned by Voucherify.

id
string

Unique reward ID, assigned by Voucherify.

Example:

rew_nIy4gHpQHle2c3pNMwuj7G6j

object
string

The type of the object represented by the JSON. This object stores information about the reward.

Available values: reward
name
string

Reward name.

created_at
string

Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.

Example:

2022-08-11T14:49:22.586Z

updated_at
string, null

Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-11T16:01:34.885Z

parameters
object

Defines how the reward is generated.

type
string

Reward type.

Available values: CAMPAIGN, COIN, MATERIAL

Simple Customer

AttributesDescription
id
string

The ID of an existing customer that will be linked to redemption in this request.

source_id
string

A 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.

name
string

Customer's first and last name.

email
string

Customer's email address.

metadata
object

A 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.

object
string

The type of the object represented by JSON.

Available values: customer

Simple Voucher

AttributesDescription
id
string

A unique identifier that represents the voucher assigned by Voucherify.

code
string

Voucher code.

gift

Gift object response.

Gift
discountSee: Discount
loyalty_card
object

Defines the loyalty card details.

Simple Loyalty Card
type
string

Type of the voucher.

Available values: DISCOUNT_VOUCHER, LOYALTY_CARD, GIFT_VOUCHER
campaign
string

Campaign name.

campaign_id
string

Campaign unique ID.

is_referral_code
boolean

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

holder_id
string

Unique customer ID of the campaign owner.

Example:

cust_eWgXlBBiY6THFRJwX45Iakv4

referrer_id
string

Unique identifier of the referrer assigned by Voucherify.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

category_id
string, null

Unique identifier of the category that this voucher belongs to.

Example:

cat_0b6152ce12414820dc

categories
array

Contains details about the category.

Array of Category
active
boolean

Shows whether the voucher is on or off. true indicates an active voucher and false indicates an inactive voucher.

created_at
string

Timestamp representing the date and time when the order was created. Timestamp is presented in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string

Timestamp representing the date and time when the voucher was updated in the ISO 8601 format.

Example:

2024-01-01T11:11:11.111Z

redemption
object

Defines the redemption limits on vouchers.

AttributesDescription
quantity
integer, null

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

start_date
string

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_date
string

Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.

Example:

2021-12-31T00:00:00.000Z

metadata
object

A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher.

object
string

The type of the object represented by JSON.

Available values: voucher

Simple Promotion Tier

AttributesDescription
id
string

Unique promotion tier ID.

Example:

promo_63fYCt81Aw0h7lzyRkrGZh9p

name
string

Name of the promotion tier.

banner
string

Text to be displayed to your customers on your website.

campaign
object

Contains details about promotion tier's parent campaign.

AttributesDescription
id
string

Unique campaign ID.

metadata
object

A set of custom key/value pairs that you can attach to a promotion tier. The metadata object stores all custom attributes assigned to the promotion tier.

Order Response Base

AttributesDescription
id
string

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

source_id
string, null

Unique source ID of an existing order that will be linked to the redemption of this request.

created_at
string

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_at
string, null

Timestamp representing the date and time when the order was last updated in ISO 8601 format.

Example:

2021-12-22T10:14:45.316Z

status
string

The order status.

Available values: CREATED, PAID, CANCELED, FULFILLED
amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

initial_amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

discount_amount
integer

Sum of all order-level discounts applied to the order.

items_discount_amount
integer

Sum of all product-specific discounts applied to the order.

total_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied to the order.

total_amount
integer

Order amount after undoing all the discounts through the rollback redemption.

applied_discount_amount
integer

This field shows the order-level discount applied.

items_applied_discount_amount
integer

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

total_applied_discount_amount
integer

Sum 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

items
array

Array of items applied to the order.

Array of Order Item
metadata
object

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.

customer_id
string, null

Unique customer ID of the customer making the purchase.

Example:

cust_7iUa6ICKyU6gH40dBU25kQU1

referrer_id
string, null

Unique referrer ID.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

object
string

The type of the object represented by JSON.

Available values: order
redemptions
object
AttributesDescription
[propertyName]See: Order Redemptions

Customer Id

AttributesDescription
id
string

A unique identifier of an existing customer.

object
string

The type of the object represented by JSON.

Available values: customer

Referrer Id

Customer Id

Error Object

AttributesDescription
code
integer

Error's HTTP status code.

key
string

Short string describing the kind of error which occurred.

message
string

A human-readable message providing a short description about the error.

details
string

A human-readable message providing more details about the error.

request_id
string

This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team.

Example:

v-0a885062c80375740f

resource_id
string

Unique resource ID that can be used in another endpoint to get more details.

Example:

rf_0c5d710a87c8a31f86

resource_type
string

The resource type.

Example:

voucher

Category

AttributesDescription
id
string

Unique category ID assigned by Voucherify.

name
string

Category name.

hierarchy
integer

Category hierarchy.

object
string

The type of the object represented by the JSON. This object stores information about the category.

Available values: category
created_at
string

Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.

Example:

2022-07-14T10:45:13.156Z

updated_at
string

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

stacking_rules_type
string

The type of the stacking rule eligibility.

Available values: JOINT, EXCLUSIVE

Validations Redeemable Skipped Result Limit Exceeded

AttributesDescription
key
string
Available values: applicable_redeemables_limit_exceeded
message
string
Example:

Applicable redeemables limit exceeded

Validations Redeemable Skipped Result Category Limit Exceeded

AttributesDescription
key
string
Available values: applicable_redeemables_per_category_limit_exceeded
message
string
Example:

Applicable redeemables limit per category exceeded

Validations Redeemable Skipped Result Redeemables Limit Exceeded

AttributesDescription
key
string
Available values: applicable_exclusive_redeemables_limit_exceeded
message
string
Example:

Applicable exclusive redeemables limit exceeded

Validations Redeemable Skipped Result Redeemables Category Limit Exceeded

AttributesDescription
key
string
Available values: applicable_exclusive_redeemables_per_category_limit_exceeded
message
string
Example:

Applicable exclusive redeemables limit per category exceeded

Validations Redeemable Skipped Result Exclusion Rules Not Met

AttributesDescription
key
string
Available values: exclusion_rules_not_met
message
string
Example:

Redeemable cannot be applied due to exclusion rules

Validations Redeemable Skipped Result Preceding Validation Failed

AttributesDescription
key
string
Available values: preceding_validation_failed
message
string
Example:

Redeemable cannot be applied due to preceding validation failure

Simple Order Item

AttributesDescription
id
string

Unique identifier of the order line item.

object
string

The type of the object represented by JSON. This object stores information about the order_item.

Available values: order_item
source_id
string

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

related_object
string

Used along with the source_id property, can be set to either SKU or product.

Available values: product, sku
product_id
string

Unique identifier of the product. It is assigned by Voucherify.

sku_id
string

Unique identifier of the SKU. It is assigned by Voucherify.

quantity
integer

Quantity of the particular item in the cart.

applied_quantity
integer

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

applied_quantity_amount
integer

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

discount_quantity
integer

Number of discounted items.

applied_discount_quantity
integer

Number of the discounted items applied in the transaction.

amount
integer

Total amount of the order item (price * quantity).

discount_amount
integer

Sum of all order-item-level discounts applied to the order.

applied_discount_amount
integer

Order-level discount amount applied in the transaction.

price
integer

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

subtotal_amount
integer

Final 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-discount_amount

Simple Product

AttributesDescription
id
string

Unique product ID.

source_id
string

Product source id.

name
string

Product name.

Simple Sku

AttributesDescription
id
string

Unique sku ID.

source_id
string

Sku source id.

sku
string

Sku name.

Gift

AttributesDescription
amount
number

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.

balance
number

Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS

Discount

Contains information about discount.

One of:

Amount, Unit, Unit Multiple, Percent, Fixed

Simple Loyalty Card

AttributesDescription
points
integer

Total points incurred over lifespan of loyalty card.

balance
integer

Points available for reward redemption.

next_expiration_date
string

The next closest date when the next set of points are due to expire.

next_expiration_points
integer

The amount of points that are set to expire next.

Order Item

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about the order_item.

Available values: order_item
sku_id
string

Unique identifier of the SKU. It is assigned by Voucherify.

product_id
string

Unique identifier of the product. It is assigned by Voucherify.

related_object
string

Used along with the source_id property, can be set to either sku or product.

Available values: product, sku
source_id
string

The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

quantity
integer

The quantity of the particular item in the cart.

discount_quantity
integer

Number of dicounted items.

initial_quantity
integer

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

amount
integer

The total amount of the order item (price * quantity).

discount_amount
integer

Sum of all order-item-level discounts applied to the order.

initial_amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

applied_discount_amount
integer

Order-level discount amount applied in the transaction.

applied_discount_quantity
integer

Number of the discounted items applied in the transaction.

applied_quantity
integer

Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

applied_quantity_amount
integer

Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.

price
integer

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

subtotal_amount
integer

Final 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-discount_amount

product
object

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

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.

override
boolean

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.

name
string

Product name.

metadata
object

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.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

sku
object

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

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.

override
boolean

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.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format.

Order Redemptions

AttributesDescription
date
string

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_id
string

Unique ID of the redemption rollback.

Example:

rr_0c63c84eb78ee0a6c0

rollback_date
string

Timestamp representing the date and tiem when the redemption rollback was created. The value is shown in the ISO 8601 format.

Example:

2023-01-31T14:18:37.150Z

related_object_type
string

The source of the incentive.

related_object_id
string

Unique ID of the parent redemption.

Example:

r_0ba186c4824e4881e1

related_object_parent_id
string

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.

stacked
array

Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.

rollback_stacked
array

Lists the rollback redemption IDs of the particular child redemptions.

Amount

AttributesDescription
type
string

Defines the type of the voucher.

Available values: AMOUNT
amount_off
number

Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.

amount_off_formula
string
aggregated_amount_limit
integer

Maximum discount amount per order.

effect

Defines how the discount is applied to the customer's order.

Discount Amount Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Unit

AttributesDescription
type
string

Discount type.

Available values: UNIT
unit_off
integer

Number of units to be granted a full value discount.

unit_off_formula
string
effect

Defines how the unit is added to the customer's order.

Discount Unit Vouchers Effect Types
unit_type
string

The product deemed as free, chosen from product inventory (e.g. time, items).

product

Contains information about the product.

Simple Product Discount Unit
skuSee: Simple Sku Discount Unit
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Unit Multiple

AttributesDescription
type
string

Discount type.

Available values: UNIT
effect
string

Defines how the discount is applied to the customer's order.

Available values: ADD_MANY_ITEMS
units
array
Array of One Unit

Percent

AttributesDescription
type
string

Defines the type of the voucher.

Available values: PERCENT
percent_off
number

The percent discount that the customer will receive.

percent_off_formula
string
amount_limit
number

Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

aggregated_amount_limit
integer

Maximum discount amount per order.

effect

Defines how the discount is applied to the customer's order.

Discount Percent Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Fixed

AttributesDescription
type
string

Defines the type of the voucher.

Available values: FIXED
fixed_amount
number

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_formula
string
effect

Defines how the discount is applied to the customer's order.

Discount Fixed Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

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
id
string

Unique product ID, assigned by Voucherify.

source_id
string

Product's source ID.

name
string

Product name.

Simple Sku Discount Unit

AttributesDescription
id
string

Unique SKU ID, assigned by Voucherify.

source_id
string

Product variant's source ID.

name
string

Sku name

One Unit

AttributesDescription
unit_off
number

Number of units to be granted a full value discount.

unit_off_formula
string
effect
string

Defines how the unit is added to the customer's order.

Available values: ADD_NEW_ITEMS, ADD_MISSING_ITEMS
unit_type
string

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