Async (One) API
Overview
The One API request aims to be a “one stop solution” for booking a package, in any specific hotel.
The request is made of a combination of some of our already existing requests, namely:
- Search
- GetPackages
- CancellationPolicy
- PreBook.
The One API allows end customers to get the most up-to-date price information for all packages in a single hotel, without the need to call these four requests separately.
How to use the API
The One API is split into 2 requests :
- "SearchSingleAsyncRequest" -
This First step triggers an asynchronous API request for a specific HotelID , which is created from existing requests (Search, GetPackages, Cxl-policy, and PreBook).
It returns a "Success" field, indicating whether the search was successful and can proceed to the next request. It also provides the sessionID, which is essential for the next request . - "GetAsyncSearchResult" -
The second step is designed for retrieving results in an asynchronous manner. Consequently, each time you initiate the "GetAsyncSearchResult", it returns the most current packages received from the connected suppliers.
When initiated again, it delivers new packages that may not have been included in the previous "GetAsyncSearchResult" call.
- Any new package or package with updated information, such as price or cancellation policies change , will be identified by the "ChangeType" .
- Once the "IsSearchFinished" field becomes true, it indicates that the search process is complete, and there is no need to call "GetAsyncSearchResult" again, Hence , the search has reached its conclusion, and the results are final.
Async (One) API examples (Postman) - Click here.
Updated 8 months ago