v1

latestOpenAPI 3.0.22026-07-223907721.1 MB
Vouchers

Get a list of vouchers

This call will give you a paginated list of vouchers.

get/vouchers

Query parameters

pageinteger
per_pageinteger
filter[created_from]string RFC3339

Sets a filter to get all entries from this datetime - must be set in RFC3339 format, see https://tools.ietf.org/html/rfc3339

filter[created_to]string RFC3339

Sets a filter to get all entries up to this datetime - must be set in RFC3339 format, see https://tools.ietf.org/html/rfc3339

filter[valid_until_from]string RFC3339

Sets a filter to get all entries from this datetime - must be set in RFC3339 format, see https://tools.ietf.org/html/rfc3339

filter[valid_until_to]string RFC3339

Sets a filter to get all entries up to this datetime - must be set in RFC3339 format, see https://tools.ietf.org/html/rfc3339

filter[client_id]string

Sets a filter to get all entries of this client

filter[client.client_group_id]string

Sets a filter to get all entries of this group

filter[code]string

Sets a filter to get a voucher with this specific code

filter[id]string

Sets a filter to get all entries having this voucher id

filter[sku]string

Sets a filter to get all entries having this SKU

filter[type]'digital' | 'print'

Sets a filter to get only entries of this type

filter[amount]string

Sets a filter to get all entries having this amount

filter[status]string[]

Sets a filter to get all entries with this status

filter[batch]string

Sets a filter to get all entries that belongs to a specific batch

filter[remaining_amount]boolean

Set to true to get only vouchers that still have credit. Set to false to get vouchers without remaining credit.

filter[taxable]boolean

Sets a filter to get only vouchers that are taxable or not

filter[tax_rate]string

Sets a filter to get only vouchers with this tax rate

sortstring[]

Sets one or multiple fields to sort the result. Each field can be prefixed by a minus sign (-) to sort descending.

Response

OK

Example response

{
  "data": [
    {
      "id": "4ZH83T0ACUUC14CW",
      "client_id": "da39a3ee5eb28b7392ef5",
      "sku": "AJHS8675FG",
      "batch": "Winter Campaign",
      "amount": "10.53",
      "currency": "EUR",
      "valid_until": "2025-07-21T17:32:28+00:00",
      "validity_value": 24,
      "validity_interval": "months",
      "status": "active",
      "type": "digital",
      "taxable": true,
      "tax_rate": "19",
      "order_number": "Order 66",
      "data": "{\"foo\": \"bar\"}",
      "created_at": "2017-07-21T17:32:28+00:00",
      "updated_at": "2017-07-21T17:32:28+00:00",
      "remaining_amount": "5.50",
      "deletable": true
    }
  ],
  "links": {
    "first": "http://domain/v1/vouchers?page=1",
    "last": "http://domain/v1/vouchers?page=5",
    "prev": "http://domain/v1/vouchers?page=3",
    "next": "http://domain/v1/vouchers?page=2"
  },
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "from": 1,
    "to": 15,
    "last_page": 167,
    "total": 2500,
    "path": "http://domain/v1/vouchers"
  }
}