Skip to main content
Avalara Help Center

How can I use cURL to verify I can connect?

Overview

cURL can be used to verify that you can connect to the AvaTax service.

Environment

Avalara AvaTax

Resolution

When using cURL to connect with AvaTax, you can use something like the example below. Please note the account number an license key below are fake, and the call type could be any of our valid calls. This example happens to be for a cancel tax call.

 

curl -u 1100123456:ABCDEF1234567890 -H "Content-Type: text/xml" -d @CancelCall.txt "https://avatax.avalara.net/1.0/tax/cancel"

 

In this example, the file CancelCall.txt had the following contents:

<CancelTaxRequest><DocType>SalesInvoice</DocType><DocCode>TEST123123</DocCode><CompanyCode>APITrialCompany</CompanyCode><CancelCode>DocDeleted</CancelCode></CancelTaxRequest>

 

This call will most likely produce an error stating that "Company not found.  Verify the CompanyCode." This is a good result. The connection was successfully established, even if it did generate an error.