Difference between revisions of "Connect PMS with API"

From Beds24 Wiki
Jump to navigation Jump to search
 
(38 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:API]]
+
[[Category:API_V1_deprecated]]
 +
<div class="heading">API V1: Connect PMS or OTA</div>
 +
<span style="color:#fe746c;“ >{{#fas:exclamation-triangle}}  </span> This page is about API V1 which is depreciated. We recommend using [https://wiki.beds24.com/index.php/Category:API_V2 API V2] instead.
 +
This page explains how to connect a PMS or OTA to Beds24 using API V1 for Channel Management
 +
__Toc__
 +
= Introduction =
  
''This page explains how to connect a PMS to Beds24 for Channel Management''
+
To better understand the operation of Beds24 it is good to start by setting up a test property including prices and other data you will be using manually in the Beds24 control panel.
  
 +
Then to understand the API and it's functions and fields, read the test property data using the various JSON functions to learn which data is available via API.
  
== API setup ==
+
Once you understand the data format there are corresponding functions to write the JSON data back to Beds24.
  
 +
The write data format is usually the same as the data read.
 +
 +
See the notes at each endpoint for more information.
 +
 +
= API setup =
 
Create an API Key for your Beds24 account at Settings  >  Account  > Account Access  
 
Create an API Key for your Beds24 account at Settings  >  Account  > Account Access  
  
Line 14: Line 25:
 
There are usage limits on the API so design your system to avoid unnecessary and minimize the frequency of API calls.
 
There are usage limits on the API so design your system to avoid unnecessary and minimize the frequency of API calls.
  
== Create Properties ==
+
The JSON API functions are recommended https://api.beds24.com
  
 +
= Create Properties =
 
Use JSON createProperties to create properties and their rooms via API.
 
Use JSON createProperties to create properties and their rooms via API.
  
Line 22: Line 34:
 
Once created, the property and it's rooms can be modified with JSON modifyProperty
 
Once created, the property and it's rooms can be modified with JSON modifyProperty
  
== Setup Price and Channel Mapping ==
+
Descriptive content can optionally be added to a property and it's rooms with JSON setPropertyContent
  
 +
= Setup Price and Channel Mapping =
 
Prices are defined in up to 16 daily price rows per room type.
 
Prices are defined in up to 16 daily price rows per room type.
  
Line 32: Line 45:
 
Use JSON setDailyPriceSetup to create the daily price rows and map them to channels, including any rate codes.
 
Use JSON setDailyPriceSetup to create the daily price rows and map them to channels, including any rate codes.
  
== Channel Mapping ==
+
We recommend using only Daily Prices for this type of connection.
 +
 
 +
= Send Price and Availability =
 +
Price and availability can be set per room type with JSON setRoomDates
 +
 
 +
For each date, up to 16 prices, the number of rooms available, minimum stay (room level), maximum stay (room level) and check-in check-out restrictions can be sent.
 +
 
 +
= Bookings =
 +
There is no need to send bookings to Beds24, it is better to manage inventory by setting number of rooms available with JSON setRoomDates
 +
 
 +
Bookings from channels will import into Beds24 and automatically reduce the available inventory.
 +
 
 +
The Bookings should be left in Beds24 so modification/cancellation can be accepted.
 +
 
 +
Make sure to adjust your inventory levels to account for the channel booking in Beds24.
 +
 
 +
= Booking Notification =
 +
When a booking is created, modified or cancelled by a channel, we will send a notification push to a URL specified by you.
 +
 
 +
The notify push will contain the booking number of the affected booking, you can use this to read the full details of the booking.
 +
 
 +
The notify push expects an HTTP 200 response and will retry after a delay if this is not received.
 +
 
 +
= Booking Detail =
 +
Booking can be read with JSON getBookings by specifying the booking number from the notify push.
 +
 
 +
We recommend periodically polling JSON getBookings (circa once per 30 minutes should be adequate) specifying the modifiedSince time as the time a few seconds before your last poll.
 +
 
 +
This will allow you to check for any bookings which are new or modified where the notify push was missed.
 +
 
 +
= Booking Modification =
 +
If a booking is modified by a channel, you will receive a notify push and you can read the new booking detail.
 +
 
 +
