Tax Rules

  1. Overview
  2. List tax rules
  3. Get a single tax rule

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

Name Type Read/Write Description
account Integer Read Account’s ID related to the Tax Rule
id Integer Read Tax Rule’s ID.
comparator String Read Sign used to compare, possible values: < <= == >= >.
compared_attribute String Read Name of the attribute to compare. Possible values: length_of_stay
ruleable_id Integer Read ID of the subject of the Tax Rule.
ruleable_type String Read Type of the subject of the Tax Rule, either RentalsTax or Tax.
value String Read Value of the compared_attribute.
created_at Time Read Tax Rule’s create time.
updated_at Time Read Tax Rule’s update time.

List tax rules

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

GET /tax_rules

Response

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

Get a single tax rule

Returns a single tax rule identified by ID.

GET /tax_rules/:tax_rule_id

Response

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