Create a new tax and return the corresponding tax_id.
<?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>
<?xml version="1.0" encoding="utf-8"?> <response xmlns="http://www.freshbooks.com/api/" status="ok"> <tax_id>18</tax_id> </response>
Update an existing tax. All fields aside from the tax_id are optional; by omitting a field, the existing value will remain unchanged.
<?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>
<?xml version="1.0" encoding="utf-8"?> <response status="ok"/>
Return the complete details for a given tax_id.
<?xml version="1.0" encoding="utf-8"?> <request method="tax.get"> <tax_id>18</tax_id> </request>
<?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>
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.
<?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>
<?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>
Delete an existing tax.
<?xml version="1.0" encoding="utf-8"?> <request method="tax.delete"> <tax_id>1</tax_id> </request>
<?xml version="1.0" encoding="utf-8"?> <response status="ok"/>