Obtain AvaTax API credentials (account number and license key) from the Avalara Admin Console; authenticate using HTTP Basic auth with account number as username and license key as password.
Use the sandbox base URL https://sandbox-rest.avatax.com/api/v2 for development and https://rest.avatax.com/api/v2 for production — all endpoints are under /api/v2.
POST to /api/v2/transactions/create with a JSON body containing 'type' ('SalesOrder' for calculation-only or 'SalesInvoice' to record and commit), 'companyCode' (your Avalara company code), 'date', 'customerCode', and 'lines' array.
Each line in the 'lines' array requires 'number' (line identifier), 'quantity', 'amount' (extended price), and 'itemCode'; include 'taxCode' if you need to override Avalara's automatic product taxability classification.
Include 'addresses' at either the document level or line level with 'shipFrom' and 'shipTo' addresses containing street, city, region (state code), postalCode, and country — address completeness directly impacts tax accuracy.
The response includes 'totalTax', 'totalTaxable', and a 'lines' array with per-line tax detail; use 'summary' array for jurisdiction-level tax breakdowns.
Known gotchas
Using 'SalesOrder' type does not record the transaction in Avalara's ledger and is suitable for real-time cart calculations; using 'SalesInvoice' with 'commit: true' records a permanent transaction used for filing — mixing these up can cause either missing records or duplicate committed transactions.
Address validation is not automatic — if you pass an unvalidated or incomplete address, Avalara will still return a tax calculation, but it may be for the wrong jurisdiction; run addresses through /api/v2/addresses/resolve before calculating tax for high-value or high-volume scenarios.
Avalara's product tax codes (Avalara Tax Codes, or ATCs) determine taxability across jurisdictions; using the wrong tax code for a product category (e.g., treating software as tangible personal property) will produce incorrect tax calculations that may create compliance liability.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp