List Hotels Master API
Overview
Retrieves a paginated list of Hotel Master records with optional search filters.
- Endpoint:
/api/hotels/list - Method:
GET
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
search | String | No | Search keyword for name, address, property code |
cityId | Number | No | Filter by city ID |
starRating | Enum | No | Filter by star rating |
page | Number | No | Page number (Default: 1) |
limit | Number | No | Results per page (Default: 10) |
Response Example (200 OK)
{
"success": true,
"data": {
"hotels": [
{
"id": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"name": "Grand Palace Resort & Spa",
"starRating": "FIVE_STAR",
"city": { "id": 1, "name": "Goa" }
}
],
"pagination": {
"totalCount": 1,
"page": 1,
"limit": 10,
"totalPages": 1
}
},
"message": "Hotels fetched successfully"
}