Taxes

tax.create

Create a new tax and return the corresponding tax_id.

  • *Tax “name” must be unique. You may not create more than one tax with the same name.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="tax.create">
  <tax>
    <name>VAT</name>                        <!-- Name of tax -->
    <rate>15</rate>                         <!-- tax percentage amount  (optional)  Default is 0 -->
    <number>1222222</number>                <!--  government-issued tax identification number (Optional) -->
    <compound>1</compound>                  <!-- Is this a compound tax (Optional) Default is 0 -->
  </tax>
</request>

Response


<?xml version="1.0" encoding="utf-8"?>
<response xmlns="http://www.freshbooks.com/api/" status="ok">
  <tax_id>18</tax_id>
</response>

tax.update

Update an existing tax. All fields aside from the tax_id are optional; by omitting a field, the existing value will remain unchanged.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="tax.update">
	<tax>
		<tax_id>1</tax_id>				<!-- tax to update -->
		<rate>15</rate>
		<name>new_name</name>
		<compound>0</compound>
	</tax>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response status="ok"/>

tax.get

Return the complete details for a given tax_id.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="tax.get">
  <tax_id>18</tax_id>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="http://www.freshbooks.com/api/" status="ok">
	<tax>
	  <tax_id>1</tax_id>
	  <name>GST</name>
	  <rate>5</rate>
	  <number></number>
	  <compound>0</compound>
	</tax>
</response>

tax.list

Returns a list of taxs, ordered by descending tax_id.

Filters: Use a “compound” tag to return only compound or non-compound taxes.

Note: This method uses pagination.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="tax.list">
  <page>1</page>     <!-- The page number to show (Optional) -->
  <per_page>5</per_page> <!-- The number of results per page, default 25 (Optional) -->
  <compound>1</compound> <!-- Will return only compound taxes if 1, or non-compound if 0 (Optional) -->
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="http://www.freshbooks.com/api/" status="ok">
	<taxes page="1" per_page="10" pages="1" total="3">
	  <tax>
	    <tax_id>3</tax_id>
	    <name>VAT</name>
	    <rate>15</rate>
	    <number>122222</number>
	    <compound>1</compound>
	  </tax>
	  <tax>
	    <tax_id>2</tax_id>
	    <name>PST</name>
	    <rate>7</rate>
	    <number></number>
	    <compound>0</compound>
	  </tax>
	  <tax>
	    <tax_id>1</tax_id>
	    <name>GST</name>
	    <rate>5</rate>
	    <number></number>
	    <compound>0</compound>
	  </tax>
	</taxes>
</response>

tax.delete

Delete an existing tax.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="tax.delete">
  <tax_id>1</tax_id>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response status="ok"/>

Search