Delete a Promotion via Promotion Code
DELETEhttps://useast.api.elasticpath.com/v2/carts/:cartID/discounts/:promoCode
You can remove promotion code from a cart if it was applied manually. This endpoint does not work if the promotion is applied automatically.
Request
Path Parameters
cartID stringrequired
Specifies the unique identifier of a cart created by you.
promoCode stringrequired
Specifies the promotion code to be deleted.
Responses
- 204
- 401
No Content
Response Headers
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
detail string
status string
title string
[
null
]
{
"errors": {
"status": 401,
"title": "Unauthorized"
}
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X DELETE 'https://useast.api.elasticpath.com/v2/carts/:cartID/discounts/:promoCode' \
-H 'Authorization: Bearer <TOKEN>'
ResponseClear