Vouchers

Create a voucher and its voucher codes

Creates a new voucher and the associated voucher codes, if given.

post/v1/vouchers

Request

Request body application/x-www-form-urlencoded

codesstring[]

Only available when voucher_type is 'PROMO'. An array of associated voucher codes.

event_series_idsstring[]

An array of associated event series IDs

expiryinteger nullable

Voucher's expiry date as Unix timestamp.

interval30 | 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.

namestring required

A descriptive name given to the voucher

partial_redemption'true' | 'false' nullable

Indicates whether voucher can be partially redeemed

usable_on_any_event'true' | 'false' nullable

Indicates whether voucher can be used on any event

voucher_type'PROMO' | 'GIFT_CARD' nullable

Indicates whether voucher is for promotional codes or gift vouchers. If null then it will default to "PROMO"

valueinteger required

Voucher value in cents.

Example request

{
  "codes": [
    "testCode1",
    "testCode2"
  ],
  "event_series_ids": [
    "es_1",
    "es_2"
  ],
  "expiry": 1588368600,
  "name": "Test voucher with codes",
  "partial_redemption": "false",
  "usable_on_any_event": "true",
  "voucher_type": "PROMO",
  "value": 540
}

Response

Successfully created a new voucher

objectstring
idstring

A unique identifier for the voucher

available_codesinteger

The number of unused voucher codes belonging to the voucher

event_series_idsstring[]

List of event series IDs

namestring

A descriptive name given to the voucher

partial_redemption'true' | 'false'

Indicates whether voucher can be partially redeemed

total_codesinteger

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

valueinteger

The integer value in cents given to the voucher

Example response

{
  "object": "voucher",
  "id": "vo_123",
  "available_codes": 7,
  "event_series_ids": [
    "es_123",
    "es_234",
    "es_345"
  ],
  "interval": null,
  "expiry": {
    "date": "2020-05-01",
    "formatted": "Fri 1 May 2020 10:30 PM",
    "iso": "2020-05-01T22:30:00+01:00",
    "time": "22:30",
    "timezone": "+01:00",
    "unix": 1588368600
  },
  "name": "Test Voucher",
  "partial_redemption": "true",
  "total_codes": 25,
  "type": "PROMO",
  "usable_on_any_event": "true",
  "value": 540
}

Changes

No recorded changes to this operation across all 6 revisions of this API.