favorites

Record a view

Runs user.trackView. Call when the customer opens a hotel. Send the hotel's hotelKey (hk_…, from search or detail) as entityId, plus its ref and the display fields name, imageUrl (https or site-relative), city, country, starRating (0-5) so the list can open and render the hotel on any device. A ref naming a different hotel than entityId is a 400. An sh_ ref sent as entityId is accepted and filed under its hotel key. A repeat view of the same hotel moves it to the top and refreshes its snapshot instead of adding an entry. Returns { success: true }. Best-effort on the client: a failure here must never block the screen.

post/v1/recent-views

Request

  • Base URL: https://api.getmyhotels.com
  • URL: https://api.getmyhotels.com/v1/recent-views
  • Auth: HTTP bearer

Request body

entityType'hotel' | 'flight' | 'car' required
entityIdstring required
refstring nullable
namestring nullable
imageUrlstring nullable
citystring nullable
countrystring nullable
starRatingnumber nullable

Response

Success

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.