Skip to content

Get bookings

GET
/v1/bookings
Server

Gets a list with bookings.

Authorizations

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

Parameters

Query Parameters

sorting
Typestring
default
page_size

Number of items per page

Typeinteger
default50
page

Current page

Typeinteger
default1
reservation_id

Filter by reservation ID

Example5e3ae0658c9e405a9a62367293b8f56b_rsr
default
booking_id

Filter by booking ID

Example5867e9941e924a7bb169e244b26589ba_bkn
default
booking_code

Filter by booking code

ExampleDQW32M
default
booking_email

Filter by customer email

Exampleuser@example.com
default
distributor_id

Filter by distributor ID

Exampleb05f667dcaa843bd8c171c522217eb81_dst
default
client_id

Filter by client ID

Example19941a73d2b5498caf6894d62bb6c3a4_cln
default
compare_mode

Combine filters with AND / OR

ExampleAND
defaultOR
query

Free-text search (e.g. name, email)

ExampleSmith
default
mass_booking

Filter by mass booking status

Examplefalse
default
event_id

Filter by event ID

Examplea0351f57524a4119ab838038c2718588_evt
default

Responses

OK
application/json
JSON
{
"bookings": [
{
"booking_id": "5867e9941e924a7bb169e244b26589ba_bkn",
"reservation_id": "5e3ae0658c9e405a9a62367293b8f56b_rsr",
"booking_code": "DQW32M",
"created": "2024-06-11T14:29:25",
"updated": "2024-06-11T15:12:03",
"client_id": "19941a73d2b5498caf6894d62bb6c3a4_cln",
"booking_email": "alice@example.com",
"payment_method": "invoice",
"payment_reference": "INV-2025-0001",
"booking_reference": "BOOK-2025-0001",
"distributorfinancial_status": "OPEN",
"logistic_status": "COMPLETED",
"deleted": "string",
"items": [
{
"currency": "EUR",
"event_id": "a0351f57524a4119ab838038c2718588_evt",
"event_name": "Grand Prix Netherlands",
"event_season": "2024",
"net_rate": 48000,
"quantity": 2,
"salesprice": 50000,
"ticket_id": "dbe592106db4431a8260c2656dc753ac_tck",
"ticket_name": "Category 1 Seat",
"tournament_name": "Formula 1"
}
]
}
],
"pagination": {
"total_size": 1,
"page_size": 50,
"next_page": "string",
"previous_page": "string"
}
}

Samples

cURL
curl -X GET \
'https://api.xs2event.com/v1/bookings?reservation_id=5e3ae0658c9e405a9a62367293b8f56b_rsr&booking_id=5867e9941e924a7bb169e244b26589ba_bkn&booking_code=DQW32M&booking_email=user%40example.com&distributor_id=b05f667dcaa843bd8c171c522217eb81_dst&client_id=19941a73d2b5498caf6894d62bb6c3a4_cln&compare_mode=AND&query=Smith&mass_booking=false&event_id=a0351f57524a4119ab838038c2718588_evt' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.xs2event.com/v1/bookings?reservation_id=5e3ae0658c9e405a9a62367293b8f56b_rsr&booking_id=5867e9941e924a7bb169e244b26589ba_bkn&booking_code=DQW32M&booking_email=user%40example.com&distributor_id=b05f667dcaa843bd8c171c522217eb81_dst&client_id=19941a73d2b5498caf6894d62bb6c3a4_cln&compare_mode=AND&query=Smith&mass_booking=false&event_id=a0351f57524a4119ab838038c2718588_evt', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.xs2event.com/v1/bookings';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'reservation_id' => '5e3ae0658c9e405a9a62367293b8f56b_rsr',
    'booking_id' => '5867e9941e924a7bb169e244b26589ba_bkn',
    'booking_code' => 'DQW32M',
    'booking_email' => 'user@example.com',
    'distributor_id' => 'b05f667dcaa843bd8c171c522217eb81_dst',
    'client_id' => '19941a73d2b5498caf6894d62bb6c3a4_cln',
    'compare_mode' => 'AND',
    'query' => 'Smith',
    'mass_booking' => 'false',
    'event_id' => 'a0351f57524a4119ab838038c2718588_evt',
]);

$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/bookings'
params = {
    'reservation_id': '5e3ae0658c9e405a9a62367293b8f56b_rsr',
    'booking_id': '5867e9941e924a7bb169e244b26589ba_bkn',
    'booking_code': 'DQW32M',
    'booking_email': 'user@example.com',
    'distributor_id': 'b05f667dcaa843bd8c171c522217eb81_dst',
    'client_id': '19941a73d2b5498caf6894d62bb6c3a4_cln',
    'compare_mode': 'AND',
    'query': 'Smith',
    'mass_booking': false,
    'event_id': 'a0351f57524a4119ab838038c2718588_evt'
}
headers = {
    'Content-Type': 'application/json'
}

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