The retrieval of hotel reviews can be customized by providing various query parameters. These parameters include sorting options, page number, page size, and a search term.
Sample request:
GET /hotels/{hotelId}/reviews?sortOrder=desc&sortColumn=creationDate&pageNumber=1&pageSize=5&searchQuery=Excellent
GET
/api/hotels/{hotelId}/reviews
curl \
-X GET http://api.example.com/api/hotels/{hotelId}/reviews \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"id": "string",
"title": "string",
"description": "string",
"rating": 42,
"creationDate": "2024-05-04T09:42:00+00:00",
"lastModified": "2024-05-04T09:42:00+00:00",
"guest": {
"id": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"numberOfBookings": 42
},
"hotelId": "string",
"hotelName": "string"
}
Response examples (200)
{
"id": "string",
"title": "string",
"description": "string",
"rating": 42,
"creationDate": "2025-05-04T09:42:00Z",
"lastModified": "2025-05-04T09:42:00Z",
"guest": {
"id": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"numberOfBookings": 42
},
"hotelId": "string",
"hotelName": "string"
}