v36

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-017439390.7 KB

This API validates a single coupon identified by {code} and checks its eligibility for use by a customer. It also supports a locking feature, where setting the lock flag to True reserves the coupon by creating a lock reference. This ensures the coupon cannot be used by others during the lock session, preventing conflicts or double usage. By default, the lock flag is False, allowing only validation without reserving the coupon.

post/api/v4.0/integrations/coupons/{code}/validate

Path parameters

codestring required

The coupon code you want to validate.

Request body

customerIdstring required

Unique identifier for the customer that you can reference across the customer's whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.

emailstring

Customer's email address. Required if your account uses email-based channel merging.

mobilestring

Customer's mobile number. Required if your account uses mobile-based channel merging.

lockboolean

Indicates whether the request is intended to validate the coupon or to lock it for a future redemption.

lockReferencestring

Required only if the lock flag is set to True and you need to validate and lock a new or updated list of coupons within an existing lock session.

lockDurationinteger

Represents the number of minutes for which a coupon will be locked if the lock flag is set to True.

merchantIdstring

This parameter is required only if the coupon is designed to apply to specific merchants.

collectionIdstring

This parameter is required only if the coupon is configured to apply to specific collections.

collectionsIdsstring[]

This parameter is required only when the coupon is configured to apply to specific collections.

totalPurchaseAmountnumber

This parameter represents the total value of the purchase where the coupon will be applied.

Response

Coupon validated successfully

validboolean

Indicates whether the coupon is valid to be used by the customer or not.

lockReferencestring

The unique reference code associated with the coupon lock session.

dateToExpirestring date-time

The exact date and time when the coupon lock will expire.