API Specification
Booking Detail API
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 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 |
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