This endpoint works only after WHITELABEL enables Promotions for your organization. Ask your Technical Account Manager or Key Account Manager. See Promotions.
Promotions can’t be edited
There’s no update endpoint. To change a discount, a date or a condition, disable the promotion and create a new one. Payments already charged keep the promotion they were charged with.
Creating a promotion doesn’t discount any payment by itself. A payment gets the discount only when it carries a quote_id from Create Promotion Quote or from the WHITELABEL checkout (on additional_data.order.discounts).
Each promotion belongs to oneaccount_id. If you run the same campaign on several accounts, create it once per account.
When two or more promotions match the same payment, the one with the biggest saving applies, then the oldest, then the smallest id. One promotion per payment.
Set redemption.mode to CODE to require a promotion code, with redemption.code (3 to 32 characters). A code is unique per account among the promotions that can still apply; creating a second active promotion with a code already in use returns 409 CODE_ALREADY_EXISTS. The code becomes reusable once the earlier promotion is disabled or its schedule ends.
Refer to the HTTP Response Codes section for details on possible error outcomes.
POST/promotions
Creates a promotion for an account. Promotions must be enabled for your organization by WHITELABEL before you can use this endpoint. See Promotions.
Header Parameters
X-Idempotency-Keystringrequired
A unique key (UUID) for the request. Sending the same key again within 24 hours returns the original response and stores nothing new.
Body application/json
account_idstringrequired
The account the promotion belongs to (UUID, found in your WHITELABEL Dashboard). One promotion applies to one account. If you run the same campaign on several accounts, create it once per account.
namestringrequired
The promotion name (MAX 255; MIN 3). The checkout uses it when it announces the discount.
descriptionstring
Shown with the name on the quote. Optional, up to 1000 characters.
scheduleobjectrequired
The window in which the promotion runs. UTC.
Show schedule properties
starts_atstring<date-time>required
When the promotion starts (ISO 8601, UTC). Now or in the future.
ends_atstring,null<date-time>
When the promotion ends (ISO 8601, UTC). null means no end date.
redemptionobjectrequired
How the promotion is redeemed. code is required when mode is CODE.
Show redemption properties
mode"AUTOMATIC" | "CODE"required
AUTOMATIC = applies by itself to every payment that meets the conditions. CODE = applies only when the payment’s quote carries the promotion code. Not available yet: today every promotion is AUTOMATIC; codes are coming in a later release.
codestringnull
CODE only; required then, omit or send null otherwise. 3 to 32 characters: A-Z, 0-9, _ and -. Unique per account among the promotions that can still apply; reusable once the earlier promotion with that code is disabled or its schedule has ended.
discountobjectrequired
What the customer saves. For FIXED, when the promotion also has an amounts condition, discount.amounts and conditions.amounts.values must list the same currencies or the request returns 400.
Show discount properties
type"PERCENTAGE" | "FIXED"required
valuenumbernull
PERCENTAGE only. Greater than 0 and up to 100, with up to two decimals (for example 10.5). null for a fixed discount.
amountsarraynull
FIXED only. One entry per currency, each above zero. A fixed promotion applies only to payments in the currencies it lists, and the discount is capped at the payment amount. null for a percentage discount.
conditionsobject
Conditions a payment must meet. AND across keys, OR inside each key’s values list. Omit a key or send null for no condition on that dimension; an empty values list returns 400.
Show conditions properties
binsobject
Card BIN condition. A card matches when its BIN equals a prefix in values or falls in a ranges entry. At least one of values or ranges when bins is present.
Inclusive minimum in this currency. null with max also null filters by currency only.
maxnumber,null<float>
Inclusive maximum in this currency. null means no ceiling.
Response
201
idstring
The unique identifier of the promotion (UUID).
account_idstring
The account the promotion belongs to (UUID, found in your WHITELABEL Dashboard). One promotion applies to one account. If you run the same campaign on several accounts, create it once per account.
namestring
The promotion name (MAX 255; MIN 3). The checkout uses it when it announces the discount.
descriptionstring
Shown with the name on the quote. Optional, up to 1000 characters.
scheduleobject
The window in which the promotion runs. UTC.
Show schedule properties
starts_atstring<date-time>
When the promotion starts (ISO 8601, UTC). Now or in the future.
ends_atstring,null<date-time>
When the promotion ends (ISO 8601, UTC). null means no end date.
redemptionobject
How the promotion is redeemed. code is required when mode is CODE.
Show redemption properties
mode"AUTOMATIC" | "CODE"
AUTOMATIC = applies by itself to every payment that meets the conditions. CODE = applies only when the payment’s quote carries the promotion code. Not available yet: today every promotion is AUTOMATIC; codes are coming in a later release.
codestringnull
CODE only; null for an automatic promotion. 3 to 32 characters: A-Z, 0-9, _ and -. Unique per account among the promotions that can still apply; reusable once the earlier promotion with that code is disabled or its schedule has ended.
discountobject
What the customer saves. For FIXED, when the promotion also has an amounts condition, discount.amounts and conditions.amounts.values must list the same currencies or the request returns 400.
Show discount properties
type"PERCENTAGE" | "FIXED"
valuenumbernull
PERCENTAGE only. Greater than 0 and up to 100, with up to two decimals (for example 10.5). null for a fixed discount.
amountsarraynull
FIXED only. One entry per currency, each above zero. A fixed promotion applies only to payments in the currencies it lists, and the discount is capped at the payment amount. null for a percentage discount.
conditionsobject
Conditions a payment must meet. AND across keys, OR inside each key’s values list. Omit a key or send null for no condition on that dimension; an empty values list returns 400.
Show conditions properties
binsobject
Card BIN condition. A card matches when its BIN equals a prefix in values or falls in a ranges entry. At least one of values or ranges when bins is present.