API Specification

Hotel Search API

v1.2.0 Active API Key Required

Search available hotels based on location, dates, and guests

Endpoint

POST /api/b2b/hotels/search.php

This API returns a list of available hotels for the selected location, date range, and guest configuration.

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
CitystringRequiredCity name or code
CheckIndateRequiredCheck-in date (YYYY-MM-DD)
CheckOutdateRequiredCheck-out date (YYYY-MM-DD)
RoomsintegerRequiredNumber of rooms
AdultsintegerRequiredNumber of adults
ChildrenintegerOptionalNumber of children

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "City": "Delhi",
    "CheckIn": "2026-05-10",
    "CheckOut": "2026-05-12",
    "Rooms": 1,
    "Adults": 2,
    "Children": 0
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/hotels/search.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "City": "Delhi",
    "CheckIn": "2026-05-10",
    "CheckOut": "2026-05-12",
    "Rooms": 1,
    "Adults": 2,
    "api_key": "demo_123456789"
}'

Response Example

JSON Response
{
    "status": true,
    "data": {
        "search_token_id": "HTLSEARCH123",
        "hotels": [
            {
                "hotel_id": 101,
                "search_token_id": "SEARCH_TOKEN_HERE",
                "result_index": "TBO10",
                "hotel_code": "6440547",
                "name": "Grand Palace Hotel",
                "rating": 4,
                "location": "New Delhi",
                "price_from": 4500,
                "available_rooms": 5,
                "thumbnail": "https://example.com/hotel.jpg"
            },
            {
                "hotel_id": 102,
                "name": "City Inn",
                "rating": 3,
                "location": "Karol Bagh",
                "price_from": 2800,
                "available_rooms": 3,
                "thumbnail": "https://example.com/hotel2.jpg"
            }
        ]
    }
}

Response (Error)

ERROR / NOTICE No hotels found for selected criteria
JSON Response
{
    "status": false,
    "message": "No hotels found for selected criteria"
}

Important Notes

  • 🔑 search_token_id is required for room info API
  • 📅 Prices vary based on dates and demand
  • 🔁 Availability changes in real-time
  • 📌 Use HotelCode, ResultIndex, and SearchTokenId to fetch hotel/room info
  • 🏨 Results may include multiple room types per hotel