Skip to main content
GET
/
vouchers
Get a list of vouchers
curl --request GET \
  --url https://vouchers.api.jtl-software.com/v1/vouchers \
  --header 'Authorization: Bearer <token>'
{
  "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"
  }
}

Authorizations

Authorization
string
header
required

This API uses OAuth 2 with Client Credentials Flow (see: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials).

You can request only a subset of specific scopes for your client, however the available scopes for each client are defined through the client groups in the UI.

Within your token request, you can also send the optional parameter client_type (string with a max length of 32 chars). This value is only used for internal statistics.

Query Parameters

page
integer
default:1
Required range: x >= 1
per_page
integer
default:25
Required range: x >= 1
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]
enum<string>

Sets a filter to get only entries of this type

Available options:
digital,
print
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

sort
enum<string>[]

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

Available options:
created_at

Response

200 - application/json

OK

data
object[]
meta
object