Connect Bookingengine with API

From Beds24 Wiki
Jump to navigation Jump to search


This page explains how to connect a Booking Enging to the Beds24 API for Channel Management

1 Introduction

The Beds24 API is available at https://api.beds24.com

Connecting a booking engine to Beds24 requires two functions.

1) The ability to read price and availability from Beds24 for a particular booking condition.

There are two strategies for reading price and availability, either or both can be used depending on your needs.

1a) Price and availability can be read in advance and stored or cached on your server, this has the advantage that your server can respond quickly with it's local copy of the data.

1b) Price and availability can be read on demand in real time, this has the advantage of accuracy but may slow down your page. This option is not suitable for multiple properties or situations where many API calls will be needed.

2) The ability to save the resulting booking into Beds24 to adjust availability at all other channels.

2 Price and Availability for caching on your server

Availability is easy to read a year at a time with JSON getRoomDates, this can be stored and used to create availability calendars etc. on demand.

Price is more difficult, especially when prices change based on occupancy or length of stay, in this case the exact price can only be shown once the stay dates and occupancy are known.

Daily prices can be read with JSON getRoomDates and their setup with JSON getDailyPriceSetup

Fixed Prices can be read with JSON getRates

These should be read approximately once per hour and stored on your server. Your server can use the data to respond to searches quickly without requiring API calls.

Only once a selection of room type, dates and occupancy has been made, make a live call to JSON getAvailabilities to check the data is still current.

In the unlikely event that it has changed or the room has been sold, you can display a "Sorry this selection has just been booked" message and offer another search

3 Price and Availability on demand

There are two functions which can return an exact price and availability for a known booking condition.

OTA HotelAvail or JSON getAvailabilities, either of these can be used for a live request.

These functions are only suitable for looking up data for one particular booking condition in real time, they are not intended to read bulk data for caching.

Any strategy that requires more than a few API calls for a live request should use the caching strategy, otherwise you risk slow page times and possible failure due to API limiting.

4 Bookings

Once a booking has completed on your booking engine, you can use either OTA HotelRes or JSON setBooking to enter the booking into Beds24.

This will automatically reduce the availability accordingly at all other booking channels.