Skip to content

Get bookingorder guestdata for one guest

GET
/v1/bookingorders/{bookingorder_id}/guestdata/{guest_id}
Server

Get the current guest data for a specific bookingorder and specific guest and what conditions apply.

Authorizations

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

Parameters

Path Parameters

bookingorder_id*

XS2event ID of the Bookingorder

Typestring
Required
guest_id*

XS2event ID of the guest

Typestring
Required

Query Parameters

sorting
Typestring
default
include_conditions

Include validation conditions?

Typeboolean
Examplefalse
defaultfalse
country_hint

Hint for country code

Typestring
ExampleNLD

Responses

OK
application/json
JSON
{
"first_name": "John",
"last_name": "Doe",
"passport_number": "ABC123456",
"contact_email": "user@example.com",
"contact_phone": "+31123456789",
"lead_guest": true,
"date_of_birth": "1991-01-30",
"gender": "male",
"country_of_residence": "NLD",
"street_name": "Hereweg 95",
"additional_street_name": "e",
"city": "Groningen",
"zip": "9721AA",
"province": "Groningen",
"guest_id": "string",
"conditions": "string"
}

Samples

cURL
curl -X GET \
'https://api.xs2event.com/v1/bookingorders/{bookingorder_id}/guestdata/{guest_id}?include_conditions=false&country_hint=NLD' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.xs2event.com/v1/bookingorders/{bookingorder_id}/guestdata/{guest_id}?include_conditions=false&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/bookingorders/{bookingorder_id}/guestdata/{guest_id}';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'include_conditions' => 'false',
    '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/bookingorders/{bookingorder_id}/guestdata/{guest_id}'
params = {
    'include_conditions': false,
    'country_hint': 'NLD'
}
headers = {
    'Content-Type': 'application/json'
}

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