Coupons
Create a coupon
Scope: write_discounts
Creates a coupon. Only method and discount_type are required;
every other field takes its default. The whole coupon must then
follow the coupon rules:
a code coupon needs a code, an automatic one needs a title
and no code, and so on.
- The code is trimmed and saved lowercased. Another live coupon of
the store with the same code answers
409 code_taken. - Each applicable item must be a product, variant or category of
this store; one that is not answers
422on itsitem_id, with its type as the rule.
Send an Idempotency-Key to retry safely.
POST
cURL
Authorizations
An access token from the OAuth flow (eo_at_...). It lasts one hour;
refresh it with the refresh token. See Authentication.
Headers
Body
application/json
Only starts_at and expires_at take null.