Rental URLs
Overview
This resource represents Rental URLs which are the URLs under where Rentals are available on the channels' websites.
Parameters
- OAuth Scopes:
- public
- rentals_write
Name | Type | Read/Write | Description |
---|---|---|---|
account | Integer | Read | Account's ID related to the Rental link |
rental | Integer | Read | Rental's ID related to the Rental link |
id | Integer | Read | Rental URL's ID |
label | String | Read | Rental URL's label - usually represents the channel's or application's name |
url | String | Read | The URL where the Rental is available on the channel's website |
lock | Object | Read | Lock shows what's editable/not-editable (representing ownership status) |
canceled_at | Time | Read | Time of soft delete |
created_at | Time | Read | Rental URL's create time. |
updated_at | Time | Read | Rental URL's update time. |
Name | Type | Read/Write | Description | Constraints |
---|---|---|---|---|
account | Integer | Read | Account's ID related to the Rental link | |
rental | Integer | Read | Rental's ID related to the Rental link | |
id | Integer | Read | Rental URL's ID | |
label | String | Read/Write | Rental URL's label - usually represents the channel's or application's name | |
url | String | Read/Write | The URL where the Rental is available on the channel's website | |
lock | Object | Read | Lock shows what's editable/not-editable (representing ownership status) | |
locked | Boolean | Write | Setting locked to true means that other apps won't be able to modify this Rental URL (your application will be granted exclusivity for managing this resource) | |
created_at | Time | Read | Rental URL's create time. | |
updated_at | Time | Read | Rental URL's update time. |
List Rental URLs
List all Rental URLs for a given account(s).
GET /rental_urls
- OAuth Scopes:
- public
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
- OAuth Scopes:
- public
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
- OAuth Scopes:
- rentals_write
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
- OAuth Scopes:
- rentals_write
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