Delete A Single Rule Promotion Code
DELETEhttps://useast.api.elasticpath.com/v2/rule-promotions/:promotionID/codes/:codeID
Deletes a single promotion code from a specific rule promotion.
- Permanently removes the specified promotion code, making it unavailable for future use.
- Can be used to revoke a specific code without affecting other codes under the same promotion.
- If the code has already been redeemed, it will still be removed from the system but may still reflect in historical transactions.
A successful request returns a 204 No Content
response, indicating the specified promotion code has been deleted.
Request
Path Parameters
promotionID stringrequired
The unique identifier of the rule promotion.
codeID stringrequired
The unique identifier of the rule promotion code.
Header Parameters
Authorization Bearerrequired
The Bearer token required to get access to the API.
Responses
- 204
No Content
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/rule-promotions/:promotionID/codes/:codeID");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear