ESTAGE Support
IdeasMy tickets

Update a coupon or store discount

Permission coupons:writeRate limit writesIdempotent with Idempotency-Key

Send 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.

PATCHhttps://api.estage.com/v1/coupons/{id}

Authorization

ESTAGE-API-Keystringheaderrequired

A project key, est_live_…, from Settings → API keys. Call from server code only.

Path parameters

idintegerrequired

Body

application/json
codestring≤ 255 chars

What 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_activeboolean
usage_countintegernullable≥ 1

How many times it can be used in total; null = unlimited.

commentsstringnullable≤ 2000 chars

Internal note.

discountintegernullable≥ 0

coupon_type product only (required there): the amount, a whole number — percent or money depending on discount_type. For commerce, value is used.

discount_typestringnullable

Required 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_rebillsboolean

coupon_type product only.

productsarray of integernullable≤ 500 items

coupon_type product only: product ids of this project the coupon applies to. Ignored for commerce (use applies_to).

tagsarray of integernullable≤ 100 items

coupon_type product only: contact tag ids of this project; only buyers with one of these tags can use the coupon. Ignored for commerce.

methodstringnullable

commerce only: code = the buyer types code; automatic = applied to every qualifying cart.

One of code, automatic

kindstringnullable

commerce 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≥ 0

commerce only: required for percent (above 0, at most 100) and fixed (money in the store currency). Ignored for free and free_shipping.

applies_toobjectnullable

commerce kind product only: which products are discounted. Omitted or all lists empty = every product. Ignored for other kinds.

Show 3 fields
product_idsarray of integer

Products of this project.

product_typesarray of string

Product type values (as on the product).

collection_idsarray of integer

Collections of this project.

buyobjectnullable

commerce 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≥ 1
amountnumber≥ 0

Spend at least this much instead of a quantity.

product_idsarray of integer
product_typesarray of string
collection_idsarray of integer
getobjectnullable

commerce kind buy_x_get_y only: what the buyer gets discounted (by discount_type/value, or free).

Show 5 fields
quantityinteger≥ 1
max_repeatsinteger≥ 1

How many times the offer can apply in one order.

product_idsarray of integer
product_typesarray of string
collection_idsarray of integer
min_subtotalnumbernullable≥ 0

commerce only: the cart subtotal needed.

min_quantityintegernullable≥ 1

commerce only: the number of items needed.

customer_orders_minintegernullable≥ 0

commerce only: the buyer must have at least this many earlier orders.

customer_orders_maxintegernullable≥ 0

commerce only: the buyer must have at most this many earlier orders (0 = first order only).

once_per_customerboolean

commerce only.

combines_withobjectnullable

commerce only: which other discount classes this one may stack with. Missing keys = false.

Show 3 fields
productboolean
orderboolean
shippingboolean
coupon_typestring

Ignored: 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 chars

Any unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.

RequestcURL
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" }'
OK
{
  "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"
  }
}
Example. Errors are { error: { code, message, details } }.