Cart Endpoints
Apply Coupon & Giftcard
Validates and applies a coupon or gift card to the user’s cart if eligible. Provides appropriate messages based on the coupon or gift card status.
POST
/
cart
/
acceptCoupon
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
coupon
string
requiredThe code for the coupon or gift card to apply.
Response
200 - application/json
success
boolean
Indicates if the coupon or gift card was successfully applied.
message
string
A message indicating the result of applying the coupon or gift card.
percent
number
Discount percentage if a coupon was applied.
amount
number
Discount amount if a coupon was applied.
sum
number
The amount of the gift card used.
type
string
The type of the applied code, either 'coupon' or 'gift'.