Skip to content
PromotionsCoupons

Create coupon

Creates a coupon with type, amount, rules, schedule, limits and codes; returns its ID.

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://api.ecomiq.pe/api/v1/coupons" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>" \  -H "Content-Type: application/json" \  -d '{    "name": "Bienvenida 10 %",    "description": "10 % de descuento en la primera compra.",    "status": "active",    "type": "percentage",    "target": "order",    "amount": 10,    "codes": [      "BIENVENIDA10"    ],    "customerUsageLimit": 1,    "combineWithOtherDiscounts": false  }'
{  "id": "7204558912004325430"}