Skip to content

Get reservation guest data of a single guest

GET
/v1/reservations/{reservation_id}/guestdata/{guest_id}
Server

Get the current guest data for the reservation and what is the conditions are.

Authorizations

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

Parameters

Path Parameters

reservation_id*

XS2event ID of the Reservation

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": {
"value": "John",
"condition": "string",
"error": "string"
},
"last_name": {
"value": "John",
"condition": "string",
"error": "string"
},
"passport_number": "string",
"contact_email": "string",
"contact_phone": "string",
"date_of_birth": "string",
"gender": "string",
"country_of_residence": "string",
"lead_guest": true,
"guest_id": "5661e8fd160a48e18ec363cad686ba2c_gst",
"street_name": "string",
"additional_street_name": "string",
"city": "string",
"zip": "string",
"province": "string"
}

Samples

cURL
curl -X GET \
'https://api.xs2event.com/v1/reservations/{reservation_id}/guestdata/{guest_id}?include_conditions=false&country_hint=NLD' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.xs2event.com/v1/reservations/{reservation_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/reservations/{reservation_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/reservations/{reservation_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())