latestOpenAPI 3.1.12026-08-108026304.2 KB

7b222e8ec91c

Vouchers

List vouchers

Returns a list of paginated vouchers

get/v1/vouchers

Query parameters

limitstring

The number of items to retrieve

expiry_dateinteger

Unix timestamp filter that returns items with matched expiry_date value.

expiry_date.gtinteger

Unix timestamp filter that returns items with expiry_date greater than the given value.

expiry_date.gteinteger

Unix timestamp filter that returns items with expiry_date greater than or equal to the given value.

expiry_date.ltinteger

Unix timestamp filter that returns items with expiry_date less than given value.

expiry_date.lteinteger

Unix timestamp filter that returns items with expiry_date less than or equal given value.

created_atinteger

Unix timestamp filter that returns items with matched created_at value.

created_at.gtinteger

Unix timestamp filter that returns items with created_at greater than given value.

created_at.gteinteger

Unix timestamp filter that returns items with created_at greater than or equal given value.

created_at.ltinteger

Unix timestamp filter that returns items with created_at less than given value.

created_at.lteinteger

Unix timestamp filter that returns items with created_at less than or equal given value.

Response

Successfully returned the list of vouchers

Example response

{
  "data": [
    {
      "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
    }
  ],
  "links": {
    "next": "/v1/vouchers?starting_after=vo_123",
    "previous": "/v1/vouchers?ending_before=vo_234"
  }
}