Update discount
PATCH
/ admin/ v1/ stores/ {store_id}/ discounts/ {discount_id}- discounts:write
Partially update a discount. Send If-Match: "v{version}" to avoid overwriting someone else's changes.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.discount_idstringrequiredThe discount's ID, like
disc_01k8qs5s….
Headers
If-Matchstring · or nullETag from the last read, e.g. "v3"
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
titlestring · or nulltitle_translationsobject · or nullReplaces the names in other languages; a blank name removes that language.
codestring · or nulleffectobject | object | object | object | object | object · or nullWhat a discount does.
requirementobject | object | object · or nullWhat the cart must contain.
eligibilityobject | object | object | object · or nullWho may use a discount.
combines_withobject · or nullThe other kinds of discounts this one can be used together with.
availabilityobject · or nullWhere and for whom a discount is offered, and what it never applies to.
Returns
200 Updated discount.
Errors
- 404
not_foundNo such discount. - 409Code taken or automatic discount limit reached.
- 412
precondition_failedThe discount changed since it was read. - 422
validation_failedValidation failed.