# Use the Commit API

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/rjd9034413244008/

Guide: Communications

# Use the Commit API

The Commit API 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.

To use the Commit API:

1.  Create new transactions at any point in the billing cycle.
2.  Populate the Document Code (`doc`) with a unique identifier (for example, a randomly generated GUID). Document Codes can be used to group transactions together between invoices, but be aware of associating too many transactions with a single Document Code. This makes it more difficult to uncommit specific transactions later.
3.  Use the Commit (`cmmt`) flag to identify transactions to include in or exclude from the compliance report for the reporting cycle.

It’s not necessary to set the `cmmt` flag immediately on a transaction. You can use the Commit API to update the `cmmt` flag.

Important

If you send a Document Code through the `CalculateTaxes` API as uncommitted, you can only change its commit status through the Commit API; you can’t change a Document Code's status through the `CalculateTaxes` API.