> This page is for Documentation, version Integration guides (default).
> For other versions, use one of these documentation indexes:
> - Integration guides (default): https://avalara.ferndocs.com/docs/integration-guides/llms.txt
> - Refactor guides: https://avalara.ferndocs.com/docs/refactor-guides/llms.txt
> - Get certified: https://avalara.ferndocs.com/docs/get-certified/llms.txt
> - Agent to Agent (A2A): https://avalara.ferndocs.com/docs/agent-to-agent-a2a/llms.txt
> - AI use cases: https://avalara.ferndocs.com/docs/ai-use-cases/llms.txt
> - API versioning: https://avalara.ferndocs.com/docs/api-versioning/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://avalara.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://avalara.ferndocs.com/_mcp/server.

# Commit Request

* [Previous](https://developer.avalara.com/communications/dev-guide_rest_v2/commit-uncommit/)
* [Next Chapter](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/)

Use these methods to commit and uncommit Document Codes:

* [Commit API](#endpoint)
* [Commit flag](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/commit/) (`cmmt`) in the [invoice](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/invoice/)

### Commit Endpoint

Endpoint

Method

Description

Request

Response

`/api/v2/afc/commit`

`POST`

Commits and Uncommits transactions. See [Commit/Uncommit](https://developer.avalara.com/communications/dev-guide_rest_v2/commit-uncommit/) for more information.

[Commit Request](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/commit-request/)

[Commit Response](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/commit-response/)

### The Commit Request

The [Commit request](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/commit-request/) is used to change the Commit flag (`cmmt`) for a given Document Code (`doc`). Let’s send a simple `Commit` call using [Postman](https://www.getpostman.com) and inspect the results.

### Headers

Add these [mandatory headers](https://developer.avalara.com/communications/dev-guide_rest_v2/getting-started/authentication/) to your request:

* `Authorization` using basic HTTP authentication
* `client_id`
* `Content-Type: application/json`

Include the `client_profile_id` if you are using a [client profile](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/client-profiles/).

#### Postman Authorization Example

![](https://developer.avalara.com/public/images/comms/dev-guide_rest_v2/postman_authorization_commit.png)

#### Postman Headers Example

![](https://developer.avalara.com/public/images/comms/dev-guide_rest_v2/postman_headers_commit.png)

### Body

For the body of the `POST` request, copy and paste this example:

```json
{ "doc": "DocumentCode12345", "cmmt": true, "opt": [ { "key": 1, "val": "Optional value" } ]}
```

#### What are we sending?

1. Document Code (`doc`) "DocumentCode12345"
2. A request to commit Document Code "DocumentCode12345" by setting the Commit flag (`cmmt`) to `true`

* `true` commits all transactions with Document Code (`doc`) – “DocumentCode12345” in this example
* `false` uncommits all transactions with Document Code (`doc`)

4. Optional information about the [Commit request](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/commit-request/) using the [Key Value Pair](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/key-value-pair/) (`opt`) object

### Response

The [Commit response](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/commit-response/) contains a confirmation of success or failure:

```json
{ "ok": true}
```

* `true` indicates that the Document Code (`doc`) has been committed or uncommitted successfully (depending on the value of the Commit flag (`cmmt`))

* `false` indicates an error - details are contained in the [Error response](https://developer.avalara.com/communications/dev-guide_rest_v2/reference/error-response/) object

* [Previous](https://developer.avalara.com/communications/dev-guide_rest_v2/commit-uncommit/)

* [Next Chapter](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/)

> **Note**
>
> Part of the **Communications REST v2 Developer Guide** integration guide. [Open the full "Commit Request" milestone on Avalara](https://developer.avalara.com/products/communications/integration-guides/dev-guide_rest_v2/commit-uncommit/) to see every page in this section.