Delete coupon

Delete a specific coupon from an Ecwid store referring to its code or ID.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Response

A JSON object of type 'DeleteStatus' with the following fields:

DeleteStatus

FieldTypeDescription
deleteCountnumberThe number of deleted coupons (1 or 0 depending on whether the request was successful). It returns 0 when the coupon with the given code is not found

Errors

In case of error, Ecwid responds with an error HTTP status code and JSON-formatted body containing error description.

HTTP codes

HTTP StatusResponse JSONDescription
400Request parameters are malformed
403Access token doesn't have update_discount_coupons scope
500The request failed because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language
Authorization
Query