Bearer token with marketing:read scope
Query parameters
Filter by status: active, inactive, expired
Number of results per page (max 100)
Number of results to skip
Response
Array of promotion code objects
curl -X GET "https://api.voyantcloud.com/v1/promotions/promo_abc123/codes?status=active" \
-H "Authorization: Bearer $API_KEY"
{
"data": {
"codes": [
{
"id": "code_xyz",
"promotionId": "promo_abc123",
"code": "SUMMER20",
"status": "active",
"maxUses": 1000,
"currentUses": 150,
"maxUsesPerCustomer": 1,
"validFrom": "2024-06-01T00:00:00Z",
"validTo": "2024-08-31T23:59:59Z",
"lastUsedAt": "2024-07-20T14:30:00Z",
"createdAt": "2024-05-15T10:35:00Z"
}
],
"meta": {
"total": 1,
"limit": 50,
"offset": 0
}
}
}