Update Hotel Room API
Overview
Updates configuration details, total room inventory capacity, or nightly rates for a Hotel Room.
- Endpoint:
/api/hotels/rooms/update - Method:
POST
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
id | String (UUID) | Yes | Target Room ID |
roomType | Enum | No | Updated room type |
roomName | String | No | Updated room name |
maxOccupancy | Number | No | Updated max occupancy |
bedConfiguration | Enum | No | SINGLE, DOUBLE, TWIN, QUEEN_SIZE, KING_SIZE, SOFA_BED, BUNK_BED |
floorNumber | Number | No | Updated floor number |
basePricePerNight | Number | No | Updated base rate per night |
totalRooms | Number | No | Updated total room capacity |
mealPlan | Enum | No | Updated meal plan |
freeCancellationTillHours | Number | No | Updated free cancellation window in hours |
amenities | String | No | Updated room amenities |
amenitiesList | Array of Objects | No | List of room amenity map objects (each item having optional id and required amenityId). Pass id if updating existing HotelAmenityMap entry, or id: null if creating new entry |
images | String | No | Updated room photo URLs |
active | Boolean | No | Active status flag |
Request Body Example
{
"id": "11223344-5566-7788-9900-aabbccddeeff",
"roomName": "Ocean Deluxe Suite Premium",
"bedConfiguration": "KING_SIZE",
"basePricePerNight": 4800.00,
"totalRooms": 12,
"freeCancellationTillHours": 24,
"amenitiesList": [
{
"id": "33445566-7788-9900-aabb-ccddeeff1122",
"amenityId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
},
{
"id": null,
"amenityId": "550e8400-e29b-41d4-a716-446655440000"
}
],
"active": true
}
Response Example (200 OK)
{
"success": true,
"data": {
"id": "11223344-5566-7788-9900-aabbccddeeff",
"roomName": "Ocean Deluxe Suite Premium",
"basePricePerNight": "4800.00",
"totalRooms": 12
},
"message": "Hotel room updated successfully"
}