1. Overview
  2. List rental link groups
  3. Get a single rental link group
  4. Create a new rental link group
  5. Cancel a rental link group

Overview

This resource represents Rental Link Groups which is a way of establishing links between Rentals - creating or deleting a Rental Link Group results creating or deleting Rental Links.

The purpose of the Rental Links is to mirror the availabilities between two Rentals - if there is a link between Rental A and Rental B, creating (or canceling) a Booking for either of them will result in creating/canceling a “mirrored” Booking on the other Rental.

Parameters

Name Type Read/Write Description
account Integer Read Account’s ID related to the Rental Link Group
rentals Array Read Rentals’ IDs related to the Rental Link Group
rental_links Array Read Rental Links’ ID related to the Rental Link Group
id Integer Read Rental link group’s ID.
rental_names String Read Rentals’ names associated with given rental link group’s
created_at Time Read Rental link group’s create time.
updated_at Time Read Rental link group’s update time.
Name Type Read/Write Description Constraints
account Integer Read Account’s ID related to the Rental Link Group  
rentals Array Read Rentals’ IDs related to the Rental Link Group  
rental_links Array Read Rental Links’ ID related to the Rental Link Group  
id Integer Read Rental link group’s id.  
rental_ids Array Write IDs of the rentals to be linked Required, Minimum number of IDs: 2
rental_names String Read Rentals’ names associated with given rental link group’s  
created_at Time Read Rental link group’s create time.  
updated_at Time Read Rental link group’s update time.  

List all rental link groups for a given account(s).

GET /rental_link_groups

Response

{
  "links": {
    "rental_link_groups.account": "https://www.bookingsync.com/api/v3/accounts/{rental_link_groups.account}",
    "rental_link_groups.rental_links": "https://www.bookingsync.com/api/v3/rental_links/{rental_link_groups.rental_links}",
    "rental_link_groups.rentals": "https://www.bookingsync.com/api/v3/rentals/{rental_link_groups.rentals}"
  },
  "rental_link_groups": [
    {
      "id": 1,
      "rental_names": "Rental 1, Rental 2",
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "links": {
        "account": 1,
        "rental_links": [
          1,
          2
        ],
        "rentals": [
          1,
          2
        ]
      }
    }
  ],
  "meta": {
  }
}

Returns a single rental link group identified by ID.

GET /rental_link_groups/:rental_link_group_id

Response

{
  "links": {
    "rental_link_groups.account": "https://www.bookingsync.com/api/v3/accounts/{rental_link_groups.account}",
    "rental_link_groups.rental_links": "https://www.bookingsync.com/api/v3/rental_links/{rental_link_groups.rental_links}",
    "rental_link_groups.rentals": "https://www.bookingsync.com/api/v3/rentals/{rental_link_groups.rentals}"
  },
  "rental_link_groups": [
    {
      "id": 1,
      "rental_names": "Rental 1, Rental 2",
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "links": {
        "account": 1,
        "rental_links": [
          1,
          2
        ],
        "rentals": [
          1,
          2
        ]
      }
    }
  ],
  "meta": {
  }
}

Creates a rental link group for given rental.

POST /rental_link_groups

Example JSON request

{
  "rental_link_groups": [
    {
      "rental_ids": [
        1,
        2
      ]
    }
  ]
}

Response

{
  "links": {
    "rental_link_groups.account": "https://www.bookingsync.com/api/v3/accounts/{rental_link_groups.account}",
    "rental_link_groups.rental_links": "https://www.bookingsync.com/api/v3/rental_links/{rental_link_groups.rental_links}",
    "rental_link_groups.rentals": "https://www.bookingsync.com/api/v3/rentals/{rental_link_groups.rentals}"
  },
  "rental_link_groups": [
    {
      "id": 1,
      "rental_names": "Rental 1, Rental 2",
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "links": {
        "account": 1,
        "rental_links": [
          1,
          2
        ],
        "rentals": [
          1,
          2
        ]
      }
    }
  ],
  "meta": {
  }
}

Required OAuth scope: :rentals_write

Returns an empty response with ‘204 No Content’ status code on success.

DELETE /rental_link_groups/:rental_link_group_id