Skip to main content
POST
This endpoint applies a coupon code to the cart. The system validates the coupon and calculates applicable discounts based on cart contents and customer eligibility.

Authentication

This endpoint requires a valid API key with carts:write permissions.

Path Parameters

string
required
The unique identifier of the cart

Request Body

string
required
Coupon or promotion code to apply
boolean
default:"false"
Only validate without applying (preview discount)

Response

Returns the updated cart with applied discount.