Rental contacts

  1. Overview
  2. List rental contacts
  3. Get a single rental contact
  4. Create a new rental contact
  5. Update a rental contact
  6. Destroy a rental contact

Overview

This resource represents Rental Contacts which is a relationship between Contact person and Rentals.

Parameters

Name Type Read/Write Description
account Integer Read Account’s ID related to the Rental contact
contact Integer Read Contacts’s ID related to the Rental contact
rental Integer Read Rental’s ID related to the Rental contact
id Integer Read Rental contact’s ID.
kind String Read Rental contact’s kind
roles Array of Strings Read Rental contact’s roles
created_at Time Read Rental contact’s create time.
updated_at Time Read Rental contact’s update time.
Name Type Read/Write Description
account Integer Read Account’s ID related to the Rental contact
contact Integer Read Contacts’s ID related to the Rental contact
rental Integer Read Rental’s ID related to the Rental contact
id Integer Read Rental contact’s ID.
kind String Read Rental contact’s kind
roles Array of Strings Read Rental contact’s roles
created_at Time Read Rental contact’s create time.
updated_at Time Read Rental contact’s update time.
Name Type Read/Write Description Constraints
account Integer Read Account’s ID related to the Rental contact  
contact Integer Read Contacts’s ID related to the Rental contact  
rental Integer Read Rental’s ID related to the Rental contact  
id Integer Read Rental contact’s ID.  
contact_id Integer Write Contact’s ID. Required
kind String Read/Write Rental contact’s kind Required, must be one of the Rental contact kinds, only one owner kind is allowed per Rental,
roles Array of Strings Read/Write Rental contact’s roles Must be one of the Rental contact kinds if present, only one general role is allowed per Rental, only one invoices role is allowed per Rental
created_at Time Read Rental contact’s create time.  
updated_at Time Read Rental contact’s update time.  

List rental contacts

List all rental contacts for a given account(s).

GET /rental_contacts

Response

{
  "links": {
    "rental_contacts.contact": "https://www.bookingsync.com/api/v3/contacts/{rental_contacts.contact}",
    "rental_contacts.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_contacts.rental}"
  },
  "rental_contacts": [
    {
      "id": 1,
      "kind": "manager",
      "roles": [
        "requests"
      ],
      "created_at": "2019-03-21T14:37:39Z",
      "updated_at": "2019-03-21T14:37:39Z",
      "canceled_at": null,
      "links": {
        "contact": 10,
        "rental": 2
      }
    }
  ],
  "meta": {
    "Link": {
      "first": "https://www.bookingsync.com/api/v3/rental_contacts?page=1",
      "last": "https://www.bookingsync.com/api/v3/rental_contacts?page=1"
    },
    "X-Per-Page": "100",
    "X-Total-Count": "2",
    "X-Total-Pages": "1"
  }
}
{
  "links": {
    "rental_contacts.contact": "https://www.bookingsync.com/api/v3/contacts/{rental_contacts.contact}",
    "rental_contacts.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_contacts.rental}"
  },
  "rental_contacts": [
    {
      "id": 1,
      "kind": "manager",
      "roles": [
        "requests"
      ],
      "created_at": "2019-03-21T14:37:39Z",
      "updated_at": "2019-03-21T14:37:39Z",
      "canceled_at": null,
      "links": {
        "contact": 10,
        "rental": 2
      }
    }
  ],
  "meta": {
    "Link": {
      "first": "https://www.bookingsync.com/api/v3/rental_contacts?page=1",
      "last": "https://www.bookingsync.com/api/v3/rental_contacts?page=1"
    },
    "X-Per-Page": "100",
    "X-Total-Count": "2",
    "X-Total-Pages": "1"
  }
}

Get a single rental contact

Returns a single rental contact identified by ID.

GET /rental_contacts/:rental_contact_id

Response

