Skip to content
Guides
PromotionsCoupons
promotion:update

Create coupon code

POST/v1/coupons/{couponId}/codes

Create coupon code. A successful request returns HTTP 201 with the documented response body.

Authorization

bearerAuth
AuthorizationBearer <token>

OAuth2 access token issued by Ecomiq Auth.

In: header

Path Parameters

couponId*string

Identifier of the coupon.

Header Parameters

x-Store-Id?string

Store the request acts on. Not needed when the token is bound to a store.

Authorization*string

OAuth 2.0 bearer token.

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

application/problem+json

curl -X POST "https://example.com/v1/coupons/7204558912004325301/codes" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>" \  -H "Content-Type: application/json" \  -d '{    "code": "example_code",    "usageLimit": 1  }'
{  "id": "7204558912004325301",  "code": "example_code",  "usageLimit": 1,  "usageCount": 1,  "assignedCustomers": [    {      "customerId": "7204558912004325301",      "email": "andrea@example.com",      "firstName": "Andrea",      "lastName": "Ramos"    }  ],  "createdOn": "2026-08-01T15:30:00Z",  "updatedOn": "2026-08-01T15:30:00Z"}