commerce
POST /v1/promo-codes/quote
Preview what a discount code takes off these items.
Authentication
Send an API key as a bearer token. The endpoint checks billing.payment.manage; a key without it is refused with 403, not 404.
Where your organisation id goes
This endpoint takes org_id as a field in the JSON body.
Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/promo-codes/quote \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "code": <string>, "currency": <CurrencyCode>, "items": <CouponQuoteItem[]> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
A DISPLAY for the checkout form (docs/1311): the same rules and arithmetic as the cart, on the catalogue amounts given. Checkout re-prices the basket and charges from the cart, never from this answer. once_per_customer is judged against the caller's org (org_id, required only when the caller manages billing for several).
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
code | string | Yes | — |
currency | CurrencyCode | Yes | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
org_id | Uuid | No | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
items | CouponQuoteItem[] | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
code | string | Yes | — |
valid | boolean | Yes | — |
reason | CouponReason | Yes | Why a code does not apply (null when it does). Stable values the surfaces translate. |
message | object | No | — |
kind | object | No | — |
percent_off | object | No | — |
amount_off_minor | object | No | — |
amount_off_currency | object | No | — |
scope | object | No | — |
currency | string | Yes | — |
items | object[] | Yes | — |
discount_total_minor | integer | Yes | — |
Errors this endpoint can return
401 · 403 · 422 · 429