Skip to main content

Get Promotion Codes

GET 

https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes

You can use this endpoint to retrieve promotion codes.

note
  • The codes.max_uses attribute represents the maximum usage of the codes.
  • The codes.uses attribute represents the remaining number of times the codes can be used for the promotion.
  • Codes created before April 27, 2023 will only have codes.uses attribute in the response body.

Request

Responses

Response Headers

    Authorization: http

    name: bearerAuthtype: httpscheme: bearer
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes");
    request.Headers.Add("Accept", "application/json");
    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
    — headerrequired
    — query
    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.