Skip to main content
Authorization
string
required
Bearer token with marketing:read scope
id
string
required
The promotion ID

Query parameters

status
string
Filter by status: active, inactive, expired
limit
integer
default:"50"
Number of results per page (max 100)
offset
integer
default:"0"
Number of results to skip

Response

data.codes
array
Array of promotion code objects
data.meta
object
Pagination metadata
Request
curl -X GET "https://api.voyantcloud.com/v1/promotions/promo_abc123/codes?status=active" \
  -H "Authorization: Bearer $API_KEY"
Response
{
  "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
    }
  }
}