v1

latestOpenAPI 3.0.22026-07-223907721.1 MB
Vouchers

Get a voucher

Use this call to get a specific single voucher. Please note that you wont get the vouchers secret properties code and pin (use the vouchers/{id}/complete call instead).

get/vouchers/{id}

Path parameters

idstring required

Response

OK

idstring

A unique custom identifier for this voucher (e.g. a sku). Also used for activation of this voucher. (optional, if not set for this voucher it will be auto generated based on the UI regex settings)

client_idstring

id of the client that created this voucher

skustring

Optional SKU

batchstring

Optional campaign or grouping identifier

amountstring

Amount in the currency of this voucher. Must be send as string in the following pattern:

  • Up to five digits before the decimal point
  • The decimal point (.)
  • Exactly two digits after the decimal point
currencystring

The three-character ISO-4217 currency code - https://en.wikipedia.org/wiki/ISO_4217#Active_codes

valid_untilstring RFC3339

Date until which this voucher is valid and can be redeemed. Calculated based on validity_value and validity_interval on activation. This property will be null if the voucher is inactive.

validity_valueinteger

Calculates together with validity_interval the date until which this voucher is valid after activation (if not set this property will be defined by the settings in the UI)

validity_interval'days' | 'weeks' | 'months' | 'years'

Calculates together with validity_value the date until which this voucher is valid after activation (if not set this property will be defined by the settings in the UI)

status'active' | 'inactive'

The status of this voucher. In general vouchers are inactive when created, and gets activated when payed. Only activated vouchers can be charged.

type'print' | 'digital'

Defines if this voucher is printed or digital. Printed vouchers will have the status inactive by default.

taxableboolean

Defines if this voucher is a taxable multi purpose voucher

tax_ratestring

The tax rate for this voucher (only required when taxable is true)

order_numberstring

An optional order number for this voucher

datastring

Any additional custom data for this voucher as a JSON string

created_atstring RFC3339

created_at - datetime in RFC3339 format, see https://tools.ietf.org/html/rfc3339

updated_atstring RFC3339

updated_at - datetime in RFC3339 format, see https://tools.ietf.org/html/rfc3339

remaining_amountstring

The remaining amount of this voucher

deletableboolean

Indicates if this voucher is deletable as it was not used yet

Example response

{
  "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
}