Update Hotel Master API
Overview
Updates an existing Hotel Master entity by its unique ID.
- Endpoint:
/api/hotels/update - Method:
POST
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
id | String (UUID) | Yes | Hotel Master ID to update |
name | String | No | Updated hotel name |
brandName | String | No | Updated brand name |
starRating | Enum | No | ONE, TWO, THREE, FOUR, FIVE, UNRATED |
description | String | No | Updated description |
address | String | No | Updated street address |
cityId | Number | No | Updated city ID |
stateId | Number | No | Updated state ID |
pincode | String | No | Updated pincode |
latitude | Number | No | Updated latitude |
longitude | Number | No | Updated longitude |
phone | String | No | Updated contact phone |
email | String | No | Updated contact email |
website | String | No | Updated website URL |
checkInTime | String | No | Updated check-in time |
checkOutTime | String | No | Updated check-out time |
timezone | String | No | Updated timezone |
amenities | String | No | Updated amenities |
amenitiesList | Array of Objects | No | List of 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 image URLs |
cancellationPolicy | String | No | Updated cancellation policy |
gstin | String | No | Updated GSTIN |
gstType | Enum | No | Updated GST type |
propertyCode | String | No | Updated property code |
active | Boolean | No | Active status flag |
Request Body Example
{
"id": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"name": "Grand Palace Resort & Premium Spa",
"brandName": "Grand Palace",
"starRating": "FIVE",
"phone": "+919876543211",
"email": "stay@grandpalace.com",
"amenitiesList": [
{
"id": "11223344-5566-7788-9900-aabbccddeeff",
"amenityId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
},
{
"id": null,
"amenityId": "550e8400-e29b-41d4-a716-446655440000"
}
],
"active": true
}
Response Example (200 OK)
{
"success": true,
"data": {
"id": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"name": "Grand Palace Resort & Premium Spa",
"phone": "+919876543211"
},
"message": "Hotel Master updated successfully"
}