Vouchers
1 min
GET
https://tnapi.ticketpay.de/exports/vouchers
Query Parameters
- fromstringExampleDescription
- tostringExampleDescription
- filter_bystringExampleDescription
- time_periodstringDescription
- time_rangeintegerDescription
- shop_order_idintegerDescription
- shop_idintegerDescription
- event_idintegerDescription
- statusstringDescription
- per_pageintegerDescription
- pageintegerDescription
Header Parameters
- AuthorizationstringrequiredDescription
Responses
200
- get_vouchers
- totalintegerExample
- pageintegerExample
- sizeintegerExample
- dataobject[]
- idintegerExample
- valid_untilstringExample
- statusstringExample
- event_idintegerExample
- shop_idintegerExample
- shop_order_idintegerExample
- created_isostringExample
- updated_isostringExample
- source_idintegerExample
- source_typestringExample
- codestringExample
- pinstringExample
- initial_valuefloatExample
- saldofloatExample
- usedfloatExample
- refundable_amountfloatExample
- initial_refundfloatExample
- refunded_backfloatExample
- emailstringExample
- use_in_typestringExample
- use_in_idsstringExample
- voucher_setting_idintegerExample
- ibanstringExample
- account_ownerstringExample
- covid_voucherboolean
401
- not_authorized
- messagestringExample
curl
curl --request GET \
--url https://tnapi.ticketpay.de/exports/vouchers \
--header 'accept: application/json' \
--header 'authorization: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("authorization", "string");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://tnapi.ticketpay.de/exports/vouchers", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://tnapi.ticketpay.de/exports/vouchers")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["authorization"] = "string"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://tnapi.ticketpay.de/exports/vouchers"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'authorization': 'string'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Response for get vouchers.
{
"total": 54,
"page": 1,
"size": 54,
"data": [
{
"id": 65841,
"valid_until": "2025-07-31T22:00:00+02:00",
"status": "approved",
"event_id": 78001,
"shop_id": 14669,
"shop_order_id": 322333,
"created_iso": "2022-02-26T19:29:42+01:00",
"updated_iso": "2022-02-26T19:29:43+01:00",
"source_id": 11708,
"source_type": "VoucherTicket",
"code": "VC6TX5H7",
"pin": 12345,
"initial_value": 10.99,
"saldo": 10.99,
"used": "0.0",
"refundable_amount": 10.99,
"initial_refund": "0.0",
"refunded_back": "0.0",
"email": "[email protected]",
"use_in_type": "Shop",
"use_in_ids": "127,130",
"voucher_setting_id": 1277,
"iban": "DE12123456780123456789",
"account_owner": "Max Mustermann",
"covid_voucher": false
}
]
}401
// Response for a failed authentification.
{
"message": "Unauthorized"
}