Skip to main content

Delete A Single Rule Promotion Code

DELETE 

https://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

No Content

Authorization: http

name: BearerAuthtype: httpscheme: bearer
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());
Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Parameters
— pathrequired
— pathrequired
— headerrequired
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.