Create Coupon

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Requires the Store plan feature and store coupons enabled for the partner (403 otherwise).

Body

  • name — required.
  • code and/or organization_tag_id — at least one. A code is redeemed by the customer; a tag hands the coupon to every organization carrying it.
  • discount_type — percent with percent_off (1-100), or fixed_amount with amount_off and currency.
  • amount_off — in major units of currency (12.34 USD, 500 JPY); more decimals than the currency has is rejected, never rounded. currency must be one of the store currencies.
  • store_listing_id — optional; omitted means the whole store.
  • starts_at / ends_at — optional ISO 8601 exact instants with a UTC offset; ends_at is exclusive. See "Dates" below.
  • active — defaults to true.

Dates

The Partner portal shows dates in the viewer's time zone. To match "valid from

  • starts_at — midnight that starts the first day, in the user's time zone. Example: 2026-12-01T00:00:00-05:00.
  • ends_at — the last millisecond of the last day, in the same time zone. Example: 2026-12-31T23:59:59.999-05:00. This is what the portal stores for "through Dec 31".
  • Do not send midnight of the next day (2027-01-01T00:00:00). The portal then shows Jan 1 as the end date.
  • If you do not know the user's time zone, ask for it.

How coupons apply

  • A customer gets the coupons of its organization tags plus the coupons it redeemed by code.
  • Per product, price interval and currency, the store applies one coupon: the one with the largest discount. Coupons never add up. On a tie, the older coupon wins.
  • A coupon applies only while it is active, after starts_at and before ends_at.

Free and minimum prices

The coupon is checked against every price it targets: every listing for a whole-store coupon, or the one listing. A fixed_amount coupon checks only prices in its currency.

  • 422 Coupon would make the <interval> price of '<listing name>' free — the discount is equal to or larger than a monthly or yearly price.
  • 422 Coupon would bring the <interval> price of '<listing name>' below the minimum charge — the price left is above 0 but below the minimum charge (the equivalent of 0.70 USD).
  • One-time prices may become free (0). They may not end between 0 and the minimum charge.
  • Create the coupon first. Add the tag to organizations only after the coupon exists.

Success

201 Created — the new coupon, in the shape of Get Coupons.

200 OK — an identical coupon of the partner already exists (a safe retry). It is returned in the same shape and nothing is created.

Errors

  • 404 — organization_tag_id or store_listing_id is not the partner's.
  • 422 — validation, e.g. Code is not available (the code is taken, including by this partner's coupon with different fields), amount_off has too many decimal places for USD.
Body Params
string
required
string
required
number
string
string
string
string
string
boolean
string

Code the customer redeems. Send code and/or organization_tag_id.

integer

1-100, with discount_type percent

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json