Coupons
Update a coupon
Scope: write_discounts
Changes only the fields you send. The coupon rules
are checked on the coupon the change leaves, the saved one with
your changes, so a PATCH can never reach a coupon a create could
not make. For example, turning a code coupon automatic needs
code: "" and a title in the same request.
nullclearsstarts_at(no start) orexpires_at(no expiry); any other field refusesnull. Leaving a field out keeps it.applicable_items, when sent, replaces every item of the coupon;[]removes them all.- A new code taken by another live coupon of the store answers
409 code_taken. usage_countis read only: sending it answers400.
PATCH
cURL
Authorizations
An access token from the OAuth flow (eo_at_...). It lasts one hour;
refresh it with the refresh token. See Authentication.
Body
application/json
Every field is optional; only the fields sent change. null clears
starts_at or expires_at and is refused anywhere else.
applicable_items replaces the coupon's items.