[DELETE] Delete Promotion
Request Description
DELETE /v1/promotion/[promotion id]
The request allows you to delete promotions.
When deleting a promotion:
- If the promotion type was coupon, all the promotion codes associated with the promotion get deleted.
- If the promotion type was discount, all the discounts associated with the promotion get deleted.
- If the promotion was applied to any orders, its deletion does not affect these orders (order statuses are ignored).
- The promotion is marked as deleted.
No information about deleted promotions returns in response to other requests.
Connection Data
- Endpoint URL:
- Production environment: https://api.ecommerce.noventiq.com/v1/promotion
- Test environment: https://api.ecommerce.noventiq.com.demonqweb.com/v1/promotion
- Request Method: DELETE
- Authorization: token-based
Promotion identifier
You can get it from: Example: /v1/promotion/123456
You can get it from: Example: /v1/promotion/123456
Authorization token.
- Format:
Bearer [token]
- Where [token] is substituted by the token, value obtained through the authentication API
Example of Request
DELETE https://api.ecommerce.noventiq.com/v1/promotion/123456
Response Description
In response to the request, you receive the server response code corresponding to the processing result. Depending on the code, the response body may contain additional parameters.
Successful Response
If processing is successful, the following will return in response server response code: HTTP/1.1 200 ОК.
Error Response
If an error occurs while processing the request, you receive a server response code corresponding to the result of processing.
Depending on the code, the response body may contain additional parameters.
HTTP Server Response Error Code
HTTP code | Description |
HTTP/1.1 400 Bad Request | The request is not valid (error in parameters; necessary data is not transferred, etc.). An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 401 Unauthorized | Unsuccessful authorization. An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 404 Not found | Invalid request URL or no promotion having the identifier transferred is found. If no promotion is found, an additional additional error code will return in the response body. |
HTTP/1.1 500 Request Error | Internal Server Error. Please try again later or contact support. |
Additional Error Codes for HTTP 400
Error | Message | Description |
11000 | No access to promotion management. Please contact technical support. | During processing, we could not identify your account setting unambiguously. Please contact support team. |
Additional Error Codes for HTTP 401
The errors are the same for all the APIs that use token authorization.
Additional Error Codes for HTTP 404
Error | Message | Description |
11200 | Promotion not found: [promotion id] | No promotion with the identifier transferred is found, or you do not have the rights to get the data. |
Example of Error Response
{
"errors": [{
"error": 11200,
"message": "Promotion not found: 123"
}
]
}