API Specification

Hotel Booking Detail API

v1.2.0 Active API Key Required

Fetch hotel booking status and voucher-ready booking information

Endpoint

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

This API returns hotel booking details from UP17 or manual inventory.

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
BookingIdstringYes for API bookingUP17 booking ID
SearchTokenIdstringRecommended for API bookingSearch token used for the booking
booking_idintegerYes for manual bookingLocal booking ID
booking_refstringOptional for manual bookingLocal booking reference

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "BookingId": "123456",
    "SearchTokenId": "SEARCH_TOKEN_HERE"
}

cURL Example

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

Response (Success)

SUCCESS Booking detail fetched successfully
JSON Response
{
    "status": true,
    "message": "Booking detail fetched successfully",
    "data": {
        "booking_id": 78901,
        "status": "confirmed",
        "hotel_name": "Grand Palace Hotel"
    }
}

Response (Error)

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

Important Notes

  • ๐Ÿงพ API booking detail requires BookingId
  • ๐Ÿ”‘ Pass SearchTokenId whenever it is available
  • ๐Ÿจ Manual bookings can be fetched by booking_id or booking_ref