Retrieves the reviews for a specific hotel based on the specified query parameters.

GET /api/hotels/{hotelId}/reviews

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

Path parameters

  • hotelId string(uuid) Required

    The unique identifier of the hotel.

Query parameters

  • PageNumber integer(int32)
  • PageSize integer(int32)
  • SearchTerm string

    search by:

  • SortColumn string

    sort by:

  • SortOrder string

    asc or desc

Responses

  • Returns the list of hotel reviews based on the query parameters.

    Hide response attributes Show response attributes object
    • id string(uuid)
    • title string | null
    • description string | null
    • rating integer(int32)
    • creationDate string(date-time)
    • lastModified string(date-time)
    • guest object
      Hide guest attributes Show guest attributes object
      • id string(uuid)
      • firstName string | null
      • lastName string | null
      • fullName string | null
      • numberOfBookings integer(int32)
      • Additional properties are NOT allowed
    • hotelId string(uuid)
    • hotelName string | null
    • Additional properties are NOT allowed
    Hide response attributes Show response attributes object
    • id string(uuid)
    • title string | null
    • description string | null
    • rating integer(int32)
    • creationDate string(date-time)
    • lastModified string(date-time)
    • guest object
      Hide guest attributes Show guest attributes object
      • id string(uuid)
      • firstName string | null
      • lastName string | null
      • fullName string | null
      • numberOfBookings integer(int32)
      • Additional properties are NOT allowed
    • hotelId string(uuid)
    • hotelName string | null
    • Additional properties are NOT allowed
    Hide response attributes Show response attributes object
    • id string(uuid)
    • title string | null
    • description string | null
    • rating integer(int32)
    • creationDate string(date-time)
    • lastModified string(date-time)
    • guest object
      Hide guest attributes Show guest attributes object
      • id string(uuid)
      • firstName string | null
      • lastName string | null
      • fullName string | null
      • numberOfBookings integer(int32)
      • Additional properties are NOT allowed
    • hotelId string(uuid)
    • hotelName string | null
    • Additional properties are NOT allowed
  • 400

    If the request data is invalid

  • 404

    If the hotel is not found.

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"
}