API Specification
Room Info API
Get available rooms, pricing, and policies for a hotel
Endpoint
POST
/api/b2b/hotels/room-info.php
This API returns available room options for a selected hotel including pricing, meal plans, and cancellation policies.
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 |
|---|---|---|---|
SearchTokenId | string | Required | Token received from hotel search |
ResultIndex | string | Required | Selected hotel result index from search |
HotelCode | string | Required | Selected 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/room-info.php" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-Key: demo_123456789" \
-d '{
"SearchTokenId": "SEARCH_TOKEN",
"ResultIndex": "TBO10",
"HotelCode": "6440547",
"api_key": "demo_123456789"
}'
Response Example
JSON Response
{
"status": true,
"data": [
{
"room_index": 1,
"room_type_code": "ROOM_TYPE_CODE",
"room_name": "Deluxe Room",
"meal_plan": "Breakfast Included",
"price": {
"base": 4000,
"tax": 720,
"total": 4720
},
"max_occupancy": 2,
"available_rooms": 5,
"cancellation_policy": "Free cancellation till 24 hours before check-in"
},
{
"room_id": "RM124",
"room_name": "Executive Suite",
"meal_plan": "Breakfast & Dinner",
"price": {
"base": 6500,
"tax": 1170,
"total": 7670
},
"max_occupancy": 3,
"available_rooms": 2,
"cancellation_policy": "Non-refundable"
}
]
}
Response (Error)
ERROR / NOTICE
No rooms available for selected dates
JSON Response
{
"status": false,
"message": "No rooms available for selected dates"
}
Important Notes
- 🏨 Use HotelCode, ResultIndex, and SearchTokenId from search
- 📅 Prices depend on dates and availability
- 💰 Total price includes base fare + taxes
- 📜 Always display cancellation policy before booking
- 🔁 Room availability is dynamic and may change