API Specification

Developer Quick Start Guide

v1.2.0 Active API Key Required

Get up and running with Enjoy Holiday Hub APIs in under 10 minutes

1

Obtain Your API Key

Generate sandbox credentials to start testing immediately

Every 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:

Sandbox Secret Key demo_123456789

For live production keys, register your agency in the Agent Portal.

2

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
3

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())
4

Lock Fare & Block Inventory

Freeze ticket fare and hold room/seats while customer pays

To guarantee ticket availability and prevent supplier price jumps during customer checkout, call the block endpoint:

  • Hotels: Call /api/b2b/hotels/block-room.php with hotel_id and room_id to hold room for 15 minutes.
  • Buses: Call /api/b2b/bus/block-seat.php with bus_id and selected seat_numbers.
5

Submit Passenger Information

Domestic vs International passenger validation requirements

Our 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)
6

Confirm Booking & Issue PNR

Wallet deduction and instant ticket confirmation

Send 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"
}
7

Listen for Webhook Updates

Receive real-time asynchronous notifications

Register 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 Payloads

Integration Checklist

  • Register Agent Account
  • Test in Sandbox Mode
  • Implement Error Handling
  • Configure Webhook Listener
  • Fund B2B Wallet Balance
  • Request Live API Keys
Need Integration Assistance?

Our technical API support engineers are available 24/7 to assist with your custom setup.

api-support@enjoyholidayhub.com
Open Live API Explorer