Skip to content

Apply a discount code; recomputes totals (422 if ineligible)

POST
/store/v1/carts/{cartId}/discounts
curl --request POST \
--url https://your-store.example.com/store/v1/carts/example/discounts \
--header 'Content-Type: application/json' \
--data '{ "code": "example" }'
cartId
required
string
Media type application/json
object
code
required
string
>= 1 characters <= 64 characters
Example generated
{
"code": "example"
}