Asynchronous Search API

The Asynchronous Search API flow is useful for implementing a polling results behavior commonly seen on B2C websites. This flow keeps the end consumer engaged by displaying rates as received by the suppliers; with the async API, the search becomes as fast as your fastest supplier.

The complete Asynchronous Search API flow consists of three main APIs:

  1. Search Init: Initiates the search process.
  2. Search Results: Retrieves the initial set of search results.
  3. Search Results Polling: Continuously polls for the next set of results, updating the user with new data as it becomes available.

Search Init details:
HTTP: POST
Endpoint:{baseEndpoint}/api/hotel/availability/init

Search Result details::
HTTP: GET
Endpoint:{baseEndpoint}/api/hotel/availability/async/{token}/results

Search Results Polling details:
HTTP: GET
Endpoint:{baseEndpoint}/api/hotel/availability/async/{token}/results?nextResultsKey={{nextResultsKey}}

FAQs

For how long is the token that we received in the response valid?

The token is valid for 60 minutes.

How long should the Async API be polled for fresh results?

The API should be polled until its status is completed.

What happens if I don't get the cheapest rate from my fastest supplier?

The Async API will return the updated rate for a hotel once a lower fare is received.

Error Codes

Error CodeError Message
4001Invalid data in request - Please refer to the fields[] for more details.
5000Your request failed due to an unknown system error. Please contact support team with the correlationId.