Retrieves a collection of unique recently visited hotels for a guest, presenting essential details.

GET /api/Guests/{guestId}/recently-visited-hotels

The resulting collection provides essential information about the last N different hotels the guest visited, such as hotel name, city name, star rating, and price.

Sample request:

GET guests/{guestId}/recently-visited-hotels?count=3

Path parameters

  • guestId string(uuid) Required

    The id of the guest for whom recently visited hotels are to be retrieved.

Query parameters

  • count integer(int32)

    The maximum number of unique recently visited hotels to retrieve. Default is 5.

    Default value is 5.

Responses

  • Returns the last 5 different hotels the guest visited

    Hide response attributes Show response attributes object
    • hotelName string | null
    • hotelImage object
      Hide hotelImage attributes Show hotelImage attributes object
      • imageUrl string | null
      • alternativeText string | null
      • Additional properties are NOT allowed
    • cityName string | null
    • starRating integer(int32)
    • price number(double)
    • Additional properties are NOT allowed
    Hide response attributes Show response attributes object
    • hotelName string | null
    • hotelImage object
      Hide hotelImage attributes Show hotelImage attributes object
      • imageUrl string | null
      • alternativeText string | null
      • Additional properties are NOT allowed
    • cityName string | null
    • starRating integer(int32)
    • price number(double)
    • Additional properties are NOT allowed
    Hide response attributes Show response attributes object
    • hotelName string | null
    • hotelImage object
      Hide hotelImage attributes Show hotelImage attributes object
      • imageUrl string | null
      • alternativeText string | null
      • Additional properties are NOT allowed
    • cityName string | null
    • starRating integer(int32)
    • price number(double)
    • Additional properties are NOT allowed
  • 404

    If the guest is not found

GET /api/Guests/{guestId}/recently-visited-hotels
curl \
 -X GET http://api.example.com/api/Guests/{guestId}/recently-visited-hotels \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "hotelName": "string",
    "hotelImage": {
      "imageUrl": "string",
      "alternativeText": "string"
    },
    "cityName": "string",
    "starRating": 42,
    "price": 42.0
  }
]
Response examples (200)
[
  {
    "hotelName": "string",
    "hotelImage": {
      "imageUrl": "string",
      "alternativeText": "string"
    },
    "cityName": "string",
    "starRating": 42,
    "price": 42.0
  }
]