Hotels API

HSP suggests using a specific flow in order to search and book hotels.
Using the recommended booking flow will decrease potential errors and increase your productivity.

HSP Booking Flow

Login

The HSP API is a session-based service, so proper session creation and management are crucial.

The "Login" request is optional as it primarily establishes a connection and retrieves the sessionID.
Initiating a "Search Hotels" request will automatically establish the session and the sessionID will be included in the response.

๐Ÿ‘

Note

The SessionID can be retained for future use, allowing you to revisit and analyze the API's requests and responses to & from HSP, to & from the connected suppliers, submit a ticket to the support team referencing the specific session and more.

Authentication API examples (Postman) - Click here.


Search Hotels

The Hotel Search request allows you to search for Hotels based on :

  • Geo Locations (latitude and longitude) with a radius of up to 75 km.
  • HotelID/s (up to 3,000 hotel IDs in a single request).

Search Hotels API examples (Postman) - Click here.


Get Packages

GetPackages request is used to get updated room information in a specific a hotel.
In order to send this request, all you need is the hotelID & sessionID which returned in the Search Hotels response.

In order to receive the "Supplier Original Room Name" along with HSP mapped name - please contact our support team for special implementation.

In order to obtain the Supplier Recommended Selling Price (SRSP), please first verify that the supplier offers this feature and ensure it is activated on your account from the supplier's side.

๐Ÿ‘

SRSP - Supplier Recommended Selling Price :

The SRSP currency is in "SupplierCurrency" tag and NOT the "Currency" tag.

The SRSP is supported by:

  • TotalStay (TTS) .
  • HotelBeds (HB2).
  • Yalago (YLG).
  • WelcomeBeds (WLC) .
  • AbreuOnlline (ABR).
  • RateHawk (RTH)-"min_price" in the SRSP tag.
  • GetARoom (GTR) - "reference-amount" as SRSP.
  • BedToYou (SHT) - "minAmount" as SRSP.

Get Packages API examples (Postman) - Click here.


Get Cancellation Policy

This function sends a request for the cancellation policy and should be used before sending a booking
request.

In order to send this request, all you need is the hotelID , PackageID & sessionID that was returned in the GetPackages response.

๐Ÿ‘

NOTE :

When initiating Multi-Cxl-Policy -
this call should be used only once the end-user wants to retrieve information for a specific rate and under no circumstances should be used to retrieve ALL cancellation policies for all package IDs returned.

Get Cxl-Policy API examples (Postman) - Click here.


Get Payment Preferences

Payment Preferences is used to retrieve the booking payment possibilities for a selected package.
In order to send this request, all you need is the hotelID , PackageID & sessionID that was returned in the GetPackages response.

Payment preferences will specify if the user (whose credentials were used to access the API and to
create the session) is allowed to make a booking, if he/she can pay by credit card (internal/external),
cash or other alternative method (pay upon arrival).

Get Payment Prefrences API examples (Postman) - Click here.


Book Hotel

Submits a new booking request for the selected hotel and returns the booking reference and booking status.
You can book only those items that were returned in the last search, in the same session. The same package can be booked several times, depending on 3rd party supplier restrictions for duplicate bookings. In such case an error will be returned which will prevent further booking attempts of the same package.

The Book response may take up to 180 seconds, as it relies on responses from suppliers and, in certain instances, incorporates SmartBook logic or Dynamic Markups that utilize sophisticated business logic.

Book Hotel API examples (Postman) - Click here.


Post Booking

After successfully booking a hotel using the recommended booking flow, there are further optional requests you can use after the booking made .

Cancel a Segment

This function submits a request to cancel an existing Segment with Status 'OK'.

reservations with multi rooms:
(1) there are suppliers that return a single booking confirmation id for all rooms together - on HSP all rooms will be under single Segment ID.

(2) there are suppliers that return for each room a unique booking confirmation id - on HSP each room will have wis own single Segment ID (correlated with supplier).

'Cancel Book' request supports single Segment ID only.

for case (1): all rooms will be cancelled at once
for case (2): requires to send multi calls for 'Cancel Book' in order to cancel all rooms / Segments,
or can cancel part of the rooms by relevant Segment ID

Cancel Segment examples (Postman) - Click here.


Check Status

This function submits a request to retrieve the updated status and booking data.

Check Status examples (Postman) - Click here.

๐Ÿ‘

Note:

HSP's supports both JSON (recommended) & XML API.
(The Documentation is JSON focused).