Skip to main content

Rental URLs

Overview

This resource represents Rental URLs which are the URLs under where Rentals are available on the channels' websites.

Parameters

NameTypeRead/WriteDescription
accountIntegerReadAccount's ID related to the Rental link
rentalIntegerReadRental's ID related to the Rental link
idIntegerReadRental URL's ID
labelStringReadRental URL's label - usually represents the channel's or application's name
urlStringReadThe URL where the Rental is available on the channel's website
lockObjectReadLock shows what's editable/not-editable (representing ownership status)
canceled_atTimeReadTime of soft delete
created_atTimeReadRental URL's create time.
updated_atTimeReadRental URL's update time.

List Rental URLs

List all Rental URLs for a given account(s).

GET /rental_urls
response.json
{
"links": {
"rental_urls.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_urls.rental}",
"rental_urls.account": "https://www.bookingsync.com/api/v3/accounts/{rental_urls.account}"
},
"rental_urls": [
{
"links": {
"account": 1,
"rental": 2
},
"id": "090fc7dd-f677-4a6f-b6df-8035f00b4108",
"label": "Example OTA",
"url": "https://ota.example.com/rentals/333",
"lock": {
"record": "doorkeeper/application-2",
"attributes": {}
},
"canceled_at": null,
"created_at": "2020-02-06T03:49:53Z",
"updated_at": "2020-02-06T03:49:53Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/rental_urls?page=1",
"last": "https://www.bookingsync.com/api/v3/rental_urls?page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}

Get a single Rental URL

Returns a single Rental URL identified by ID.

GET /rental_urls/:rental_url_id
response.json
{
"links": {
"rental_urls.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_urls.rental}",
"rental_urls.account": "https://www.bookingsync.com/api/v3/accounts/{rental_urls.account}"
},
"rental_urls": [
{
"links": {
"account": 1,
"rental": 2
},
"id": "090fc7dd-f677-4a6f-b6df-8035f00b4108",
"label": "Example OTA",
"url": "https://ota.example.com/rentals/333",
"lock": {
"record": "doorkeeper/application-2",
"attributes": {}
},
"canceled_at": null,
"created_at": "2020-02-06T03:49:53Z",
"updated_at": "2020-02-06T03:49:53Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/rental_urls?page=1",
"last": "https://www.bookingsync.com/api/v3/rental_urls?page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}

Create a new Rental URL

Returns a newly created Rental URL for given rental.

POST /rentals/:rental_id/rental_urls
request.json
{
"rental_urls": [
{
"label": "Example OTA",
"url": "https://ota.example.com/rentals/333",
"locked": true
}
]
}
response.json
{
"links": {
"rental_urls.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_urls.rental}",
"rental_urls.account": "https://www.bookingsync.com/api/v3/accounts/{rental_urls.account}"
},
"rental_urls": [
{
"links": {
"account": 1,
"rental": 2
},
"id": "090fc7dd-f677-4a6f-b6df-8035f00b4108",
"label": "Example OTA",
"url": "https://ota.example.com/rentals/333",
"lock": {
"record": "doorkeeper/application-2",
"attributes": {}
},
"canceled_at": null,
"created_at": "2020-02-06T03:49:53Z",
"updated_at": "2020-02-06T03:49:53Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/rental_urls?page=1",
"last": "https://www.bookingsync.com/api/v3/rental_urls?page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}

Update a Rental URL

Returns an updated Rental URL identified by ID.

PUT /rental_urls/:rental_url_id
request.json
{
"rental_urls": [
{
"url": "https://ota.example.com/rentals/333"
}
]
}
response.json
{
"links": {
"rental_urls.rental": "https://www.bookingsync.com/api/v3/rentals/{rental_urls.rental}",
"rental_urls.account": "https://www.bookingsync.com/api/v3/accounts/{rental_urls.account}"
},
"rental_urls": [
{
"links": {
"account": 1,
"rental": 2
},
"id": "090fc7dd-f677-4a6f-b6df-8035f00b4108",
"label": "Example OTA",
"url": "https://ota.example.com/rentals/333",
"lock": {
"record": "doorkeeper/application-2",
"attributes": {}
},
"canceled_at": null,
"created_at": "2020-02-06T03:49:53Z",
"updated_at": "2020-02-06T03:49:53Z"
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/rental_urls?page=1",
"last": "https://www.bookingsync.com/api/v3/rental_urls?page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}

Destroy a Rental URL

Required OAuth scope: rentals_write

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

DELETE /rental_urls/:rental_url_id