Create Hotel Room API
Overview
Adds a new room type configuration and inventory allocation to a Hotel Master.
- Endpoint:
/api/hotels/:hotelId/rooms - Method:
POST
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
roomType | Enum | Yes | SINGLE, DOUBLE, TWIN, DELUXE, SUITE, FAMILY, EXECUTIVE, PRESIDENTIAL |
roomName | String | No | Custom room name |
maxOccupancy | Number | No | Maximum guest capacity (Default: 2) |
basePricePerNight | Number | Yes | Base rate per night |
totalRooms | Number | No | Total room inventory count (Default: 1) |
mealPlan | Enum | No | ROOM_ONLY, BREAKFAST, HALF_BOARD, FULL_BOARD, ALL_INCLUSIVE |
amenities | String | No | Room amenities |
Request Body Example
{
"roomType": "DELUXE",
"roomName": "Ocean Deluxe Suite",
"maxOccupancy": 3,
"basePricePerNight": 4500.00,
"totalRooms": 10,
"mealPlan": "BREAKFAST",
"amenities": "Sea View, King Bed, Private Balcony"
}
Response Example (201 Created)
{
"success": true,
"data": {
"id": "11223344-5566-7788-9900-aabbccddeeff",
"hotelId": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"roomType": "DELUXE",
"roomName": "Ocean Deluxe Suite",
"basePricePerNight": "4500.00",
"totalRooms": 10,
"active": true
},
"message": "Hotel Room created successfully"
}