Fetching Transactions
Explore how to fetch and list tax transactions for a specific company using Avalara's AvaTax API. Learn to use endpoints, set authorization, and retrieve transaction details to manage tax compliance effectively in your applications.
We'll cover the following...
Listing transactions by company
We can use the {{BASE_URL}}/companies/{{companyCode}}/transactions endpoint to list up to 1,000 transactions for the requested company. The complete endpoint URL for listing transactions by a company is as follows:
https://sandbox-rest.avatax.com/api/v2/companies/{{companyCode}}/transactions
Some of the request parameters for the URL above are as follows:
Request Parameters
Name | Type | Parameter Type | Category | Description |
| string | Path | Required | This parameter specifies the company code of the company for which we're fetching transactions. |
| string | Query | Optional | This parameter specifies any objects we want the API to add to our request's API response. |
| string | Query | Optional | This parameter specifies how to filter the transaction results. |
| integer | Query | Optional | This parameter specifies the number of the top transaction results we want to fetch. |
| integer | Query | Optional | This parameter specifies the number of top transaction results we want to skip. |
| string | Query | Optional | This parameter specifies how to order the transaction results and the basis on which they are ordered. It accepts values in the following format: |
Let’s see how to make an API call to list tax transactions made for a specific company. Click the “Run” button to execute the code.
Here's an explanation for the code widget ...