API Specification

Flight Search API

v1.2.0 Active API Key Required

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 Parameter
Required for all endpoints

Enjoy 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: demo_123456789
Get your production key in Agent Portal

Request Parameters

FieldTypeRequiredDescription
OriginstringRequiredSource airport code (e.g., DEL)
DestinationstringRequiredDestination airport code (e.g., BOM)
DepartureDatedateRequiredDeparture date (YYYY-MM-DD)
ReturnDatedateOptionalReturn date (required for round trip)
TripTypeintegerRequired1 = One Way, 2 = Round Trip
AdultsintegerRequiredNumber of adult passengers
ChildrenintegerOptionalNumber of children
InfantsintegerOptionalNumber of infants
CabinClassstringOptionalEconomy / 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