API Specification

Tour Booking Detail API

v1.2.0 Active API Key Required

Fetch complete details of a tour booking

Endpoint

POST /api/b2b/tour/booking-detail.php

This API retrieves complete details of a tour booking including passengers, travel date, 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
BookingRefstringOptionalBooking reference (optional)

Request Example

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

cURL Example

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

Response Example

JSON Response
{
    "status": true,
    "data": {
        "booking_id": 65432,
        "booking_ref": "TRX987654",
        "status": "confirmed",
        "tour_name": "Manali Adventure Trip",
        "travel_date": "2026-06-10",
        "no_of_people": 2,
        "total_amount": 21000,
        "final_amount": 18900,
        "passengers": [
            {
                "name": "Rahul Sharma",
                "age": 30,
                "gender": "male"
            },
            {
                "name": "Priya Sharma",
                "age": 28,
                "gender": "female"
            }
        ]
    }
}

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 BookingRef to fetch details
  • 📊 Status can be confirmed, pending, or cancelled
  • 👥 Passenger details are included in response
  • 📅 Travel date is fixed after booking
  • 💰 Final amount includes discounts (if applied)