---
title: "List voucher codes"
method: GET
path: "/v1/vouchers/{voucher_id}/codes"
tags: ["Voucher codes"]
---

# List voucher codes

`GET /v1/vouchers/{voucher_id}/codes`

## Request

- Base URL: `https://api.tickettailor.com`
- URL: `https://api.tickettailor.com/v1/vouchers/{voucher_id}/codes`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/tickettailor/apis/ticket-tailor-api/docs/v1/vouchers/:voucher_id/codes/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a list of paginated voucher codes

## Path parameters

- `voucher_id` string, required

## Query parameters

- `limit` string
- `expiry_date` integer
- `expiry_date.gt` integer
- `expiry_date.gte` integer
- `expiry_date.lt` integer
- `expiry_date.lte` integer
- `created_at` integer
- `created_at.gt` integer
- `created_at.gte` integer
- `created_at.lt` integer
- `created_at.lte` integer

## Response `200`

Successfully returned the list of voucher codes

- object
  - `data` VoucherCode[]
    - `object` string
    - `id` string: A unique identifier for the voucher code
    - `code` string: A descriptive name given to the voucher code
    - `expiry` object: Voucher code's expiry date
      - `date` string: ISO-8601 date for the start of the event
      - `formatted` string: A formatted date string for the start of the event
      - `iso` string: ISO-8601 date and time for the start of the event
      - `time` string: Time for the start of the event
      - `timezone` string: Timezone offset for the start of the event
      - `unix` integer: Unix timestamp for the start of the event
    - `used` object, nullable: Voucher code's used date
      - `date` string: ISO-8601 date for the start of the event
      - `formatted` string: A formatted date string for the start of the event
      - `iso` string: ISO-8601 date and time for the start of the event
      - `time` string: Time for the start of the event
      - `timezone` string: Timezone offset for the start of the event
      - `unix` integer: Unix timestamp for the start of the event
    - `value` integer: The integer value in cents given to the voucher code
    - `voucher_id` string: A unique identifier of the voucher that the code belongs To
  - `links` object
    - `next` string, nullable
    - `previous` string, nullable

## Other responses

- `default`: Error schema

---

[API](https://skmtc.dev/tickettailor/apis/ticket-tailor-api.md) - [All operations](https://skmtc.dev/tickettailor/apis/ticket-tailor-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tickettailor/apis/ticket-tailor-api/revisions/b10f60afda54?raw)
