Authenticate using HTTP Basic Auth with your Avalara account ID as the username and license key as the password (Base64-encoded in the Authorization header).
POST to https://rest.avatax.com/api/v2/transactions/create (or the sandbox equivalent at sandbox.rest.avatax.com) with Content-Type: application/json.
Build the request body with type (SalesInvoice or SalesOrder for a quote), companyCode, date, customerCode, and an addresses block specifying the shipFrom and shipTo addresses with street, city, region, postalCode, and country.
Include a lines array where each line has number, quantity, amount, itemCode, and optionally taxCode (Avalara System Tax Codes) for accurate product-specific tax treatment.
The response contains totalTax, totalAmount, and a lines array with per-line tax detail including taxableAmount, tax, and rate, as well as a summary of tax authorities.
To commit the transaction (for reporting/remittance purposes), either set commit: true in the request or issue a separate POST to /api/v2/transactions/{companyCode}/{transactionCode}/commit.
Known gotchas
Using SalesOrder type does not commit the transaction for tax remittance; use SalesInvoice with commit:true when the sale is final to ensure the transaction is included in tax filings.
Avalara resolves addresses internally; an unresolvable address may return a tax result with a warning or fall back to a jurisdiction-level estimate—always validate address resolution in the response.
Tax codes (taxCode field) significantly affect the tax calculation for exempt categories like food, medicine, or digital goods; defaulting to a generic code can result in over- or under-collection.
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