Channel Management functionality


BookyFlow has built-in functionality that supports Oauth2 REST API endpoints. These endpoints allow remote services such as apps to communicate with individual BookyFlow installations, if those installations can install API Feature plugins.

This documentation refers to the basic REST API functionality that can be installed through the BookyFlow Plugin Manager.

--

There are two flavours of REST API endpoints, either BookyFlow Core, or Channel Management Framework. Which you use depends on your requirements.

BookyFlow Core endpoints are the original set of endpoints and they reflect basic functionality within BookyFlow. To access these endpoints all you need is a Client ID and Secret to request a token. The Client ID/Secret pair are available to a manager via the frontend.

Channel Management Framework (CMF) endpoints are designed to work within the context of the requesting client being a Channel ( OTA/PMS/CM ). Like the Core method above a Client ID/Secret pair needs to be created and a token requested. Once that token has been sent then the client will announce themselves using the Announce endpoint. The purpose of this is so that a manager can allow multiple channels to connect to their account and those channels can only access the properties that they have created. Once the calling Channel has announced themselves then they must include X-BOOKYFLOW-channel-name and the channel name in the header of their request, as well as the token.

CMF endpoints offer more in the way of functionality and are more suited to Channel Management requirements.

--

You can find technical information, including examples on how to build your own API features on the manual.

Replace @variable_name in these docs with the relevant data required, so @property_id reflects the property uid of the property to be queried.

Dates need to be sent in YYYY-MM-DD format.

This REST API respects the philosophy that different request methods should mirror different activities, therefore POST methods add records, DELETE methods remove records, PUT methods update records, and GET methods are used to pull information from the REST API.

When an API key/secret pair are created, the key is given access to certain "scopes" which gives that particular key pair rights to certain activities. The "scope" is defined in each plugin's scopes.json file.

Auth-Free features are API features that do not require a REST API key pair to access the API endpoints. Features marked by a * are Auth-Free.

Functionality of the BookyFlow Channel Management Framework (CMF REST API) (under development).

The BookyFlow CMF REST API is designed to allow any channel with knowledge of the API to talk to a BookyFlow installation.

BookyFlow is installed by our clients on Joomla or Wordpress. Once they have a Channel Management Framework license and have installed the CMF plugins ( see http://www.bookyflow.net/manual/developers-guide-2/393-channel-manager-framework-alpha-beta-testing ) then you will be able to connect to their installations using the API endpoints documented in this section of the API manual.

Audience : Developers experienced with working with OAuth2 and REST APIs. Familiarity with BookyFlow helps, but is not essential.

A tutorial on how to use Postman to access the CMF REST API can be found here

http://www.bookyflow.net/manual/developers-guide-2/63-bookyflow-api/394-creating-a-new-property-with-the-cmf-rest-api

--

A Token is required before you can access this functionality, and the client key/secret must be given access to the "Channel Management" scope.

To start using this API the channel must announce themselves.

Besides the Announce endpoints, the channel name (e.g. bobs_channel) must be sent as part of the query's headers, for example

$headers = array ( "X-BOOKYFLOW-channel-name : ".$channel_name );

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Bearer '.$this->token,
    'Accept: application/json',
    'X-BOOKYFLOW-channel-name: '.$current_channel.''
    ));

NOTE : Channels can only access properties that they have created (DONE) or been given access to (TODO). They cannot modify other properties, even for the same manager.

Glossary

MRP : Multiroom property. Hotels, Bed and Breakfasts etc rent out rooms in a property. SRP : Single room property such as Villas, Apartments etc.

Whether a property is an MRP or SRP doesn't reflect the number of real-life rooms a property has. Instead it refers to the fact that in BookyFlow, SRPs have one invisible room that is occupied when a booking is made, whereas MRPs have individual rooms that exist as unique entities in the system and are individually occupied when a booking is made.

Channel : Throughout this document a client accessing the CMF REST API is referred to as a "channel".