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.
redemptions 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 represents the final effect of all child redemptions executed during the request.
The order object presents order details after all discounts are applied. You can read more about returned order properties in the table below.
In the table below, you can see the logic the API follows to calculate discounts and amounts:
This field shows order amount before applying any discount
total_amount = amount - total_discount_amount
This field shows order amount after applying all the discounts
discount_amount = previous_discount_amonut + applied_discount_amount
This field sums up all order-level discounts applied to a particular order
sum(items, i => i.discount_amount)
This field sums up all product-specific discounts applied to this order id
total_discount_amount = discount_amount + items_discount_amount
This field sums up all order-level and all product-specific discounts applied to this order id
This field shows order-level discount applied in a particular request
sum(items, i => i.applied_discount_amount)
This field sums up all product-specific discounts applied in a particular request
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount
This field sums up all order-level and all product-specific discounts applied in a particular request
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.
Responses will vary depending on the strings passed in the options.expand string array.