Developer Quick Start Guide
Get up and running with Enjoy Holiday Hub APIs in under 10 minutes
Obtain Your API Key
Generate sandbox credentials to start testing immediatelyEvery request to the Enjoy Holiday Hub API must be authenticated. For local sandbox testing and prototyping, you can use the universal demo key below without waiting for manual verification:
demo_123456789
For live production keys, register your agency in the Agent Portal.
Set Authentication Headers
Standard HTTP headers for all API requests
Pass your API key in the X-API-Key request header. All requests must set Accept: application/json and POST requests must set Content-Type: application/json.
X-API-Key: demo_123456789
Content-Type: application/json
Accept: application/json
Execute Your First Flight Search
Find available flights for a specific route and travel date
Send a POST request to /api/b2b/flights/search.php specifying origin, destination, and travel date:
curl -X POST "https://enjoyholidayhub.com/api/b2b/flights/search.php" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-Key: demo_123456789" \
-d '{
"api_key": "demo_123456789",
"origin": "DEL",
"destination": "BOM",
"departure_date": "2026-11-20",
"trip_type": "OneWay",
"adults": 1,
"cabin_class": "Economy"
}'
<?php
$payload = array (
'api_key' => 'demo_123456789',
'origin' => 'DEL',
'destination' => 'BOM',
'departure_date' => '2026-11-20',
'trip_type' => 'OneWay',
'adults' => 1,
'cabin_class' => 'Economy',
);
$ch = curl_init('https://enjoyholidayhub.com/api/b2b/flights/search.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Accept: application/json',
'X-API-Key: demo_123456789'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
const response = await fetch('https://enjoyholidayhub.com/api/b2b/flights/search.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'demo_123456789'
},
body: JSON.stringify({
"api_key": "demo_123456789",
"origin": "DEL",
"destination": "BOM",
"departure_date": "2026-11-20",
"trip_type": "OneWay",
"adults": 1,
"cabin_class": "Economy"
})
});
const data = await response.json();
console.log(data);
import requests
url = 'https://enjoyholidayhub.com/api/b2b/flights/search.php'
payload = {
"api_key": "demo_123456789",
"origin": "DEL",
"destination": "BOM",
"departure_date": "2026-11-20",
"trip_type": "OneWay",
"adults": 1,
"cabin_class": "Economy"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'demo_123456789'
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Lock Fare & Block Inventory
Freeze ticket fare and hold room/seats while customer paysTo guarantee ticket availability and prevent supplier price jumps during customer checkout, call the block endpoint:
- Hotels: Call
/api/b2b/hotels/block-room.phpwithhotel_idandroom_idto hold room for 15 minutes. - Buses: Call
/api/b2b/bus/block-seat.phpwithbus_idand selectedseat_numbers.
Submit Passenger Information
Domestic vs International passenger validation requirementsOur APIs automatically detect domestic and international travel based on origin and destination country codes:
| Travel Type | Required Information | Passport Required? |
|---|---|---|
| Domestic (India) | First Name, Last Name, Gender, Date of Birth, Contact Mobile, Email | No |
| International | Passport Name, Passport Number, Issuing Country, Issue & Expiry Dates, Nationality | Yes (Mandatory) |
Confirm Booking & Issue PNR
Wallet deduction and instant ticket confirmationSend the confirmed passenger manifest and booking token. The API validates agent credit balance, issues the supplier PNR, and returns the booking reference:
{
"status": "success",
"booking_id": "EHH-BOK-884912",
"pnr": "6EF9Z1",
"booking_status": "CONFIRMED",
"ticket_url": "https://enjoyholidayhub.com/api/b2b/flights/ticket.php?booking_id=EHH-BOK-884912"
}
Listen for Webhook Updates
Receive real-time asynchronous notificationsRegister your webhook URL in your agent dashboard to receive instant push alerts for flight schedule revisions, cancellation confirmations, and visa application status updates.
View Webhook Event PayloadsIntegration Checklist
- Register Agent Account
- Test in Sandbox Mode
- Implement Error Handling
- Configure Webhook Listener
- Fund B2B Wallet Balance
- Request Live API Keys
Our technical API support engineers are available 24/7 to assist with your custom setup.
api-support@enjoyholidayhub.com