API Specification
Flight Search API
Search available flights between origin and destination
Endpoint
POST
/api/b2b/flights/search.php
This API returns available flight options based on search criteria such as route, date, and passenger count.
API Key Authentication
Authenticate requests via HTTP Header or Request ParameterEnjoy Holiday Hub APIs authenticate requests using your unique secret API Key. You can provide your key in either of the following standard formats:
Method 1: Header (Recommended)
Send key in standard HTTP header:
X-API-Key: demo_123456789
Method 2: Body / Query
Send key in JSON payload or query param:
"api_key": "demo_123456789"
Demo Sandbox Key:
Get your production key in Agent Portal
demo_123456789
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
Origin | string | Required | Source airport code (e.g., DEL) |
Destination | string | Required | Destination airport code (e.g., BOM) |
DepartureDate | date | Required | Departure date (YYYY-MM-DD) |
ReturnDate | date | Optional | Return date (required for round trip) |
TripType | integer | Required | 1 = One Way, 2 = Round Trip |
Adults | integer | Required | Number of adult passengers |
Children | integer | Optional | Number of children |
Infants | integer | Optional | Number of infants |
CabinClass | string | Optional | Economy / Business / First |
Request Example
JSON Response
{
"api_key": "YOUR_API_KEY",
"Origin": "DEL",
"Destination": "BOM",
"DepartureDate": "2026-05-10",
"TripType": 1,
"Adults": 1,
"Children": 0,
"Infants": 0,
"CabinClass": "Economy"
}
cURL Example
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 '{
"Origin": "DEL",
"Destination": "BOM",
"DepartureDate": "2026-05-10",
"TripType": 1,
"Adults": 1,
"api_key": "demo_123456789"
}'
Response Example
JSON Response
{
"status": true,
"data": {
"search_token_id": "SEARCH_TOKEN_HERE",
"results": [
{
"result_index": "TOB0",
"fare_id": "TOB0",
"airline": "IndiGo",
"flight_number": "6E-202",
"origin": "DEL",
"destination": "BOM",
"departure_time": "2026-05-10T10:00:00",
"arrival_time": "2026-05-10T12:30:00",
"duration": "2h 30m",
"stops": 0,
"fare": {
"base": 5000,
"tax": 1200,
"total": 6200
}
}
]
}
}
Response (Error)
ERROR / NOTICE
No flights found for selected route
JSON Response
{
"status": false,
"message": "No flights found for selected route"
}
Important Notes
- 🔑 SearchTokenId is required for fare rule, SSR, fare confirmation, booking detail, booking, and cancellation
- 📌 Use result_index / fare_id from search results as UP17 ResultIndex
- 💰 Prices are dynamic and may change anytime
- 🔁 Always perform fare confirmation before booking
- ✈️ Results depend on airline availability