Skip to main content

Create Hotel Room API

Overview​

Adds a new room type configuration and inventory allocation to a Hotel Master.

  • Endpoint: /api/hotels/rooms/create
  • Method: POST

Request Body Schema​

FieldTypeRequiredDescription
hotelIdString (UUID)YesTarget hotel ID reference
roomTypeEnumNoSINGLE, DOUBLE, TWIN, DELUXE, SUITE, FAMILY, EXECUTIVE, PRESIDENTIAL (Default: DELUXE)
roomNameStringNoCustom room name
maxOccupancyNumberNoMaximum guest capacity (Default: 2)
bedConfigurationEnumNoSINGLE, DOUBLE, TWIN, QUEEN_SIZE, KING_SIZE, SOFA_BED, BUNK_BED
floorNumberNumberNoFloor level number
basePricePerNightNumberYesBase rate per night (>= 0)
totalRoomsNumberNoTotal room inventory count (Default: 1)
mealPlanEnumNoROOM_ONLY, BREAKFAST, HALF_BOARD, FULL_BOARD, ALL_INCLUSIVE (Default: ROOM_ONLY)
freeCancellationTillHoursNumberNoFree cancellation window in hours before check-in
amenitiesStringNoRoom amenities
amenitiesListArray of ObjectsNoList of room amenity map objects (each item having optional id and required amenityId). Pass id: null for new entries or existing map ID if updating
imagesStringNoRoom photo URLs

Request Body Example​

{
"hotelId": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"roomType": "DELUXE",
"roomName": "Ocean Deluxe Suite",
"maxOccupancy": 3,
"bedConfiguration": "KING_SIZE",
"floorNumber": 4,
"basePricePerNight": 4500.00,
"totalRooms": 10,
"mealPlan": "BREAKFAST",
"freeCancellationTillHours": 24,
"amenities": "Sea View, King Bed, Private Balcony",
"amenitiesList": [
{
"id": null,
"amenityId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
],
"images": "https://example.com/room1.jpg"
}

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"
}