Taxes

  1. List taxes
  2. Get a single tax
  3. Create a new tax
  4. Update a tax

Parameters

Name Type Read/Write Description
id Integer Read Tax’s id.
name Object Read Tax’s name, list of locales described in enums section.
percentage Decimal Read Tax’s percentage.
created_at Time Read Tax’s create time.
updated_at Time Read Tax’s update time.
start_date Date Read Beginning of the period when the tax is applicable.
end_date Date Read Ending of the period when the tax is applicable.
Name Type Read/Write Description
id Integer Read Tax’s id.
name Object Read Tax’s name, list of locales described in enums section.
notes String Read Tax’s private notes.
percentage Decimal Read Tax’s percentage.
created_at Time Read Tax’s create time.
updated_at Time Read Tax’s update time.
start_date Date Read Beginning of the period when the tax is applicable.
end_date Date Read Ending of the period when the tax is applicable.
Name Type Read/Write Description
id Integer Read Tax’s id.
name Object Read/Write Tax’s name, list of locales described in enums section.
notes String Read/Write Tax’s private notes.
percentage Decimal Read/Write Tax’s percentage. Writable only during creation.
created_at Time Read Tax’s create time.
updated_at Time Read Tax’s update time.
start_date Date Read/Write Beginning of the period when the tax is applicable.
end_date Date Read/Write Ending of the period when the tax is applicable.

List taxes

List all taxes for a given account(s).

GET /taxes

Response

{
  "links": {
    "taxes.account": "http://www.bookingsync.com/api/v3/accounts/{taxes.account}"
  },
  "taxes": [
    {
      "id": 4,
      "name": {
        "en": "Tax"
      },
      "percentage": "10.0",
      "created_at": "2017-11-09T09:08:18Z",
      "updated_at": "2017-11-09T09:08:18Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "account": 1
      }
    }
  ]
}
{
  "links": {
    "taxes.account": "http://www.bookingsync.com/api/v3/accounts/{taxes.account}"
  },
  "taxes": [
    {
      "id": 4,
      "name": {
        "en": "Tax"
      },
      "notes": "Private notes",
      "percentage": "10.0",
      "created_at": "2017-11-09T09:08:18Z",
      "updated_at": "2017-11-09T09:08:18Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "account": 1
      }
    }
  ]
}

Get a single tax

Returns a single tax identified by ID.

GET /taxes/:tax_id

Response

{
  "links": {
    "taxes.account": "http://www.bookingsync.com/api/v3/accounts/{taxes.account}"
  },
  "taxes": [
    {
      "id": 4,
      "name": {
        "en": "Tax"
      },
      "percentage": "10.0",
      "created_at": "2017-11-09T09:08:18Z",
      "updated_at": "2017-11-09T09:08:18Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "account": 1
      }
    }
  ]
}
{
  "links": {
    "taxes.account": "http://www.bookingsync.com/api/v3/accounts/{taxes.account}"
  },
  "taxes": [
    {
      "id": 4,
      "name": {
        "en": "Tax"
      },
      "notes": "Private notes",
      "percentage": "10.0",
      "created_at": "2017-11-09T09:08:18Z",
      "updated_at": "2017-11-09T09:08:18Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "account": 1
      }
    }
  ]
}

Create a new tax

Returns a newly created tax.

POST /taxes

Example JSON request

{
  "taxes": [
    {
      "name_en": "Tax",
      "notes": "Private notes",
      "percentage": "10.0",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23"
    }
  ]
}

Response

{
  "links": {
    "taxes.account": "http://www.bookingsync.com/api/v3/accounts/{taxes.account}"
  },
  "taxes": [
    {
      "id": 4,
      "name": {
        "en": "Tax"
      },
      "notes": "Private notes",
      "percentage": "10.0",
      "created_at": "2017-11-09T09:08:18Z",
      "updated_at": "2017-11-09T09:08:18Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "account": 1
      }
    }
  ]
}

Update a tax

Returns an updated tax identified by ID.

PUT /taxes/:tax_id

Example JSON request

{
  "taxes": [
    {
      "name_en": "Tax",
      "notes": "Private notes",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23"
    }
  ]
}

Response

{
  "links": {
    "taxes.account": "http://www.bookingsync.com/api/v3/accounts/{taxes.account}"
  },
  "taxes": [
    {
      "id": 4,
      "name": {
        "en": "Tax"
      },
      "notes": "Private notes",
      "percentage": "10.0",
      "created_at": "2017-11-09T09:08:18Z",
      "updated_at": "2017-11-09T09:08:18Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "account": 1
      }
    }
  ]
}