API Specification

Hotel Info API

v1.2.0 Active API Key Required

Get detailed information about a selected hotel

Endpoint

POST /api/b2b/hotels/hotel-info.php

This API returns detailed information about a selected hotel including amenities, images, location, and policies.

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
SearchTokenIdstringRequiredToken received from hotel search
ResultIndexstringRequiredSelected hotel result index from search
HotelCodestringRequiredSelected hotel code from search

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "SearchTokenId": "SEARCH_TOKEN_HERE",
    "ResultIndex": "TBO10",
    "HotelCode": "6440547"
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/hotels/hotel-info.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "SearchTokenId": "SEARCH_TOKEN_HERE",
    "ResultIndex": "TBO10",
    "HotelCode": "6440547",
    "api_key": "demo_123456789"
}'

Response Example

JSON Response
{
    "status": true,
    "data": {
        "HotelCode": "6440547",
        "name": "Grand Palace Hotel",
        "rating": 4,
        "location": "New Delhi",
        "address": "Connaught Place, New Delhi",
        "description": "Luxury hotel in the heart of the city",
        "amenities": [
            "Free WiFi",
            "Swimming Pool",
            "Gym",
            "Restaurant"
        ],
        "images": [
            "https://example.com/image1.jpg",
            "https://example.com/image2.jpg"
        ],
        "policies": [
            "Check-in after 2 PM",
            "Check-out before 11 AM",
            "No pets allowed"
        ]
    }
}

Response (Error)

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

Important Notes

  • 🏨 Use HotelCode, ResultIndex, and SearchTokenId from search results
  • 📸 Images help improve booking conversion
  • 📜 Policies must be shown before booking
  • ⭐ Rating is indicative and may vary
  • 📍 Location data helps in map integration