Multiple enterprises and pre-selected locations
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide will show you how to open the booking engine with multiple enterprises and set a pre-selected city or location.
Important: Make sure you fulfill all the required . Without doing so, the code of the use cases can be hard to understand or the behavior of the code can differ from what you expect.
Below is some sample HTML and Javascript code to demonstrate the functionality. Numbered notes beneath the code snippet relate to the numbered comments within the code.
The sample uses an example scenario of three hotels, with two of them in the same city location:
One hotel in Paris
One hotel in London
Another hotel in London
Buttons are disabled on page load, so users can't click the buttons until the Booking Engine Widget is ready to be used. We enable it later when it's ready.
For more details, see .
For more details, see . If you are not sure where to find the Configuration ID, see the .
Even though it's called 'location' in the User Interface, the API needs a City ID. If you are not sure where to find the City ID, see the for details. If you have several hotels from the same location, the then the City ID is the same in all of them.
If you want to test this code in a different environment, please refer to our guide for .
In this guide, you've learned how to use a multi-enterprise booking engine and how to set a pre-selected city/location. The Booking Engine Widget Javascript API supports more than just setting dates - see the full to find other options you could use.