Delete Multiple Promotion Codes
DELETEhttps://useast.api.elasticpath.com/v2/promotions/:promotionID/codes
Use this endpoint to delete multiple promotion codes within a specific promotion.
Request
Path Parameters
promotionID stringrequired
The ID of the promotion associated with the codes.
Header Parameters
Authorization Bearerrequired
The Bearer token required to get access to the API.
Responses
- 204
- 401
- 404
No Content
Unauthorized
- application/json
- Schema
- Example (auto)
- Example
Schema
detailstring
statusstring
titlestring
[
null
]
[
{
"errors": [
{
"status": 401,
"title": "Unauthorized"
}
]
}
]
Not Found
- application/json
- Schema
- Example (auto)
- Example
Schema
detailstring
statusstring
titlestring
[
null
]
[
{
"errors": [
{
"detail": "promotion not found",
"status": 404,
"title": "Not Found"
}
]
}
]
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear