BookingBnb supports a very easy way to automatically update availability through iCal calendars.

Supported calendars

You can import in the BookingBnb system iCal calendars and other calendars from travel portals like Airbnb and, using the CreateCalendars function.


CreateCalendars(user, password, token, calendars)

How to correctly encode the calendars

Given a multi-dimensional array of periods, that your system will produce, you must include the following parameters: where propertyID is the property identifier, unitID is the unit identifier, type is the type of calendar you want to import (it can be airbnb, bookingcom or ical), url is the calendar URL.


Your calendars string must look like this:


The availability is automatically updated every 2 hours by default, but you can easily change this frequence in your code. You just need to call the UpdateCalendars function whenever you want the availability to be updated immediately.

Update the calendars


UpdateCalendars(user, password, token, propertyID, calendars)

The arguments user and password are the credentials that a partner uses to enter the BookingBnb Control Panel. The argument token is the one our partners acquire when they register to our system. The argument propertyID is the identification number of the current property. To retrieve this ID, use the BookingBnb function GetProperties.

Here is an example of how your code should be:

/** java /*	
public String UpdateCalendars(String username, String password, String token, Int propertyID, String calendars) throws Exception {
  Vector params = new Vector();
  Object[] objects = (Object[]) xmlRpcClient.execute(config, "UpdateCalendars", params);
  return (String) objects[1];

/* php */
$server = new xmlrpc_client($url);
$args = array(
	new xmlrpcval($user, 'string'), 
	new xmlrpcval($pass, 'string'), 
	new xmlrpcval($token, 'string'), 
	new xmlrpcval($propertyID, 'int'), 
	new xmlrpcval($calendars, 'string')
$message = new xmlrpcmsg('xrws.UpdateCalendars', $args);
$result = $server->send($message);
$struct = $result->value();

The function returns a status code, it can be ok or ko.

Get the calendars

To retrieve the list of the updated calendars for a given property, call the GetCalendars function.


GetCalendars(user, password, token, propertyID)

This function returns the list of your calendars, each with the ID of the unit related do it. The calendars are represented by a <tag>value</tag> structure. This is an example:

		<updated>2019-10-18 08:08:04</updated>
		<updated>2019-10-18 08:08:04</updated>
Please, note that datetime is in the UTC time zone.