The search can be performed by providing a query string along with optional parameters such as check-in and check-out dates, number of adults, children, and room count. Additional filters, including minimum star rating, maximum and minimum price, amenities, and room types, can be applied to narrow down the search results.
Sample request:
GET /hotels/search?searchTerm=Tokyo&maxPrice=100&minStarRating=4&amenities=FreeWifi&roomTypes=Standard
Query parameters
-
Check in date in UTC (defaults to today)
-
Check out date in UTC (defaults to tomorrow)
-
Number of adults (defaults to 2)
-
Number of children (defaults to 0)
-
Number of rooms (defaults to 1)
-
Minimum star rating filter
-
Maximum price filter
-
Minimum price filter
-
List of amenities to filter by
-
List of room types to filter by
Values are
Standard,Luxury,Budget, orBoutique. -
search by:
-
sort by:
-
asc or desc
curl \
-X GET http://api.example.com/api/Hotels/search \
-H "Authorization: Bearer $ACCESS_TOKEN"
[
{
"id": "string",
"name": "string",
"starRate": 42,
"hotelImage": {
"imageUrl": "string",
"alternativeText": "string"
},
"description": "string",
"priceStartingFrom": 42.0
}
]
[
{
"id": "string",
"name": "string",
"starRate": 42,
"hotelImage": {
"imageUrl": "string",
"alternativeText": "string"
},
"description": "string",
"priceStartingFrom": 42.0
}
]