---
title: "Validate Stackable Discounts (client-side)"
method: POST
path: "/client/v1/validations"
tags: ["Client-side"]
---

# Validate Stackable Discounts (client-side)

`POST /client/v1/validations`

Verify redeemables provided in the request. This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.

## Headers

- `origin` string, hostname, required

## Request body

- ClientValidationsValidateRequestBody — Request body schema for **POST** `v1/validations`.
  - `options` object — Configure parameters returned in the response.
    - `expand` string[] — The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | ["order"] | - Same response as fallback response (without an options object).<br />- Order data with calculated discounts are listed in each child redeemable object.<br />- Metadata not included for each discount type. | | ["redeemable"] | Expands redeemable objects by including `metadata` for each discount type. | | ["order", "redeemable"] | - Order data with calculated discounts are listed in each child redeemable object.<br />- Includes `metadata` for each discount type. | | ["category"] | - Returns an expanded `categories` object, showing details about the category. |
  - `redeemables` union[], required — An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. Each unique redeemable can be sent in one request only once.
    - union
      - RedeemVoucher — Validate or redeem a discount code.
        - `object` 'voucher', required — Redeemable object type.
        - `id` string, required — Redeemable code.
      - RedeemPromotionTier — Validate or redeem a promotion tier.
        - `object` 'promotion_tier', required — Redeemable object type.
        - `id` string, required — Promotion tier unique id, such as: promo_Mwy9XpA0TLctSGriM5kum0qp
      - RedeemPromotionStack — Validate or redeem a promotion stack.
        - `object` 'promotion_stack', required — Redeemable object type.
        - `id` string, required — Promotion stack unique id, such as: stack_KxSD0GahLUg9ULB6TseGfUHJ
      - RedeemGiftCard — Validate or redeem a discount code.
        - `object` 'voucher', required — Redeemable object type.
        - `id` string, required — Redeemable code.
        - `gift` object — Contains information on the number of gift card credits that the customer wants to apply to the order.
          - `credits` integer — The number of credits that the user wants to use from the gift card to fulfill the order. The value of credits cannot be higher than the current balance on the gift card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.
      - RedeemLoyaltyCard — Validate or redeem a discount code.
        - `object` 'voucher', required — Redeemable object type.
        - `id` string, required — Redeemable code.
        - `reward` object — Contains information about the reward that the customer wants to redeem and the number of points the customer is choosing to use for the reward.
          - `id` string — Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward.
          - `points` integer — The number of loyalty points that the user wants to spend in order to fulfill the order using a **pay with points** reward. The number of points cannot be higher than the current balance on the loyalty card.
  - `order` Order — Order information.
    - `id` string — Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
    - `source_id` string, nullable — Unique source ID of an existing order that will be linked to the redemption of this request. For validation and redemption, if `source_id` is used with an existing order, the original order data will be used, like `items`, `amount`, and so on, not the one sent in the new request.
    - `status` 'CREATED' | 'PAID' | 'CANCELED' | 'FULFILLED' — The order status.
    - `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. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
    - `items` OrderItem[] — Array of items applied to the order. It can include up to 500 items.
      - `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` 'product' | 'sku' — Used along with the source_id property, can be set to either sku or product.
      - `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.
      - `price` integer — Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.
      - `product` object — An object containing details of the related product.
        - `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. Override works only for endpoints that create an order in the database.
        - `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. It can be used to create product collections.
        - `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.
        - `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. It can be used to create product collections.
      - `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. It can be used to define business validation rules.
    - `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. It can be used to define business validation rules or discount formulas.
  - `customer` Customer
    - `id` string — The ID of an existing customer.
    - `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.
    - `description` string — An arbitrary string that you can attach to a customer object.
    - `email` string — Customer's email address.
    - `phone` string — Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
    - `birthday` string, date — `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~.
    - `birthdate` string, date — Customer's birthdate; format YYYY-MM-DD.
    - `address` object, nullable — Customer's address.
      - `city` string — City
      - `state` string — State
      - `line_1` string — First line of address.
      - `line_2` string — Second line of address.
      - `country` string — Country.
      - `postal_code` string — Postal code.
    - `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.
  - `session` Session
    - `key` string — The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.
    - `type` 'LOCK' — This parameter is required to establish a new session.
    - `ttl` number — Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter.
    - `ttl_unit` 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS' — Defines the type of unit in which the session time is counted.
  - `tracking_id` string — Is correspondent to Customer's source_id
  - `metadata` object — A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format.

## Response `200`

Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. Read more in the [Stacking Rule Documentation](/orchestrate/stacking-rules).

- ClientValidationsValidateResponseBody — Response body schema for **POST** `v1/validations`.
  - `id` string — Unique identifier of the validation, assigned by Voucherify.
  - `valid` boolean, required — The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable.
  - `redeemables` union[], required — Lists validation results of each redeemable. If `redeemables_application_mode` is `PARTIAL` in the `stacking_rules` object, all redeemables here will be `APPLICABLE`. Read more in [the Stacking rules article]/orchestrate/stacking-rules.
    - union
      - ValidationsRedeemableApplicable
        - `status` 'APPLICABLE', required — Indicates whether the redeemable can be applied or not applied based on the validation rules.
        - `id` string, required — Redeemable ID, i.e. the voucher code.
        - `object` 'voucher' | 'promotion_tier', required — Redeemable's object type.
        - `order` object — Order information.
          - `id` string — Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
          - `source_id` string, nullable — Unique source ID of an existing order that will be linked to the redemption of this request.
          - `status` 'CREATED' | 'PAID' | 'CANCELED' | 'FULFILLED' — The order status.
          - `amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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`
          - `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. It can be used to define business validation rules or discount formulas.
          - `object` 'order' — The type of the object represented by JSON.
          - `created_at` string, date-time — Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
          - `updated_at` string, date-time, nullable — Timestamp representing the date and time when the order was last updated in ISO 8601 format.
          - `customer_id` string, nullable — Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
          - `referrer_id` string, nullable — Unique referrer ID.
          - `customer` CustomerId
            - `id` string, required — A unique identifier of an existing customer.
            - `object` 'customer', required — The type of the object represented by JSON.
          - `referrer` ReferrerId
            - `id` string, required — A unique identifier of an existing customer.
            - `object` 'customer', required — The type of the object represented by JSON.
          - `redemptions` object
          - `items` OrderCalculatedItem[] — Array of items applied to the order. It can include up to 500 items.
            - `id` string — Unique identifier of the order line 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` 'product' | 'sku' — Used along with the source_id property, can be set to either sku or product.
            - `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.
            - `applied_discount_amount` integer — This field shows the order-level discount applied.
            - `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.
            - `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.
            - `price` integer — Unit price of an item. The value is multiplied by 100 to 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`-`applied_discount_amount`
            - `product` object — An object containing details of the related product.
              - …
            - `sku` object — An object containing details of the related SKU.
              - …
            - `object` 'order_item', required — The type of the object represented by JSON.
            - `metadata` object — A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
        - `applicable_to` ApplicableToResultList
          - `data` ApplicableTo[], required — Contains array of items to which the discount can apply.
            - `object` 'product' | 'sku' | 'products_collection', required — This object stores information about the resource to which the discount is applicable.
            - `id` string, required — Unique product collection, product, or SKU identifier assigned by Voucherify.
            - `source_id` string — The source identifier from your inventory system.
            - `product_id` string — Parent product's unique ID assigned by Voucherify.
            - `product_source_id` string — Parent product's source ID from your inventory system.
            - `price` number — New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price.
            - `price_formula` number — Formula used to dynamically calculate the discounted price of an item.
            - `effect` 'APPLY_TO_EVERY' | 'APPLY_TO_CHEAPEST' | 'APPLY_FROM_CHEAPEST' | 'APPLY_TO_MOST_EXPENSIVE' | 'APPLY_FROM_MOST_EXPENSIVE', required
            - `quantity_limit` integer — The maximum number of units allowed to be discounted per order line item.
            - `aggregated_quantity_limit` integer — The maximum number of units allowed to be discounted combined across all matched order line items.
            - `amount_limit` integer — Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
            - `aggregated_amount_limit` integer — Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)
            - `product_campaign_quantity_limit` integer — Limits the number of discounted item units (product, SKU, collection) that all customers can receive in a given campaign. If a product is selected, the limit covers all discounts across all SKUs belonging to that product. If a product collection is selected, the limit covers all products/SKUs within the collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_campaign_quantity_limit` integer — Limits the number of discounted item units (product, SKU, collection) that one customer can receive in a given campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer in a campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_campaign_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that all customers can receive in a given campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per campaign for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_campaign_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that one customer can receive in a campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_promotion_tier_quantity_limit` integer — Limits the number of discounted item units that all customers can receive in a promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_promotion_tier_quantity_limit` integer — Limits the number of discounted item units that one customer can receive in a given promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer in a promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_promotion_tier_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that all customers can receive in a given promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per promotion tier for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_promotion_tier_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that one customer can receive in a promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer in a promotion tier for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `order_item_indices` integer[] — Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.
            - `order_item_units` object[] — Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.
              - …
            - `repeat` integer — Determines the recurrence of the discount, e.g. `"repeat": 3` means that the discount is applied to every third item.
            - `skip_initially` integer — Determines how many items are skipped before the discount is applied.
            - `target` 'ITEM' | 'UNIT' — Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.
          - `total` integer, required — Total number of objects defining included products, SKUs, or product collections.
          - `object` 'list', required — The type of the object represented by JSON.
          - `data_ref` 'data', required — The type of the object represented by JSON.
        - `inapplicable_to` InapplicableToResultList
          - `data` InapplicableTo[], required — Contains array of items to which the discount cannot apply.
            - `object` 'product' | 'sku' | 'products_collection', required — This object stores information about the resource to which the discount is applicable.
            - `id` string, required — Unique product collection, product, or SKU identifier assigned by Voucherify.
            - `source_id` string — The source identifier from your inventory system.
            - `product_id` string — Parent product's unique ID assigned by Voucherify.
            - `product_source_id` string — Parent product's source ID from your inventory system.
            - `price` number — New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price.
            - `price_formula` number — Formula used to dynamically calculate the discounted price of an item.
            - `effect` 'APPLY_TO_EVERY' | 'APPLY_TO_CHEAPEST' | 'APPLY_FROM_CHEAPEST' | 'APPLY_TO_MOST_EXPENSIVE' | 'APPLY_FROM_MOST_EXPENSIVE', required
            - `quantity_limit` integer — The maximum number of units allowed to be discounted per order line item.
            - `aggregated_quantity_limit` integer — The maximum number of units allowed to be discounted combined across all matched order line items.
            - `amount_limit` integer — Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
            - `aggregated_amount_limit` integer — Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)
            - `product_campaign_quantity_limit` integer — Limits the number of discounted item units (product, SKU, collection) that all customers can receive in a given campaign. If a product is selected, the limit covers all discounts across all SKUs belonging to that product. If a product collection is selected, the limit covers all products/SKUs within the collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_campaign_quantity_limit` integer — Limits the number of discounted item units (product, SKU, collection) that one customer can receive in a given campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer in a campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_campaign_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that all customers can receive in a given campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per campaign for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_campaign_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that one customer can receive in a campaign. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_campaign_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_promotion_tier_quantity_limit` integer — Limits the number of discounted item units that all customers can receive in a promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_promotion_tier_quantity_limit` integer — Limits the number of discounted item units that one customer can receive in a given promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_customer_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer in a promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_promotion_tier_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that all customers can receive in a given promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per promotion tier for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_promotion_tier_quantity_limit` integer — Limits the number of discounted item units of a given product in a collection that one customer can receive in a promotion tier. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `product_in_collection_customer_promotion_tier_quantity_limit_formula` string — Formula used to dynamically calculate the maximum units per customer in a promotion tier for a product in a collection. This limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more.
            - `order_item_indices` integer[] — Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.
            - `order_item_units` object[] — Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.
              - …
            - `repeat` integer — Determines the recurrence of the discount, e.g. `"repeat": 3` means that the discount is applied to every third item.
            - `skip_initially` integer — Determines how many items are skipped before the discount is applied.
            - `target` 'ITEM' | 'UNIT' — Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.
          - `total` integer, required — Total number of objects defining included products, SKUs, or product collections.
          - `object` 'list', required — The type of the object represented by JSON.
          - `data_ref` 'data', required — The type of the object represented by JSON.
        - `result` union, required — Specifies the redeemable's end effect on the order. This object is unique to each type of redeemable.
          - RedeemableResultVoucherCode — This is a `result` object representing the results for a coupon code.
            - `discount` union — Discount details about the type of discount to be applied for the redeemable.
              - …
            - `bundle` Bundle — Determines how the bundle conditions are met by the customer's order items. The items in the order meet the bundle condition in the following way: SKU, then product, then collection.
              - …
          - RedeemableResultGiftCard — This is a `result` object representing the results for a gift card.
            - `gift` object — Stores the amount of gift card credits to be applied.
              - …
          - RedeemableResultLoyaltyCard — This is a `result` object representing the results for a loyalty card.
            - `loyalty_card` object — Stores the amount of loyalty card points to be applied in the redemption.
              - …
          - RedeemableResultPromotionTier — This is a `result` object representing the results for a promotion tier.
            - `discount` union — Discount details about the type of discount to be applied for the redeemable.
              - …
            - `bundle` Bundle — Determines how the bundle conditions are met by the customer's order items. The items in the order meet the bundle condition in the following way: SKU, then product, then collection.
              - …
          - RedeemableResultPromotionStack — This is a `result` object representing the results for a promotion stack.
            - `discount` union — Discount details about the type of discount to be applied for the redeemable.
              - …
            - `bundle` Bundle — Determines how the bundle conditions are met by the customer's order items. The items in the order meet the bundle condition in the following way: SKU, then product, then collection.
              - …
        - `metadata` object — The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
        - `categories` CategoryWithStackingRulesType[]
          - `id` string, required — Unique category ID assigned by Voucherify.
          - `name` string, required — Category name.
          - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
          - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
          - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
          - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
          - `stacking_rules_type` 'JOINT' | 'EXCLUSIVE' — The type of the stacking rule eligibility.
        - `campaign_name` string — Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
        - `campaign_id` string — Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
        - `name` string — Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
      - ValidationsRedeemableInapplicable
        - `status` 'INAPPLICABLE', required — Indicates whether the redeemable can be applied or not applied based on the validation rules.
        - `id` string, required — Redeemable ID, i.e. the voucher code.
        - `object` 'voucher' | 'promotion_tier', required — Redeemable's object type.
        - `result` object, required — Includes the error object with details about the reason why the redeemable is inapplicable
          - `error` Error — Error details
            - `code` integer, required — Error's HTTP status code.
            - `key` string — Short string describing the kind of error which occurred.
            - `message` string, required — A human-readable message providing a short description of 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.
            - `resource_id` string — Unique resource ID that can be used in another endpoint to get more details.
            - `resource_type` string — The resource type.
            - `error` object — Includes additional information about the error.
              - …
          - `details` object — Provides details about the reason why the redeemable is inapplicable.
            - `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.
          - `bundle` Bundle — Determines how the bundle conditions are met by the customer's order items. The items in the order meet the bundle condition in the following way: SKU, then product, then collection.
            - `quantity` integer, required — 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`.
            - `limit` integer, required — Determines the maximum number of identified bundles. This also defines the maximum multiplier of the bundle discount.
            - `identified` object[] — 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.
              - …
            - `missing` object[] — 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.
              - …
        - `metadata` object — The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
        - `categories` CategoryWithStackingRulesType[]
          - `id` string, required — Unique category ID assigned by Voucherify.
          - `name` string, required — Category name.
          - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
          - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
          - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
          - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
          - `stacking_rules_type` 'JOINT' | 'EXCLUSIVE' — The type of the stacking rule eligibility.
        - `campaign_name` string — Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
        - `campaign_id` string — Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
        - `name` string — Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
      - ValidationsRedeemableSkipped
        - `status` 'SKIPPED', required — Indicates whether the redeemable can be applied or not applied based on the validation rules.
        - `id` string, required — Redeemable ID, i.e. the voucher code.
        - `object` 'voucher' | 'promotion_tier', required — Redeemable's object type.
        - `result` object, required — Provides details about the reason why the redeemable is skipped.
          - `details` union
            - ValidationsRedeemableSkippedResultLimitExceeded — Displayed when the `applicable_redeemables_limit` defined in the stacking rules is exceeded.
              - …
            - ValidationsRedeemableSkippedResultCategoryLimitExceeded — Displayed when `applicable_redeemables_per_category_limit` defined in the stacking rules is exceeded
              - …
            - ValidationsRedeemableSkippedResultRedeemablesLimitExceeded — Displayed when `applicable_exclusive_redeemables_limit` defined in the stacking rules is exceeded.
              - …
            - ValidationsRedeemableSkippedResultRedeemablesCategoryLimitExceeded — Displayed when `applicable_exclusive_redeemables_per_category_limit` defined in the stacking rules is exceeded.
              - …
            - ValidationsRedeemableSkippedResultExclusionRulesNotMet — Displayed when the redeemable cannot be applied because the exclusion rules are not fulfilled.
              - …
            - ValidationsRedeemableSkippedResultPrecedingValidationFailed — Displayed in the ALL application rule when one of the preceding redeeambles is `INAPPLICABLE`, so the rest becomes `SKIPPED`
              - …
        - `metadata` object — The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
        - `categories` CategoryWithStackingRulesType[]
          - `id` string, required — Unique category ID assigned by Voucherify.
          - `name` string, required — Category name.
          - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
          - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
          - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
          - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
          - `stacking_rules_type` 'JOINT' | 'EXCLUSIVE' — The type of the stacking rule eligibility.
        - `campaign_name` string — Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
        - `campaign_id` string — Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
        - `name` string — Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
  - `skipped_redeemables` ValidationsRedeemableSkipped[] — Lists validation results of each skipped redeemable.
    - `status` 'SKIPPED', required — Indicates whether the redeemable can be applied or not applied based on the validation rules.
    - `id` string, required — Redeemable ID, i.e. the voucher code.
    - `object` 'voucher' | 'promotion_tier', required — Redeemable's object type.
    - `result` object, required — Provides details about the reason why the redeemable is skipped.
      - `details` union
        - ValidationsRedeemableSkippedResultLimitExceeded — Displayed when the `applicable_redeemables_limit` defined in the stacking rules is exceeded.
          - `key` 'applicable_redeemables_limit_exceeded'
          - `message` string
        - ValidationsRedeemableSkippedResultCategoryLimitExceeded — Displayed when `applicable_redeemables_per_category_limit` defined in the stacking rules is exceeded
          - `key` 'applicable_redeemables_per_category_limit_exceeded'
          - `message` string
        - ValidationsRedeemableSkippedResultRedeemablesLimitExceeded — Displayed when `applicable_exclusive_redeemables_limit` defined in the stacking rules is exceeded.
          - `key` 'applicable_exclusive_redeemables_limit_exceeded'
          - `message` string
        - ValidationsRedeemableSkippedResultRedeemablesCategoryLimitExceeded — Displayed when `applicable_exclusive_redeemables_per_category_limit` defined in the stacking rules is exceeded.
          - `key` 'applicable_exclusive_redeemables_per_category_limit_exceeded'
          - `message` string
        - ValidationsRedeemableSkippedResultExclusionRulesNotMet — Displayed when the redeemable cannot be applied because the exclusion rules are not fulfilled.
          - `key` 'exclusion_rules_not_met'
          - `message` string
        - ValidationsRedeemableSkippedResultPrecedingValidationFailed — Displayed in the ALL application rule when one of the preceding redeeambles is `INAPPLICABLE`, so the rest becomes `SKIPPED`
          - `key` 'preceding_validation_failed'
          - `message` string
    - `metadata` object — The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
    - `categories` CategoryWithStackingRulesType[]
      - `id` string, required — Unique category ID assigned by Voucherify.
      - `name` string, required — Category name.
      - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
      - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
      - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
      - `stacking_rules_type` 'JOINT' | 'EXCLUSIVE' — The type of the stacking rule eligibility.
    - `campaign_name` string — Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
    - `campaign_id` string — Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
    - `name` string — Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
  - `inapplicable_redeemables` ValidationsRedeemableInapplicable[] — Lists validation results of each inapplicable redeemable.
    - `status` 'INAPPLICABLE', required — Indicates whether the redeemable can be applied or not applied based on the validation rules.
    - `id` string, required — Redeemable ID, i.e. the voucher code.
    - `object` 'voucher' | 'promotion_tier', required — Redeemable's object type.
    - `result` object, required — Includes the error object with details about the reason why the redeemable is inapplicable
      - `error` Error — Error details
        - `code` integer, required — Error's HTTP status code.
        - `key` string — Short string describing the kind of error which occurred.
        - `message` string, required — A human-readable message providing a short description of 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.
        - `resource_id` string — Unique resource ID that can be used in another endpoint to get more details.
        - `resource_type` string — The resource type.
        - `error` object — Includes additional information about the error.
          - `message` string — The message configured by the user in a validation rule.
      - `details` object — Provides details about the reason why the redeemable is inapplicable.
        - `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.
      - `bundle` Bundle — Determines how the bundle conditions are met by the customer's order items. The items in the order meet the bundle condition in the following way: SKU, then product, then collection.
        - `quantity` integer, required — 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`.
        - `limit` integer, required — Determines the maximum number of identified bundles. This also defines the maximum multiplier of the bundle discount.
        - `identified` object[] — 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.
          - `id` string, required — Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify.
          - `object` 'product' | 'sku', required — Determines the type of the object that meets the bundle condition.
          - `item_index` integer, required — 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_quantity` integer, required — 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`.
        - `missing` object[] — 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.
          - `id` string, required — Unique identifier of the collection, product, or SKU that is missing in the customer's order items. This is an ID assigned by Voucherify.
          - `object` 'product' | 'products_collection' | 'sku', required — Determines the type of the object that is missing in the customer's order items.
          - `item_quantity` integer, required — Quantity of items that are missing in the order items to meet the bundle conditions.
    - `metadata` object — The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
    - `categories` CategoryWithStackingRulesType[]
      - `id` string, required — Unique category ID assigned by Voucherify.
      - `name` string, required — Category name.
      - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
      - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
      - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
      - `stacking_rules_type` 'JOINT' | 'EXCLUSIVE' — The type of the stacking rule eligibility.
    - `campaign_name` string — Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
    - `campaign_id` string — Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
    - `name` string — Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
  - `order` object — Order information.
    - `id` string — Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
    - `source_id` string, nullable — Unique source ID of an existing order that will be linked to the redemption of this request.
    - `status` 'CREATED' | 'PAID' | 'CANCELED' | 'FULFILLED' — The order status.
    - `amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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_amount` integer — 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`
    - `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. It can be used to define business validation rules or discount formulas.
    - `object` 'order' — The type of the object represented by JSON.
    - `created_at` string, date-time — Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
    - `updated_at` string, date-time, nullable — Timestamp representing the date and time when the order was last updated in ISO 8601 format.
    - `customer_id` string, nullable — Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
    - `referrer_id` string, nullable — Unique referrer ID.
    - `customer` CustomerId
      - `id` string, required — A unique identifier of an existing customer.
      - `object` 'customer', required — The type of the object represented by JSON.
    - `referrer` ReferrerId
      - `id` string, required — A unique identifier of an existing customer.
      - `object` 'customer', required — The type of the object represented by JSON.
    - `redemptions` object
    - `items` object[] — Array of items applied to the order. It can include up to 500 items.
      - `id` string — Unique identifier of the order line 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` 'product' | 'sku' — Used along with the source_id property, can be set to either sku or product.
      - `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.
      - `applied_discount_amount` integer — This field shows the order-level discount applied.
      - `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.
      - `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.
      - `price` integer — Unit price of an item. The value is multiplied by 100 to 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`-`applied_discount_amount`
      - `product` object — An object containing details of the related product.
        - `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. It can be used to create product collections.
        - `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.
        - `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 SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
      - `object` 'order_item', required — The type of the object represented by JSON.
      - `metadata` object — A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
      - `application_details` object[] — Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.
        - `source_index` integer — Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.
        - `source_applied_quantity` integer — Number of source units that are replaced.
        - `source_applied_quantity_amount` integer — Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.
        - `target_index` integer — Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`.
        - `target_applied_quantity` integer — Number of added target units that are replacements.
        - `target_applied_quantity_amount` integer — Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity.
        - `target_applied_discount_amount` integer — Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`.
  - `tracking_id` string — Hashed customer source ID.
  - `session` Session
    - `key` string — The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.
    - `type` 'LOCK' — This parameter is required to establish a new session.
    - `ttl` number — Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter.
    - `ttl_unit` 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS' — Defines the type of unit in which the session time is counted.
  - `stacking_rules` StackingRules, required — Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](/orchestrate/stacking-rules).
    - `redeemables_limit` integer, required — Defines how many redeemables can be sent in one request. Note: more redeemables means more processing time.
    - `applicable_redeemables_limit` integer, required — Defines how many redeemables can be applied in one request. The number must be less than or equal to `redeemables_limit`. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be `SKIPPED` according to the `redeemables_sorting_rule`.
    - `applicable_redeemables_per_category_limit` integer, required — Defines how many redeemables with the same category can be applied in one request. The number must be less than or equal to `applicable_redeemables_limit`. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.
    - `applicable_redeemables_category_limits` object, required — Lists categories by category IDs (keys) and defines their limits (values) of applicable redeemables that belong to campaigns with that category.
    - `applicable_exclusive_redeemables_limit` integer, required — Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.
    - `applicable_exclusive_redeemables_per_category_limit` integer — Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.
    - `exclusive_categories` string[], required — Lists the IDs of exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.
    - `joint_categories` string[], required — Lists the IDs of the joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.
    - `redeemables_application_mode` 'ALL' | 'PARTIAL', required — Defines the application mode for redeemables. `"ALL"` means that all redeemables must be validated for the redemption to be successful. `"PARTIAL"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.
    - `redeemables_sorting_rule` 'CATEGORY_HIERARCHY' | 'REQUESTED_ORDER', required — Defines redeemables sorting rule. `CATEGORY_HIERARCHY` means that redeemables are applied oaccording to the category priority. `REQUESTED_ORDER` means that redeemables are applied in the sequence provided in the request.
    - `redeemables_products_application_mode` 'STACK' | 'ONCE', required — Defines redeemables products application mode. `STACK` means that multiple discounts can be applied to a product. `ONCE` means that only one discount can be applied to the same product.
    - `redeemables_no_effect_rule` 'REDEEM_ANYWAY' | 'SKIP', required — Defines redeemables no effect rule. `REDEEM_ANYWAY` means that the redeemable will be redeemed regardless of any restrictions or conditions in place. `SKIP` means that the redeemable will be processed only when an applicable effect is calculated.
    - `no_effect_skip_categories` string[], required — Lists category IDs. Redeemables with a given category are skipped even if the `redeemables_no_effect_rule` is set to `REDEEM_ANYWAY`. Category IDs can't overlap with the IDs in `no_effect_redeem_anyway_categories`.
    - `no_effect_redeem_anyway_categories` string[], required — Lists category IDs. Redeemables with a given category are redeemed anyway even if the `redeemables_no_effect_rule` is set to `SKIP`. Category IDs can't overlap with the IDs in `no_effect_skip_categories`.
    - `redeemables_rollback_order_mode` 'WITH_ORDER' | 'WITHOUT_ORDER', required — 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.

## Other responses

- `400` — Returns an error if the payload is missing an `"object"` or `"id"` property in the redeemables array, if you add more than one promotion stack or attempt to join stacks with vouchers/promotion tiers.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-api-async-actions/versions/4982266e0494/schema)
