Get Rule Promotion Codes
GEThttps://useast.api.elasticpath.com/v2/rule-promotions/:promotionID/codes
Retrieves the list of promotion codes associated with a specific Rule Promotion.
- Returns all codes generated for the given promotion ID, including details on usage limits and redemption status.
- Supports both automatically generated and manually created promotion codes.
- Can be used to verify whether a promotion code is still valid or has reached its usage limit.
Request
Responses
- 200
OK
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.Get, "https://useast.api.elasticpath.com/v2/rule-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());
ResponseClear