Working with Taxes in FreshBooks

This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Taxes in FreshBooks



Overview

The following operations allow you to work with taxes. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with taxes, see Sample configuration.

Operation

Description

Operation

Description

createTax

Creates a tax.

deleteTax

Deletes a tax.

getTax

Retrieves tax details.

listTaxes

Lists taxes.

updateTax

Updates a tax.

Operation details

This section provides details on the operations.

Creating a tax

The createTax operation creates a new tax. The tax name must be unique. You may not create more than one tax with the same name.

createTax
<freshbooks.createTax> <compound>{$ctx:compound}</compound> <rate>{$ctx:rate}</rate> <name>{$ctx:name}</name> <number>{$ctx:number}</number> </freshbooks.createTax>
Properties
  • compound: Specifies whether this is a compound tax, either 1 or 0.

  • rate: Tax percentage amount. Default is 0.

  • name: Required - Name of the tax.

  • number: Government issued tax identification number.

Sample request

Following is a sample REST/XML request that can be handled by the createTax operation.

Sample Request for createTax
<createTax> <arbitraryPassword></arbitraryPassword> <apiUrl>https://sansu.freshbooks.com</apiUrl> <authenticationToken>c361a63c7456519412fa8sdfs051ea605a6d</authenticationToken> <compound>1</compound> <rate>15</rate> <name>Military Tax</name> <number>22314</number> </createTax>
Related FreshBooks documentation

http://developers.freshbooks.com/docs/taxes/#tax.create

 Deleting a tax

The deleteTax operation deletes an existing tax.

deleteTax
<freshbooks.deleteTax> <taxId>{$ctx:taxId}</taxId> </freshbooks.deleteTax>
Properties
  • taxId: Required - The ID of the tax to be deleted.

Sample request

Following is a sample REST/XML request that can be handled by the deleteTax operation.

Sample Request for deleteTax
<deleteTax> <arbitraryPassword></arbitraryPassword> <apiUrl>https://sansu.freshbooks.com</apiUrl> <authenticationToken>c361a63c7456519412fa8051ea605a6d</authenticationToken> <compound>0</compound> <taxId>15956</taxId> </deleteTax>
Related FreshBooks documentation

http://developers.freshbooks.com/docs/taxes/#tax.delete

 Retrieving tax details

The getTax operation returns the details for the given tax ID.

getTax
<freshbooks.getTax> <taxId>{$ctx:taxId}</taxId> </freshbooks.getTax>
Properties
  • taxId: Required - ID of the tax whose details are to be retrieved.

Sample request

Following is a sample REST/XML request that can be handled by the getTax operation.

Sample Request for getTax
<getTax> <arbitraryPassword></arbitraryPassword> <apiUrl>https://sansu.freshbooks.com</apiUrl> <authenticationToken>c361ghja63c7456519412fa8051ea605a6d</authenticationToken> <compound>0</compound> <taxId>15956</taxId> </getTax>
Related Freshbooks documentation

http://developers.freshbooks.com/docs/taxes/#tax.get

 Listing taxes

The listTaxes operation returns a list of taxes, ordered by descending tax ID. This operation uses pagination.

listTaxes
<freshbooks.listTaxes> <compound>{$ctx:compound}</compound> <page>{$ctx:page}</page> <perPage>{$ctx:perPage}</perPage> <order>{$ctx:order}</order> </freshbooks.listTaxes>
Properties
  • compound: Will return only compound taxes if set to 1. If set to 0, non-compound taxes will be returned as well.

  • page: The page number to be displayed.

  • perPage: The number of results to be displayed per page. Default is 25.

  • order: The order in which the results should be displayed: ASC or DESC.

Sample request

Following is a sample REST/XML request that can be handled by the listTaxes operation.

Sample Request for listTaxes
<listTaxes> <arbitraryPassword></arbitraryPassword> <apiUrl>https://sansu.freshbooks.com</apiUrl> <authenticationToken>c361a6dfg3c7456519412fa8051ea605a6d</authenticationToken> <compound></compound> <page></page> <perPage></perPage> <order>asc</order> </listTaxes>