Get Hotel By ID API
Overview
Fetches detailed information for a single Hotel Master entity along with its active rooms, availability rules, and closed date blackouts.
- Endpoint:
/api/hotels/get-by-id - Method:
POST/GET
Request Payload (req.body or req.query)
| Field | Type | Required | Description |
|---|---|---|---|
id | String (UUID) | Yes | Hotel Master ID |
Request Body Example
{
"id": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d"
}
Response Example (200 OK)
{
"success": true,
"data": {
"id": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"name": "Grand Palace Resort & Spa",
"starRating": "FIVE",
"timezone": "Asia/Kolkata",
"amenities": "Free Wi-Fi, Swimming Pool, Spa & Wellness",
"amenitiesList": [
{
"id": "m1234567-89ab-cdef-0123-456789abcdef",
"amenityId": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"amenity": {
"id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"name": "Free Wi-Fi",
"category": "GENERAL"
}
}
],
"rooms": [
{
"id": "11223344-5566-7788-9900-aabbccddeeff",
"roomType": "DELUXE",
"roomName": "Ocean Deluxe Suite",
"basePricePerNight": 4500,
"formattedBasePrice": "₹4,500.00",
"totalRooms": 10
}
]
},
"message": "Hotel details fetched successfully"
}