Skip to navigation

Validate Promotion Code

View as Markdown
Validate a promotion code without redeeming it.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

account_idstringRequired

Headers

Idempotency-Keystring or nullOptional>=8 characters
A unique key for this request. A retry with the same key returns the first response instead of running again, for 24 hours. Keys are per caller.

Request

This endpoint expects an object.
codestringRequired
The promotion code to redeem
customer_idstring or nullOptional

Customer applying the code (for validation)

order_amountdouble or nullOptional>=0
Order amount for minimum validation
order_currencyenum or nullOptional
Order currency

Response

Successful Response
validboolean
Whether the promotion code is valid
errorstring or nullOptional
Error message if validation failed
promotion_codeobject or nullOptional
The promotion code details if found

Errors

422
Unprocessable Entity Error