API Specification

Booking Detail API

v1.2.0 Active API Key Required

Fetch complete details of a bus booking

Endpoint

POST /api/b2b/bus/getbookingdetail.php

This API retrieves full booking details including passenger information, journey details, 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

Request Example

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

cURL Example

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

Response Example

JSON Response
{
    "status": true,
    "data": {
        "booking_id": 12345,
        "pnr": "PNR987654",
        "status": "confirmed",
        "journey_date": "2026-05-10",
        "origin": "Delhi",
        "destination": "Jaipur",
        "boarding_point": "ISBT Kashmere Gate",
        "dropping_point": "Sindhi Camp",
        "passengers": [
            {
                "name": "Rahul Sharma",
                "seat": "A1",
                "age": 30,
                "gender": "male"
            }
        ]
    }
}

Response (Error)

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

Important Notes

  • ๐Ÿ” Use correct BookingId to fetch details
  • ๐Ÿ“Š Status can be confirmed, pending, or cancelled
  • ๐Ÿงพ Booking details include passenger and journey info
  • ๐Ÿ” Data may update based on booking status changes