Export API
Vouchers
1min
code examples curl location 'https //tnapi ticketpay de/exports/vouchers' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); 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));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" response = https request(request) puts response read body import requests import json url = "https //tnapi ticketpay de/exports/vouchers" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // 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" "example\@ticketpay de", "use in type" "shop", "use in ids" "127,130", "voucher setting id" 1277, "iban" "de12123456780123456789", "account owner" "max mustermann", "covid voucher" false } ] }// response for a failed authentification { "message" "unauthorized" }