In the Avalara system, transactions (“line items”) can be associated with Document Codes. A Document Code (doc
) is a unique identifier. Each Document Code has a status: committed (“true”) or uncommitted (“false”).
Commit
API is often used when not all calculated taxes are deemed final for compliance reporting.Commit
API.Committing or uncommiting a Document Code affects all transactions associated with that Document Code. It is important to use unique identifiers for Document Codes to give you the flexibility to commit and uncommit specific transaction(s) later.
For example, let’s say you have a bill run that consists of 1,000 invoices, each with 10 line items per invoice, and you use the same Document Code for each invoice. When the bill run is complete, one of your Tax Analysts determines there is an error in one of the invoices. Because the same Document Code was used for each invoice, you cannot simply uncommit the Document Code associated with the bad invoice and remove it from your data set. You must uncommit the entire bill run, or send an adjustment for that specific invoice and send a new, corrected invoice. TheCommit
API makes it easy to correct mistakes like this.The Commit
API in Communications REST v2 gives your application the ability to choose the data that should appear in your compliance reports. A Document Code’s default commit status is uncommitted (“false”).
To use the Commit
API:
doc
) with a unique identifier (for example, a randomly generated GUID).cmmt
) flag to identify transactions to include in or exclude from the compliance report for the reporting cycle.CalculateTaxes
API as uncommitted, you can only change its commit status through the Commit
API; you cannot change a Document Code's status through the CalculateTaxes
API.It’s not necessary to set the Commit flag immediately on a transaction. Use the Commit API to update the Commit flag. See the Use Cases section for implementation examples.