Export API
Donations
1min
code examples curl location 'https //tnapi ticketpay de/exports/paid donations' \\ \ 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/paid donations", 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/paid donations") 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/paid donations" 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 donations { "total" 1625, "page" 1, "size" 1000, "data" \[ { "id" 2929, "shop id" 14669, "event id" 78001, "shop order id" 431113, "name" "unicef donation", "status" "approved", "amount" 20, "donation id" 7609, "created iso" "2022 02 26t19 29 42+01 00", "updated iso" "2022 02 26t19 29 43+01 00" } ] }// response for a failed authentification { "message" "unauthorized" }