API Specification
Flight Booking Detail API
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 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 |
|---|---|---|---|
BookingId | integer | Required | Unique booking ID |
PNR | string | Optional | Airline 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