List Hotel Rooms API
Overview
Retrieves all active rooms configured for a specific Hotel Master entity or cross-hotel room search.
- Endpoint:
/api/hotels/rooms/list - Method:
GET
Request Query Parameters (req.query)
| Field | Type | Required | Description |
|---|---|---|---|
hotelId | String (UUID) | No | Optional target Hotel Master ID (omit for cross-hotel search) |
search | String | No | Search query for room name or amenities |
roomType | Enum | No | Filter by RoomType (DELUXE, SUITE, SINGLE, DOUBLE, etc.) |
active | Boolean | No | Filter active status |
page | Number | No | Page index (Default: 1) |
limit | Number | No | Page size limit (Default: 10) |
Response Example (200 OK)
{
"success": true,
"message": "Hotel rooms fetched successfully",
"data": {
"rooms": [
{
"id": "11223344-5566-7788-9900-aabbccddeeff",
"hotelId": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"roomType": "DELUXE",
"roomName": "Ocean Deluxe Suite",
"maxOccupancy": 3,
"basePricePerNight": 4500,
"formattedBasePrice": "₹4,500.00",
"totalRooms": 10,
"mealPlan": "BREAKFAST",
"active": true,
"amenitiesList": [
{
"id": "m9876543-21ba-fedc-3210-9876543210fe",
"amenityId": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"amenity": { "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", "name": "Ocean View" }
}
]
}
]
},
"pagination": {
"totalItems": 1,
"currentPage": 1,
"totalPages": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false
}
}