Skip to main content

Tax Rules

Overview​

This resource represents Tax Rules which are applicable to Rentals Taxes or Taxes.

This resource impacts the applicability of the parent resource. For example, if comparator is set to >, value is set to 10 and compared_attribute is length_of_stay, it means that the Tax will be applied only if the length of stay of the Booking is great than 10 nights.

Parameters​

NameTypeRead/WriteDescription
accountIntegerReadAccount's ID related to the Tax Rule
idIntegerReadTax Rule's ID
comparatorStringReadSign used to compare, possible values: < <= == >= >
compared_attributeStringReadName of the attribute to compare. Possible values: length_of_stay
ruleable_idIntegerReadID of the subject of the Tax Rule
ruleable_typeStringReadType of the subject of the Tax Rule, either RentalsTax or Tax
valueStringReadValue of the compared_attribute
created_atTimeReadTax Rule's create time
updated_atTimeReadTax Rule's update time

List tax rules​

List all tax rules for a given account(s).

GET /tax_rules
response.json
{
"tax_rules": [
{
"id": 3,
"created_at": "2015-08-04T15:23:27Z",
"updated_at": "2015-08-04T15:23:27Z",
"comparator": "==",
"compared_attribute": "start_at",
"value": "4",
"ruleable_id": 2,
"ruleable_type": "Tax"
}
]
}

Get a single tax rule​

Returns a single tax rule identified by ID.

GET /tax_rules/:tax_rule_id
response.json
{
"tax_rules": [
{
"id": 3,
"created_at": "2015-08-04T15:23:27Z",
"updated_at": "2015-08-04T15:23:27Z",
"comparator": "==",
"compared_attribute": "start_at",
"value": "4",
"ruleable_id": 2,
"ruleable_type": "Tax"
}
]
}