Notes for custom integrations
If you are a developer wishing to implement Bookeasy but you do not wish to use the region gadget / item details gadget, we may allow you to do a custom integration on your end using the WebAPI system, to obtain a list of operators, and for any given operator, obtain content data and availability/pricing data.
If you decide to do so, it is important that you continue to use the Cart gadget and the Booking gadget.
In order to combine your own custom code (to display operator product availability and pricing) with the Cart gadget, we have made a Javascript function available which will let you programmatically add a product to the cart:
BE.gadget.cart.addToCartTrigger(options);
Options is an object as follows:
var options = {
vcId: 48,
operatorId: 25431,
operatorName: "Tour Manager Example",
type: "tours",
productId: 62123,
productName: "Bee Event Test (12:10 AM to 1:05 AM",
cost: 123654,
adults: 2,
children: 0,
infants: 0,
observers: 0,
period: 1,
students: 0,
date: "2019-11-06",
IsGoldMedal: true
};
The type parameter can be specified as one of: accom / tours / carhire / events
The date must be in the format: YYYY-MM-DD
All pax options (adults, children, infants, observers) need to be provided, however accom will only honour adults children infants.
Packages is not supported.
You can also receive notification on success or failure, using the following code:
$w.event.subscribe('item.book.click', function(resp) { console.log("Success"); }); $w.event.subscribe('item.book.click.error', function(resp) { console.log(resp); });