Skip to main content

Update Hotel Master API

Overview​

Updates an existing Hotel Master entity by its unique ID.

  • Endpoint: /api/hotels/update
  • Method: POST

Request Body Schema​

FieldTypeRequiredDescription
idString (UUID)YesHotel Master ID to update
nameStringNoUpdated hotel name
brandNameStringNoUpdated brand name
starRatingEnumNoONE, TWO, THREE, FOUR, FIVE, UNRATED
descriptionStringNoUpdated description
addressStringNoUpdated street address
cityIdNumberNoUpdated city ID
stateIdNumberNoUpdated state ID
pincodeStringNoUpdated pincode
latitudeNumberNoUpdated latitude
longitudeNumberNoUpdated longitude
phoneStringNoUpdated contact phone
emailStringNoUpdated contact email
websiteStringNoUpdated website URL
checkInTimeStringNoUpdated check-in time
checkOutTimeStringNoUpdated check-out time
timezoneStringNoUpdated timezone
amenitiesStringNoUpdated amenities
amenitiesListArray of ObjectsNoList 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
imagesStringNoUpdated image URLs
cancellationPolicyStringNoUpdated cancellation policy
gstinStringNoUpdated GSTIN
gstTypeEnumNoUpdated GST type
propertyCodeStringNoUpdated property code
activeBooleanNoActive 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"
}