> For the complete documentation index, see [llms.txt](https://docs.entrytickets.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.entrytickets.eu/dashboard/tickets/vouchers.md).

# Vouchers

## Retrieving vouchers

The tickets vouchers API allows you to retrieve a detailed list of individual vouchers, including scan status, customer details, and voucher information.

### Request

<mark style="color:green;">`GET`</mark> `/tickets/vouchers`

**Params**

| Parameter | Required | Type   | Description                                            |
| --------- | -------- | ------ | ------------------------------------------------------ |
| event     | Required | string | Event slug identifier                                  |
| from      | Optional | string | Start date and time (format: `YYYY-MM-DD HH:MM:SS`)    |
| to        | Optional | string | End date and time (format: `YYYY-MM-DD HH:MM:SS`)      |
| page      | Optional | int    | The current page of the results (default: 1)           |
| limit     | Optional | int    | Number of results per page (default: 100, max: 10,000) |

**Request Example**

```
curl --request GET \
  --url 'https://entrytickets.be/api/tickets/vouchers?event=summer-festival&from=2024-08-31%2020%3A00%3A00&to=2025-09-30%2020%3A00%3A00&page=1&limit=100'
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "vouchers": [
    {
      "date": "2024-08-15 14:32:18",
      "code": "VOU123ABC456",
      "transaction_id": "a8f94b2c-7e15-4d89-bf23-9c4e8a7f6d12",
      "type": "drink_voucher_5",
      "name": "Sarah Johnson",
      "email": "sarah.johnson@example.com",
      "note": "",
      "scan_date": "2024-08-16 18:45:22"
    },
    {
      "date": "2024-08-15 16:45:32",
      "code": "VOU789DEF012",
      "transaction_id": "guest_b2f84c1d-3e25-4a89-bf23-8c4e9a7f6d34",
      "type": "food_voucher_meal",
      "name": "Michael Chen",
      "email": "michael.chen@example.com",
      "note": "guestlist",
      "scan_date": null
    }
  ],
  "total": 156,
  "page": 1,
  "pages": 2,
  "limit": 100
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

**General Response Fields**

<table><thead><tr><th width="139.6015625">Field</th><th width="129.734375">Type</th><th>Description</th></tr></thead><tbody><tr><td>vouchers</td><td>array</td><td>List of individual voucher objects</td></tr><tr><td>total</td><td>int</td><td>Total number of vouchers available</td></tr><tr><td>page</td><td>int</td><td>Current page number</td></tr><tr><td>pages</td><td>int</td><td>Total number of pages</td></tr><tr><td>limit</td><td>int</td><td>Number of vouchers per page</td></tr></tbody></table>

**Voucher Response Fields**

<table><thead><tr><th width="165.96875">Field</th><th>Description</th></tr></thead><tbody><tr><td>date</td><td>The timestamp when the voucher was created (<code>YYYY-MM-DD HH:MM:SS</code>)</td></tr><tr><td>code</td><td>The unique voucher code/barcode</td></tr><tr><td>transaction_id</td><td>The transaction ID this voucher belongs to</td></tr><tr><td>type</td><td>The voucher type slug identifier</td></tr><tr><td>name</td><td>Name assigned to the voucher holder</td></tr><tr><td>email</td><td>Customer's email address</td></tr><tr><td>note</td><td>Additional notes (e.g., "guestlist" for guest vouchers)</td></tr><tr><td>scan_date</td><td>The timestamp when the voucher was scanned (null if not scanned)</td></tr></tbody></table>
