Update a coupon or store discount
coupons:writeRate limit writesIdempotent with Idempotency-KeySend only what changes; the fields are the same as on create. A store discount is re-checked as a whole after the change (for example, switching kind to product keeps its value but needs a discount_type). The coupon type cannot be changed. Plan and subscription coupons cannot be edited here.
Authorization
ESTAGE-API-KeystringheaderrequiredA project key, est_live_…, from Settings → API keys. Call from server code only.
Path parameters
idintegerrequiredBody
application/jsoncodestring≤ 255 charsWhat the buyer types; unique in the project. For an automatic discount (method automatic) it is the title the buyer sees on the cart. title is accepted as an alias.
is_activebooleanusage_countintegernullable≥ 1How many times it can be used in total; null = unlimited.
commentsstringnullable≤ 2000 charsInternal note.
discountintegernullable≥ 0coupon_type product only (required there): the amount, a whole number — percent or money depending on discount_type. For commerce, value is used.
discount_typestringnullableRequired for coupon_type product, and for commerce kinds except free_shipping. For commerce, free is allowed only with kind buy_x_get_y; for a 100% off elsewhere use percent 100.
One of percent, fixed, free
recurring_rebillsbooleancoupon_type product only.
productsarray of integernullable≤ 500 itemscoupon_type product only: product ids of this project the coupon applies to. Ignored for commerce (use applies_to).
tagsarray of integernullable≤ 100 itemscoupon_type product only: contact tag ids of this project; only buyers with one of these tags can use the coupon. Ignored for commerce.
methodstringnullablecommerce only: code = the buyer types code; automatic = applied to every qualifying cart.
One of code, automatic
kindstringnullablecommerce only, required there. order: off the whole order. product: off the products in applies_to. buy_x_get_y: buy what buy says, get get discounted. free_shipping: shipping is free (value and discount_type are ignored).
One of order, product, buy_x_get_y, free_shipping
valuenumbernullable≥ 0commerce only: required for percent (above 0, at most 100) and fixed (money in the store currency). Ignored for free and free_shipping.
applies_toobjectnullablecommerce kind product only: which products are discounted. Omitted or all lists empty = every product. Ignored for other kinds.
Show 3 fields
product_idsarray of integerProducts of this project.
product_typesarray of stringProduct type values (as on the product).
collection_idsarray of integerCollections of this project.
buyobjectnullablecommerce kind buy_x_get_y only (required there): what the buyer must buy — quantity or amount, plus an optional product scope.
Show 5 fields
quantityinteger≥ 1amountnumber≥ 0Spend at least this much instead of a quantity.
product_idsarray of integerproduct_typesarray of stringcollection_idsarray of integergetobjectnullablecommerce kind buy_x_get_y only: what the buyer gets discounted (by discount_type/value, or free).
Show 5 fields
quantityinteger≥ 1max_repeatsinteger≥ 1How many times the offer can apply in one order.
product_idsarray of integerproduct_typesarray of stringcollection_idsarray of integermin_subtotalnumbernullable≥ 0commerce only: the cart subtotal needed.
min_quantityintegernullable≥ 1commerce only: the number of items needed.
customer_orders_minintegernullable≥ 0commerce only: the buyer must have at least this many earlier orders.
customer_orders_maxintegernullable≥ 0commerce only: the buyer must have at most this many earlier orders (0 = first order only).
once_per_customerbooleancommerce only.
combines_withobjectnullablecommerce only: which other discount classes this one may stack with. Missing keys = false.
Show 3 fields
productbooleanorderbooleanshippingbooleancoupon_typestringIgnored: a coupon's type cannot be changed. If sent as product, discount and discount_type become required.
One of product, commerce
Headers
Idempotency-Keystring≤ 255 charsAny unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.
curl --request PATCH \ --url 'https://api.estage.com/v1/coupons/coupon-id' \ --header 'ESTAGE-API-Key: est_live_your-api-key' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: your-unique-key' \ --data '{ "value": 15, "end_date": "2027-02-28" }'
{
"data": {
"id": 412,
"code": "SUMMER10",
"coupon_type": "commerce",
"method": "code",
"kind": "order",
"discount_type": "percent",
"discount": 15,
"value": "15.00",
"applies_to": null,
"buy": null,
"get": null,
"min_subtotal": "50.00",
"min_quantity": null,
"customer_orders_min": null,
"customer_orders_max": null,
"once_per_customer": false,
"combines_with": {
"product": false,
"order": false,
"shipping": false
},
"products": null,
"tags": null,
"recurring_rebills": false,
"usage_count": null,
"used_count": 0,
"is_active": true,
"usable_now": true,
"start_date": null,
"end_date": "2027-02-28",
"comments": null,
"summary": "15% off the order",
"created_at": "2026-11-02T14:05:31Z",
"updated_at": "2026-11-10T09:12:44Z"
}
}{ error: { code, message, details } }.