Skip to content
Guides
Carts & CheckoutCarts

Add promotion code

POST/v1/carts/{cartToken}/promotion-codes

Add promotion code. A successful request returns HTTP 200 with the documented response body.

Path Parameters

cartToken*string

Opaque token identifying the cart.

Header Parameters

x-Store-Domain*string

Store slug or configured domain that selects the store context at the central Storefront gateway.

Length1 <= length <= 253

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/carts/replace_with_the_issued_token/promotion-codes" \  -H "x-Store-Domain: my-store" \  -H "Content-Type: application/json" \  -d '{    "code": "example_code"  }'
{  "id": "7204558912004325301",  "token": "replace_with_the_issued_token",  "cartNumber": "example",  "email": "andrea@example.com",  "phone": "+51987654321",  "firstName": "Andrea",  "lastName": "Ramos",  "currencyCode": "PEN",  "status": "inProgress",  "completedAt": "2026-08-01T15:30:00Z",  "shippingAddress": {    "name": "Example resource",    "address1": "example",    "city": "example",    "countryCode": "PE",    "company": "example",    "address2": "example",    "province": "example",    "postalCode": "example_code",    "district": "example",    "phone": "+51987654321",    "latitude": 1,    "longitude": 1  },  "billingAddress": {    "name": "Example resource",    "address1": "example",    "city": "example",    "countryCode": "PE",    "company": "example",    "address2": "example",    "province": "example",    "postalCode": "example_code",    "district": "example",    "phone": "+51987654321",    "latitude": 1,    "longitude": 1  },  "promotionCodes": [    "example"  ],  "items": [    {      "id": "7204558912004325301",      "productId": "7204558912004325301",      "title": "Example title",      "variantLabel": "example",      "productHandle": "example",      "thumbnail": "example",      "quantity": 1,      "variantId": "7204558912004325301",      "variantSku": "SKU-001",      "unitPrice": 1,      "compareAtUnitPrice": 1,      "bundleItems": [        {          "productId": "7204558912004325301",          "variantId": "7204558912004325301",          "productName": "Example resource",          "variantName": "Example resource",          "sku": "SKU-001",          "brand": "example",          "imageUrl": "https://example.com/resource",          "quantity": 1        }      ],      "requiresShipping": false,      "sellerId": "7204558912004325301",      "sellerName": "Example resource",      "orderBumpId": "7204558912004325301"    }  ],  "shippingMethods": [    {      "id": "7204558912004325301",      "shippingMethodId": "7204558912004325301",      "rateId": "7204558912004325301",      "name": "Example resource",      "description": "Example description.",      "total": 1,      "locationId": "7204558912004325301",      "estimatedDays": 1,      "pickupPointId": "7204558912004325301",      "scheduledDate": "2026-08-01",      "scheduledTime": "09:00:00Z",      "serviceCode": "example_code"    }  ],  "totals": {    "subtotal": 1,    "discountTotal": 1,    "shippingOriginalTotal": 1,    "shippingTotal": 1,    "taxTotal": 1,    "warrantyTotal": 1,    "total": 1  }}