Connect Bookingengine with API

To connect a booking engine to Beds24 for channel management, your booking engine needs to read price and availability from Beds24 for a booking condition, and save each completed booking back into Beds24 so availability is adjusted at all other channels. The Beds24 API is available at api.beds24.com.

Note: This setup uses API V1, which is deprecated. For new projects, use API V2 and see OTAs: How to connect to Beds24 using API V2.

Choose how to read price and availability

You can use either strategy, or both, depending on your needs.

Strategy Advantage Limitation
Read in advance and cache on your server Your server responds quickly with its local copy of the data. Needs a live check once the guest has selected room type, dates and occupancy.
Read on demand in real time Accurate. May slow down your page. Not suitable for multiple properties or situations where many API calls are needed.

Price and availability for caching on your server

  • Availability: read it a year at a time with JSON getRoomDates. Store it and use it to create availability calendars and similar on demand.
  • Daily Prices: read them with JSON getRoomDates and their setup with JSON getDailyPriceSetup.
  • Fixed Prices: read them with JSON getRates.

Price is more difficult than availability, 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.

  1. Read the data approximately once per hour and store it on your server. Your server can use it to respond to searches quickly without API calls.
  2. Once the guest has selected room type, dates and occupancy, make a live call to JSON getAvailabilities to check the data is still current.
  3. In the unlikely event that it has changed or the room has been sold, show a message such as "Sorry this selection has just been booked" and offer another search.

Price and availability on demand

Two functions return an exact price and availability for a known booking condition: OTA HotelAvail or JSON getAvailabilities. Use either one for a live request.

These functions are only suitable for looking up data for one particular booking condition in real time. They aren't intended to read bulk data for caching.

Warning: Any strategy that needs more than a few API calls for a live request should use the caching strategy. Otherwise you risk slow page times and failure due to API limiting.

Save bookings into Beds24

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

Expected result: Beds24 automatically reduces the availability at all other booking channels.

Related Articles

Was this article helpful?
0 out of 0 found this helpful

How to Contact us :