Skip to content

Create booking

POST
/v1/bookings
Server

Create booking

Authorizations

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

Request Body

JSON
{
"reservation_id": "somereservation1232454_id",
"booking_email": "myemail@example.com",
"invoice_reference": "invoice 0001",
"booking_reference": "booking 0001",
"payment_method": "invoice"
}

Responses

Created
application/json
JSON
{
"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"
}
]
}

Samples

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

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
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'

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())