API Specification
Hotel Search API
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 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 |
|---|---|---|---|
City | string | Required | City name or code |
CheckIn | date | Required | Check-in date (YYYY-MM-DD) |
CheckOut | date | Required | Check-out date (YYYY-MM-DD) |
Rooms | integer | Required | Number of rooms |
Adults | integer | Required | Number of adults |
Children | integer | Optional | Number 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