Rentals Taxes

  1. Overview
  2. List rentals taxes
  3. Get a single rentals tax
  4. Create a new rentals tax
  5. Update a rentals tax
  6. Delete a rentals tax

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

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

Response

{
  "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": [
    {
      "id": 3,
      "tax_included_in_rate": true,
      "created_at": "2015-08-05T15:15:47Z",
      "updated_at": "2015-08-05T15:15:47Z",
      "links": {
        "rental": 2,
        "tax": 1
      }
    }
  ]
}

Get a single rentals tax

Returns a single rentals tax identified by ID.

GET /rentals_taxes/:rentals_tax_id

Response

{
  "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": [
    {
      "id": 3,
      "tax_included_in_rate": true,
      "created_at": "2015-08-05T15:15:47Z",
      "updated_at": "2015-08-05T15:15:47Z",
      "links": {
        "rental": 2,
        "tax": 1
      }
    }
  ]
}

Create a new rentals tax

Returns a newly created rentals tax.

POST  /rentals/:rental_id/rentals_taxes

Example JSON request

{
  "rentals_taxes": [
    {
      "tax_id": 2,
      "tax_included_in_rate": true
    }
  ]
}

Response

{
  "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": [
    {
      "id": 3,
      "tax_included_in_rate": true,
      "created_at": "2015-08-05T15:15:47Z",
      "updated_at": "2015-08-05T15:15:47Z",
      "links": {
        "rental": 1,
        "tax": 2
      }
    }
  ]
}

Update a rentals tax

Returns an updated rentals tax identified by ID.

PUT /rentals_taxes/:rentals_tax_id

Example JSON request

{
  "rentals_taxes": [
    {
      "tax_included_in_rate": true
    }
  ]
}

Response

{
  "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": [
    {
      "id": 3,
      "tax_included_in_rate": true,
      "created_at": "2015-08-05T15:15:47Z",
      "updated_at": "2015-08-05T15:15:47Z",
      "links": {
        "rental": 1,
        "tax": 2
      }
    }
  ]
}

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