> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Promotion Codes

> Retrieve codes for a specific promotion

<ParamField header="Authorization" type="string" required>
  Bearer token with `marketing:read` scope
</ParamField>

<ParamField path="id" type="string" required>
  The promotion ID
</ParamField>

## Query parameters

<ParamField query="status" type="string">
  Filter by status: `active`, `inactive`, `expired`
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of results per page (max 100)
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Number of results to skip
</ParamField>

## Response

<ResponseField name="data.codes" type="array">
  Array of promotion code objects
</ResponseField>

<ResponseField name="data.meta" type="object">
  Pagination metadata
</ResponseField>

```bash Request theme={null}
curl -X GET "https://api.voyantcloud.com/v1/promotions/promo_abc123/codes?status=active" \
  -H "Authorization: Bearer $API_KEY"
```

```json Response theme={null}
{
  "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
    }
  }
}
```
