Apply coupon to order
Coupons
Apply coupon to order
Apply a validated coupon code to a pending order and automatically calculate the discount.
POST
Apply coupon to order
Request
Headers
Body parameters
Successful response
Response fields
Validation checks
The endpoint performs comprehensive validations before applying the coupon:Order exists and belongs to the authenticated user
Order is in
pending status (cannot apply to completed/cancelled orders)Order does not already have a coupon applied
Coupon exists and is active
Coupon belongs to the specified shop
Coupon is within valid date range
Global usage limit has not been exceeded
Per-user usage limit has not been exceeded
Order meets minimum amount requirement
Side effects
When a coupon is successfully applied:- Order is updated with the coupon ID and discount amount
- Coupon usage count is incremented globally
- Order total is recalculated with the discount applied
Error responses
Order not found
Unauthorized access
Coupon already applied
Invalid order status
Invalid coupon
Best practices
Once a coupon is applied to an order, it cannot be removed or replaced.
Ensure the user confirms the coupon application before calling this
endpoint.
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Body
application/json

