Redeem Stackable Discounts

Use this method to redeem up to 5 redeemables in the single API request.

Response schema

All promo codes and tiers provided in redeemables are redeemed during the request and returned in the API response. As a result, there are child redemptions related to redemptions of each redeemable and parent_redemption that presents to the final effect of redeeming all redeemables and stores the list of child redemptions.

ResponseDescription
redemptions array of objectsredemptions array lists all child redemptions that were executed during the request. Each child redemption returns Redemption object with detailed information on how each discount/code was applied to the order.
parent_redemption objectparent_redemption represents the final effect of all child redemptions executed during the request.
order objectThe order object presents order details after all discounts are applied. You can read more about returned order properties in the table below.

How API returns calculated discounts and order amounts in the response

In the table below, you can see the logic the API follows to calculate discounts and amounts:

FieldCalculationDescription
amountN/AThis field shows order amount before applying any discount
total_amounttotal_amount = amount - total_discount_amountThis field shows order amount after applying all the discounts
discount_amountdiscount_amount = previous_discount_amonut + applied_discount_amountThis field sums up all order-level discounts applied to a particular order
items_discount_amountsum(items, i => i.discount_amount)This field sums up all product-specific discounts applied to this order id
total_discount_amounttotal_discount_amount = discount_amount + items_discount_amountThis field sums up all order-level and all product-specific discounts applied to this order id
applied_discount_amountN/AThis field shows order-level discount applied in a particular request
items_applied_discount_amountsum(items, i => i.applied_discount_amount)This field sums up all product-specific discounts applied in a particular request
total_applied_discount_amounttotal_applied_discount_amount = applied_discount_amount + items_applied_discount_amountThis field sums up all order-level and all product-specific discounts applied in a particular request

📘

Rollbacks

You can't roll back a child redemption. When you call rollback on stacked redemption, all child redemptions will be rolled back. You need to refer to a parent_redemption_id in your rollback request.

Expanded Response

Responses will vary depending on the strings passed in the options.expand string array.

Expand OptionResponse Body
["order"]- Same response as fallback response (without an options object).
- Order data with calculated discounts are listed in each child redemption object.
- Metadata not included for each discount type.
["order", "redemption"]- Returns redemption object metadata.
- Order data with calculated discounts are listed in each child redemption object.
["redeemable", "redemption"]- Returns each discount type's metadata in each child redemption object.
- Returns redemption object metadata.
["redemption"]- Returns redemption object metadata.
["redeemable","redemption","category"]- Returns each discount type's metadata in each child redemption object.
- Returns redemption object metadata.
- Returns an expanded categories object, showing details about the category.

Parameters

Language
Click Try It! to start a request and see the response here!