{
  "links": {
    "rental_contacts.contact": "https://www.bookingsync.com/api/v3/contacts/{rental_contacts.contact}",
    "rental_contacts.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_contacts.rental}"
  },
  "rental_contacts": [
    {
      "id": 1,
      "kind": "manager",
      "roles": [
        "requests"
      ],
      "created_at": "2019-03-21T14:37:39Z",
      "updated_at": "2019-03-21T14:37:39Z",
      "canceled_at": null,
      "links": {
        "contact": 10,
        "rental": 2
      }
    }
  ],
  "meta": {
    "Link": {
      "first": "https://www.bookingsync.com/api/v3/rental_contacts?page=1",
      "last": "https://www.bookingsync.com/api/v3/rental_contacts?page=1"
    },
    "X-Per-Page": "100",
    "X-Total-Count": "2",
    "X-Total-Pages": "1"
  }
}
{
  "links": {
    "rental_contacts.contact": "https://www.bookingsync.com/api/v3/contacts/{rental_contacts.contact}",
    "rental_contacts.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_contacts.rental}"
  },
  "rental_contacts": [
    {
      "id": 1,
      "kind": "manager",
      "roles": [
        "requests"
      ],
      "created_at": "2019-03-21T14:37:39Z",
      "updated_at": "2019-03-21T14:37:39Z",
      "canceled_at": null,
      "links": {
        "contact": 10,
        "rental": 2
      }
    }
  ],
  "meta": {
    "Link": {
      "first": "https://www.bookingsync.com/api/v3/rental_contacts?page=1",
      "last": "https://www.bookingsync.com/api/v3/rental_contacts?page=1"
    },
    "X-Per-Page": "100",
    "X-Total-Count": "2",
    "X-Total-Pages": "1"
  }
}

Create a new rental contact

Returns a newly created rental contact.

POST /rentals/:rental_id/rental_contacts

Example JSON request

{
  "rental_id": 2,
  "rental_contacts": [
    {
      "contact_id": 10,
      "kind": "manager",
      "roles": [
        "requests"
      ]
    }
  ]
}

Response

{
  "links": {
    "rental_contacts.contact": "https://www.bookingsync.com/api/v3/contacts/{rental_contacts.contact}",
    "rental_contacts.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_contacts.rental}"
  },
  "rental_contacts": [
    {
      "id": 1,
      "kind": "manager",
      "roles": [
        "requests"
      ],
      "created_at": "2019-03-21T14:37:39Z",
      "updated_at": "2019-03-21T14:37:39Z",
      "canceled_at": null,
      "links": {
        "contact": 10,
        "rental": 2
      }
    }
  ],
  "meta": {
    "Link": {
      "first": "https://www.bookingsync.com/api/v3/rental_contacts?page=1",
      "last": "https://www.bookingsync.com/api/v3/rental_contacts?page=1"
    },
    "X-Per-Page": "100",
    "X-Total-Count": "2",
    "X-Total-Pages": "1"
  }
}

Update a rental contact

Returns an updated rental contact identified by ID.

PUT /rental_contacts/:rental_contact_id

Example JSON request

{
  "id": 1,
  "rental_contacts": [
    {
      "kind": "owner",
      "roles": [
        "requests"
      ]
    }
  ]
}

Response

{
  "links": {
    "rental_contacts.contact": "https://www.bookingsync.com/api/v3/contacts/{rental_contacts.contact}",
    "rental_contacts.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_contacts.rental}"
  },
  "rental_contacts": [
    {
      "id": 1,
      "kind": "manager",
      "roles": [
        "requests"
      ],
      "created_at": "2019-03-21T14:37:39Z",
      "updated_at": "2019-03-21T14:37:39Z",
      "canceled_at": null,
      "links": {
        "contact": 10,
        "rental": 2
      }
    }
  ],
  "meta": {
    "Link": {
      "first": "https://www.bookingsync.com/api/v3/rental_contacts?page=1",
      "last": "https://www.bookingsync.com/api/v3/rental_contacts?page=1"
    },
    "X-Per-Page": "100",
    "X-Total-Count": "2",
    "X-Total-Pages": "1"
  }
}

Destroy a rental contact

Required OAuth scope: :rentals_write

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

DELETE /rental_contacts/:rental_contact_id