Create Hotel Master API
Overview
Creates a new Hotel Master entity containing address, star rating, check-in/out times, timezone, amenities, GST details, and property code.
- Endpoint:
/api/hotels/create - Method:
POST
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Display name of the hotel |
brandName | String | No | Hotel brand name |
starRating | Enum | No | ONE_STAR, TWO_STAR, THREE_STAR, FOUR_STAR, FIVE_STAR, UNRATED (Default: UNRATED) |
description | String | No | Hotel description |
address | String | Yes | Street address |
cityId | Number | No | City ID reference |
stateId | Number | No | State ID reference |
pincode | String | No | Area pincode |
phone | String | No | Contact phone number |
email | String | No | Hotel email address |
website | String | No | Official website URL |
checkInTime | String | No | Default check-in time (Default: "14:00") |
checkOutTime | String | No | Default check-out time (Default: "11:00") |
timezone | String | No | Timezone (Default: "Asia/Kolkata") |
amenities | String | No | Amenities list |
gstin | String | No | GSTIN number |
propertyCode | String | No | Unique property code |
Request Body Example
{
"name": "Grand Palace Resort & Spa",
"brandName": "Grand Palace",
"starRating": "FIVE_STAR",
"description": "Luxury 5-star resort in North Goa",
"address": "123 Beach Road",
"cityId": 1,
"stateId": 1,
"pincode": "403001",
"phone": "+919876543210",
"email": "stay@grandpalace.com",
"checkInTime": "14:00",
"checkOutTime": "11:00",
"timezone": "Asia/Kolkata",
"propertyCode": "GP-GOA-001"
}
Response Example (201 Created)
{
"success": true,
"data": {
"id": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"name": "Grand Palace Resort & Spa",
"starRating": "FIVE_STAR",
"timezone": "Asia/Kolkata",
"active": true,
"createdAt": "2026-09-01T12:00:00.000Z"
},
"message": "Hotel Master created successfully"
}