Skip to main content
PUT
Update Discount

Update Discount

Updates an existing discount code. Only provided fields will be updated.

Request

Path Parameters

string
required
The unique discount ID to update

Body Parameters

All parameters are optional. Only provided fields will be updated. Any field not listed below is ignored.
string
Discount code (changing code affects any saved links)
string
Discount type: percentage, fixed_amount, free_shipping, buy_x_get_y
number
Discount value (percentage or fixed amount). Must be >= 0.
string
What the discount applies to: all, products, collections
array
Product IDs (when applies_to is products)
array
Collection IDs (when applies_to is collections)
number
Minimum order amount required for the discount to apply
integer
Maximum total uses. Must be >= 1.
boolean
Limit to one use per customer
string
Start date (ISO 8601)
string
End date (ISO 8601)
string
Discount status: active, expired, scheduled, disabled

Response

Returns the standard response envelope with the updated discount row under data.discount.
integer
HTTP status code (e.g. 200)
string
Response state: success or error
string
Human-readable message (null on success)
object
The updated discount object

Example Response

Notes

  • Setting status to disabled (or any value other than active) deactivates the discount; active reactivates it.
  • Changing the code will affect any shared links or saved customer carts.
  • Usage count cannot be modified directly.

Error Response

Errors return the same envelope with an error state. A missing discount returns 404: