Rentals Taxes
Overview
This resource represents Rentals Taxes - the Taxes for a Rental, which can be either configured to be included in Rental's price (as initial_price
in Booking) or not.
Parameters
- OAuth Scopes:
- public
- rentals_write
Name | Type | Read/Write | Description |
---|---|---|---|
account | Integer | Read | Account's ID related to the Rentals Tax |
rental | Integer | Read | Rental's ID related to the Rentals Tax |
tax | Integer | Read | Tax's ID related to the Rentals Tax |
id | Integer | Read | Rentals Tax's ID |
tax_included_in_rate | Boolean | Read | Tax amount already included in rental price if set to true (as initial_price in Booking) |
created_at | Time | Read | Rentals Tax's create time |
updated_at | Time | Read | Rentals Tax's update time |
Name | Type | Read/Write | Description | Constraints |
---|---|---|---|---|
account | Integer | Read | Account's ID related to the Rentals Tax | |
rental | Integer | Read | Rental's ID related to the Rentals Tax | |
tax | Integer | Read | Tax's ID related to the Rentals Tax | |
id | Integer | Read | Rentals Tax's ID | |
tax_id | Integer | Write | Tax's ID | Required |
tax_included_in_rate | Boolean | Read/Write | Tax amount already included in rental price if set to true (as initial_price in Booking). If rental's price is 100 and there is a tax with a percentage of 10% assigned to it, that tax would already be included in 100 if it the value was set to true . However, if set to false , the "total" amount (in the context of Bookings creation) would be 100 + 10% from 100 which is 110 | Required |
created_at | Time | Read | Rentals Tax's create time | |
updated_at | Time | Read | Rentals Tax's update time |
List rentals taxes
List all rentals taxes for a given account(s).
GET /rentals_taxes
- OAuth Scopes:
- public
response.json
{
"links": {
"rentals_taxes.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_taxes.rental}",
"rentals_taxes.tax": "https://www.bookingsync.com/api/v3/taxes/{rentals_taxes.tax}"
},
"rentals_taxes": [
{
"links": {
"rental": 2,
"tax": 1
},
"id": 3,
"tax_included_in_rate": true,
"created_at": "2015-08-05T15:15:47Z",
"updated_at": "2015-08-05T15:15:47Z"
}
]
}
Get a single rentals tax
Returns a single rentals tax identified by ID.
GET /rentals_taxes/:rentals_tax_id
- OAuth Scopes:
- public
response.json
{
"links": {
"rentals_taxes.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_taxes.rental}",
"rentals_taxes.tax": "https://www.bookingsync.com/api/v3/taxes/{rentals_taxes.tax}"
},
"rentals_taxes": [
{
"links": {
"rental": 2,
"tax": 1
},
"id": 3,
"tax_included_in_rate": true,
"created_at": "2015-08-05T15:15:47Z",
"updated_at": "2015-08-05T15:15:47Z"
}
]
}
Create a new rentals tax
Returns a newly created rentals tax.
POST /rentals/:rental_id/rentals_taxes
- OAuth Scopes:
- rates_write
request.json
{
"rentals_taxes": [
{
"tax_id": 2,
"tax_included_in_rate": true
}
]
}
response.json
{
"links": {
"rentals_taxes.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_taxes.rental}",
"rentals_taxes.tax": "https://www.bookingsync.com/api/v3/taxes/{rentals_taxes.tax}"
},
"rentals_taxes": [
{
"links": {
"rental": 1,
"tax": 2
},
"id": 3,
"tax_included_in_rate": true,
"created_at": "2015-08-05T15:15:47Z",
"updated_at": "2015-08-05T15:15:47Z"
}
]
}
Update a rentals tax
Returns an updated rentals tax identified by ID.
PUT /rentals_taxes/:rentals_tax_id
- OAuth Scopes:
- rates_write
request.json
{
"rentals_taxes": [
{
"tax_included_in_rate": true
}
]
}
response.json
{
"links": {
"rentals_taxes.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_taxes.rental}",
"rentals_taxes.tax": "https://www.bookingsync.com/api/v3/taxes/{rentals_taxes.tax}"
},
"rentals_taxes": [
{
"links": {
"rental": 1,
"tax": 2
},
"id": 3,
"tax_included_in_rate": true,
"created_at": "2015-08-05T15:15:47Z",
"updated_at": "2015-08-05T15:15:47Z"
}
]
}
Delete a rentals tax
Required OAuth scope: :rates_write
Returns empty response with 204 No Content
status code on success.
DELETE /rentals_taxes/:rentals_tax_id