Availabilities

  1. List availabilities
  2. Get a single availability
  3. Customize availability maps

Parameters

Name Type Read/Write Description
id Integer Read Availability’s id.
map String Read Availability’s map of booking status. There is a total of 1096 characters, each representing one day. List of statuses described in enums section.
start_date Date Read Availability’s start date.
updated_at Time Read Availability’s update time.

List availabilities

List all availabilities for a given account.

GET /availabilities

Response

{
  "links": {
    "availabilities.rental": "https://www.bookingsync.com/api/v3/rentals/{availabilities.rental}"
  },
  "availabilities": [
    {
      "id": 2,
      "map": "11111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "updated_at": "2017-11-09T09:08:16Z",
      "start_date": "2017-11-01",
      "links": {
        "rental": 2
      }
    }
  ]
}

Get a single availability

Returns a single availability identified by ID.

GET /availabilities/:availability_id

Response

{
  "links": {
    "availabilities.rental": "https://www.bookingsync.com/api/v3/rentals/{availabilities.rental}"
  },
  "availabilities": [
    {
      "id": 2,
      "map": "11111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "updated_at": "2017-11-09T09:08:16Z",
      "start_date": "2017-11-01",
      "links": {
        "rental": 2
      }
    }
  ]
}

Customize availability maps

Mapping parameters allow to customize availability start point and status display.

Examples:

GET /availabilities?include_tentative=false&boolean=true&from=20140324
GET /availabilities/1?include_tentative=false&boolean=true&from=20140324

Mapping parameters

Name Type Default Description
from Date Beginning of current month Starts mapping at the given date. Default is beginning of current month.
include_tentative Boolean true Includes tentative bookings by default. If switched to false, tentative statuses will be rendered as 0.
boolean Boolean false Render map using only 0 and 1 characters. In this mode, every blocking status will be rendered as 1. List of statuses described in enums section.
priced_only Boolean false Show days without nightly rate as unavailable.