Skip to main content
POST
Apply coupon

Authorizations

Authorization
string
header
required

Access token

Path Parameters

id
string
required

Cart ID

Body

application/json
coupon_code
string
required
Example:

"FLAT100OFF"

Response

OK

message
string
required
success
boolean
required
content
object
required
events
(CartLifecycleEvent ยท object | CartLineChangeEvent ยท object | CartCouponEvent ยท object | OrderCreatedEvent ยท object | OrderCancelledEvent ยท object | WishlistChangeEvent ยท object)[]
required

Analytics events to emit for the change this request made, each with a server-issued event_id. Replay them to your analytics destinations so your client-side and server-side copies of the same action dedupe. Empty when the request produced no analytics event.

Emitted when a cart is created or deleted, or when checkout begins. Checkout Started is sent on every address update on the cart, mirroring Commerce Engine's own server-side copy.