---
title: "Update a voucher"
method: POST
path: "/v1/vouchers/{voucher_id}"
tags: ["Vouchers"]
---

# Update a voucher

`POST /v1/vouchers/{voucher_id}`

## Request

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

Update an exiting voucher's name. If any voucher codes are given, create new voucher codes and associate them with the voucher

## Path parameters

- `voucher_id` string, required

## Request body `application/x-www-form-urlencoded`

- object
  - `codes` string[], nullable: An array of associated voucher codes.
  - `event_series_ids` object: An array of associated event series IDs
  - `expiry` integer, nullable: Voucher's expiry date as Unix timestamp.
  - `interval` 30 | 90 | 365, nullable: Only available when voucher_type is gift_card. Voucher's expiry date is calculated from this number of days on day of issue.
  - `name` string, nullable: A descriptive name given to the voucher
  - `usable_on_any_event` 'true' | 'false', nullable: Indicates whether voucher can be used on any event
  - `value` integer, nullable: Voucher value in cents.

## Response `201`

Successfully updated the voucher

- Voucher
  - `object` string
  - `id` string: A unique identifier for the voucher
  - `available_codes` integer: The number of unused voucher codes belonging to the voucher
  - `event_series_ids` string[]: List of event series IDs
  - `expiry` object, nullable: Voucher'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
  - `name` string: A descriptive name given to the voucher
  - `partial_redemption` 'true' | 'false': Indicates whether voucher can be partially redeemed
  - `total_codes` integer: Total number of voucher codes belonging to the voucher
  - `usable_on_any_event` 'true' | 'false', nullable: Indicates whether voucher can be used on any event
  - `type` 'PROMO' | 'GIFT_CARD': Type of voucher
  - `value` integer: The integer value in cents given to the voucher

## 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)
