Validate Stackable Discounts (client-side)

To verify redeemables given in the request, you can use this method. It is designed for client-side validation which means that is accessible through public keys.

Response schema

All codes and tiers provided in redeemables are validated during the request and the result of thier validation is returned in the API response.

Response

Description

valid boolean

If all redeemables can be applied in the given context, the API returns true if at least one redeemable can't be applied, the API returns false.

redeemables array of objects

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

order object

order object presents details of the order provided in the request after all discounts are applied. Read more about returned order object.

Expanded Response

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

Expanded Option

Response Body

["order"]

  • Same response as fallback response (without an options object).
  • Order data with calculated discounts are listed in each child redeemable object.
  • 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.
  • Includes metadata for each discount type.

["category"]

  • Returns an expanded categories object, showing details about the category.

Parameters

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