Authenticate using HTTP Basic Auth with your Avalara account ID and license key on all requests to the AvaTax REST API.
Validate and normalize a shipping address by POSTing to `/api/v2/addresses/resolve` with the raw address; the response includes a `validatedAddresses` array and an `addressIsValid` flag — use the validated address in subsequent tax calls.
Create a sales transaction by POSTing to `/api/v2/transactions/create` with `type: SalesOrder` (uncommitted) including `companyCode`, `date`, `customerCode`, `addresses`, and `lines` with `quantity`, `amount`, and `itemCode`.
To record the transaction for reporting and remittance, commit it by POSTing to `/api/v2/transactions/{companyCode}/{transactionCode}/commit` — or set `commit: true` in the initial create call to create a `SalesInvoice` directly.
If the order is cancelled, void the transaction by POSTing to `/api/v2/transactions/{companyCode}/{transactionCode}/void` with a `code` reason (e.g., `DocVoided`).
For returns or refunds, create a `ReturnInvoice` transaction referencing the original transaction's `code` to ensure correct tax reversal.
Known gotchas
Using `SalesOrder` type creates an uncommitted transaction used only for tax calculation — it does not appear in tax reports; you must commit (to `SalesInvoice`) for the transaction to count toward filing.
Address validation errors do not automatically prevent tax calculation — AvaTax may still return a tax estimate using the unvalidated address; unvalidated addresses increase the risk of incorrect tax jurisdiction assignment.
Transaction codes must be unique per company; reusing a transaction code returns the existing transaction rather than creating a new one, which can cause silent data errors if order IDs are not unique across all channels feeding into AvaTax.
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