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, TWO, THREE, FOUR, FIVE, 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 |
latitude | Number | No | Latitude coordinate |
longitude | Number | No | Longitude coordinate |
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 |
amenitiesList | Array of Objects | No | List of amenity map objects (each item having optional id and required amenityId). Pass id: null for new entries or existing map ID if updating |
images | String | No | Image URLs array or comma-separated links |
cancellationPolicy | String | No | Detailed property cancellation policy text |
gstin | String | No | GSTIN number |
gstType | Enum | No | REGISTERED, UNREGISTERED, COMPOSITION, or SEZ |
propertyCode | String | No | Unique property code |
supplierId | String (UUID) | No | Third-party supplier ID reference |
tripjackHotelId | String | No | TripJack hotel identifier (e.g. "100234") |
regionIds | Array of Strings | No | Array of CityRegion UUIDs or numeric cityRegionId strings to map hotel to regions |
Request Body Example
{
"name": "Grand Palace Resort & Spa",
"brandName": "Grand Palace",
"starRating": "FIVE",
"description": "Luxury 5-star resort in North Goa",
"address": "123 Beach Road",
"cityId": 1,
"stateId": 1,
"pincode": "403001",
"latitude": 15.4989,
"longitude": 73.8278,
"phone": "+919876543210",
"email": "stay@grandpalace.com",
"website": "https://www.grandpalace.com",
"checkInTime": "14:00",
"checkOutTime": "11:00",
"timezone": "Asia/Kolkata",
"amenities": "WiFi, Pool, Spa, Gym",
"amenitiesList": [
{
"id": null,
"amenityId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}
],
"images": "https://example.com/img1.jpg",
"cancellationPolicy": "Free cancellation 48h before check-in",
"gstin": "30AAAAA0000A1Z5",
"gstType": "REGISTERED",
"propertyCode": "GP-GOA-001",
"tripjackHotelId": "100234",
"regionIds": ["c1b2a3d4-5678-90ef-1234-567890abcdef"]
}
Response Example (201 Created)
{
"success": true,
"data": {
"id": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"name": "Grand Palace Resort & Spa",
"starRating": "FIVE",
"timezone": "Asia/Kolkata",
"active": true,
"createdAt": "2026-09-01T12:00:00.000Z"
},
"message": "Hotel Master created successfully"
}