Skip to content

Get guest data requirements

GET
/v1/tickets/{ticket_id}/guestdata
Server

Get the guestdata requirements for a specific event.

Authorizations

api_key
TypeAPI Key (header: X-Api-Key)

Parameters

Path Parameters

ticket_id*

XS2event ID of the Ticket

Typestring
Required

Query Parameters

country_hint
Typestring
ExampleNLD

Responses

OK
application/json
JSON
{
"guest_data_requirements": [
[
"first_name",
"last_name",
"lead_guest",
"pre_checkout"
]
]
}

Samples

cURL
curl -X GET \
'https://api.xs2event.com/v1/tickets/{ticket_id}/guestdata?country_hint=NLD' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.xs2event.com/v1/tickets/{ticket_id}/guestdata?country_hint=NLD', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.xs2event.com/v1/tickets/{ticket_id}/guestdata';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'country_hint' => 'NLD',
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://api.xs2event.com/v1/tickets/{ticket_id}/guestdata'
params = {
    'country_hint': 'NLD'
}
headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, params=params, headers=headers)
print(response.json())