API Specification

Flight Booking Detail API

v1.2.0 Active API Key Required

Fetch complete details of a flight booking

Endpoint

POST /api/b2b/flights/getbookingdetail.php

This API retrieves complete flight booking details including passenger info, flight segments, PNR, and booking status.

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
BookingIdintegerRequiredUnique booking ID
PNRstringOptionalAirline PNR (optional alternative lookup)

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "BookingId": 56789
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/flights/getbookingdetail.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "BookingId": 56789,
    "api_key": "demo_123456789"
}'

Response Example

JSON Response
{
    "status": true,
    "data": {
        "booking_id": 56789,
        "pnr": "ABC123",
        "status": "confirmed",
        "airline": "IndiGo",
        "origin": "DEL",
        "destination": "BOM",
        "departure_time": "2026-05-10T10:00:00",
        "arrival_time": "2026-05-10T12:30:00",
        "passengers": [
            {
                "name": "Rahul Sharma",
                "type": "Adult",
                "ticket_no": "ET123456789"
            }
        ]
    }
}

Response (Error)

ERROR / NOTICE Booking not found or invalid ID
JSON Response
{
    "status": false,
    "message": "Booking not found or invalid ID"
}

Important Notes

  • ๐Ÿงพ Use BookingId or PNR to fetch details
  • ๐Ÿ“Š Status may be confirmed, pending, or cancelled
  • โœˆ๏ธ Includes passenger and flight segment details
  • ๐Ÿ” Data may update based on airline status changes