GET
Get Codes by Promotion IDhttps://useast.api.elasticpath.com/v2/promotions/:id/codes
Parameters Path parameters Name Required Type Description id
Required string
The unique promotion identifier.
Name Required Type Description Authorization
Required string
The Bearer token required to get access to the API.
Query parameters Name Required Type Description filter
Optional string
Specifies the filter attributes. See Filtering .
Filtering The following operators and attributes are available when filtering promotion codes within a specific promotion. You can apply filtering to both used and unused promotion codes.
Attribute Type Operator Example code
string
eq
eq(code,DRF8-8VSX)
Request Example curl https://useast.api.elasticpath.com/v2/promotions/:id/codes \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
Response Example 200 OK
{
"data" : [
{
"code" : "ZXY_CBA"
} ,
{
"code" : "ABC_XYZ"
}
]
}