commerce

POST /v1/promo-codes/quote

Preview what a discount code takes off these items.

All commerce endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

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

NameTypeRequiredWhat it is
codestringYes—
currencyCurrencyCodeYesISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
org_idUuidNoUUIDv7 identifier — sortable by creation time (docs/02 §8).
itemsCouponQuoteItem[]Yes—

Response

NameTypeRequiredWhat it is
codestringYes—
validbooleanYes—
reasonCouponReasonYesWhy a code does not apply (null when it does). Stable values the surfaces translate.
messageobjectNo—
kindobjectNo—
percent_offobjectNo—
amount_off_minorobjectNo—
amount_off_currencyobjectNo—
scopeobjectNo—
currencystringYes—
itemsobject[]Yes—
discount_total_minorintegerYes—

Errors this endpoint can return

401 · 403 · 422 · 429