Add gift card
POST
/ store/ v1/ carts/ {cart_id}/ gift-cards- Idempotency-Key supported
Apply a gift card by its code. It pays part (or all) of the cart when checkout starts; see gift_cards and amount_due.
Path parameters
cart_idstringrequiredThe cart's ID, like
cart_01k8qs5s….
Headers
X-Cart-TokenstringrequiredThe cart's token
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
codestringrequiredAs printed or typed, with or without dashes.
Returns
200 The updated cart.
Errors
- 404
not_foundNo such cart. - 409A payment is in progress, or the cart is completed.
- 422
validation_failedUnknown, used up, expired or disabled card, or too many cards.