It is up to your system to compare the new booking detail with the original and determine what actually changed.
  
== Send Price and Inventory ==
+
=Retrieve Content=
 +
Use JSON getProperties to retrieve properties and their rooms via API.
  
== Booking Notification ==
 
  
== Booking Detail ==
+
= OTA channel =
 +
The OTA channel can be used to connect an OTA to Beds24.
 +
It functions like any other OTA connected to the Beds24 channel manager.
 +
The OTA API functions can be used by the OTA system to read prices and availability assigned to the OTA channel from Beds24 and to push bookings back into the rooms in Beds24.
  
== Booking Modification ==
+
https://wiki.beds24.com/index.php/OTA

Latest revision as of 11:32, 23 October 2024

API V1: Connect PMS or OTA
   This page is about API V1 which is depreciated. We recommend using API V2 instead.

This page explains how to connect a PMS or OTA to Beds24 using API V1 for Channel Management

1 Introduction

To better understand the operation of Beds24 it is good to start by setting up a test property including prices and other data you will be using manually in the Beds24 control panel.

Then to understand the API and it's functions and fields, read the test property data using the various JSON functions to learn which data is available via API.

Once you understand the data format there are corresponding functions to write the JSON data back to Beds24.

The write data format is usually the same as the data read.

See the notes at each endpoint for more information.

2 API setup

Create an API Key for your Beds24 account at Settings > Account > Account Access

For extra security also whitelabel your IP address to prevent access from unauthorized IP addresses.

Access to most API functions will require the API Key and the PROP Key for the property being accessed.

There are usage limits on the API so design your system to avoid unnecessary and minimize the frequency of API calls.

The JSON API functions are recommended https://api.beds24.com

3 Create Properties

Use JSON createProperties to create properties and their rooms via API.

Set a PROP Key for the property when creating it so it can be accessed later via API.

Once created, the property and it's rooms can be modified with JSON modifyProperty

Descriptive content can optionally be added to a property and it's rooms with JSON setPropertyContent

4 Setup Price and Channel Mapping

Prices are defined in up to 16 daily price rows per room type.

Each row can be defined with an occupancy and minimum stay and sent to any combination of channels.

This means for each date can have up to 16 different prices for combinations of occupancy, minimum stay and channel.

Use JSON setDailyPriceSetup to create the daily price rows and map them to channels, including any rate codes.

We recommend using only Daily Prices for this type of connection.

5 Send Price and Availability

Price and availability can be set per room type with JSON setRoomDates

For each date, up to 16 prices, the number of rooms available, minimum stay (room level), maximum stay (room level) and check-in check-out restrictions can be sent.

6 Bookings

There is no need to send bookings to Beds24, it is better to manage inventory by setting number of rooms available with JSON setRoomDates

Bookings from channels will import into Beds24 and automatically reduce the available inventory.

The Bookings should be left in Beds24 so modification/cancellation can be accepted.

Make sure to adjust your inventory levels to account for the channel booking in Beds24.

7 Booking Notification

When a booking is created, modified or cancelled by a channel, we will send a notification push to a URL specified by you.

The notify push will contain the booking number of the affected booking, you can use this to read the full details of the booking.

The notify push expects an HTTP 200 response and will retry after a delay if this is not received.

8 Booking Detail

Booking can be read with JSON getBookings by specifying the booking number from the notify push.

We recommend periodically polling JSON getBookings (circa once per 30 minutes should be adequate) specifying the modifiedSince time as the time a few seconds before your last poll.

This will allow you to check for any bookings which are new or modified where the notify push was missed.

9 Booking Modification

If a booking is modified by a channel, you will receive a notify push and you can read the new booking detail.

It is up to your system to compare the new booking detail with the original and determine what actually changed.

10 Retrieve Content

Use JSON getProperties to retrieve properties and their rooms via API.


11 OTA channel

The OTA channel can be used to connect an OTA to Beds24. It functions like any other OTA connected to the Beds24 channel manager. The OTA API functions can be used by the OTA system to read prices and availability assigned to the OTA channel from Beds24 and to push bookings back into the rooms in Beds24.

https://wiki.beds24.com/index.php/OTA