Search Documentation
Search for a documentation page...
Coupons API
REST API endpoints for managing checkout discount codes.
Coupons are discount codes customers enter at checkout. Each coupon takes either a percentage off or a fixed amount off, and can be limited by date range, total redemptions, cart product count, or specific products.
List Coupons
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Coupons per page (1-100) |
offset | number | 0 | Coupons to skip |
query | string | — | Search by coupon code |
Response
Create Coupon
Creates a discount code. Codes are case-sensitive and unique per store — creating a coupon with an existing code returns a 409. For fixed coupons on multi-currency stores, supply per-currency amounts via currencyAmounts.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The code customers enter at checkout (case-sensitive) |
type | "percentage" | "fixed" | Yes | A percentage off or a fixed amount off |
value | number | Yes | Percentage (e.g. 10 = 10%) or fixed amount in store currency (min 1) |
startDate | string | No | ISO 8601 datetime the coupon becomes valid |
endDate | string | No | ISO 8601 datetime the coupon expires |
maxUses | number | No | Maximum total redemptions across all customers |
minProductCount | number | No | Minimum cart product count required |
maxProductCount | number | No | Maximum cart product count the coupon applies to |
products | string[] | No | Product UUIDs the coupon is restricted to (empty = all products) |
currencyAmounts | object | No | Per-currency fixed amounts for multi-currency stores (fixed coupons only) |
Response (201)
Get Coupon
Returns a single coupon, addressable by its UUID or by its code.
Response
Update Coupon
Replaces the coupon's fields. Uses the same body as Create Coupon. Renaming onto a code another coupon already owns returns a 409.
Request Body
Same fields as Create Coupon.
Response (200)
Delete Coupon
Hard-deletes the coupon by UUID or code.