# Commit

Commits or un-commits a document code.

`POST /api/v2/afc/commit`

**API:** AFC SaaS Pro REST v2
**Tag:** Tax Calculation
**API Version:** v2
**Authentication:** Basic (username + license key) or Bearer token

Source: https://developer.avalara.com/products/communications/api/v2/methods/Tax%20Calculation/Commit/

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `client_id` | integer | header | Yes | The client id. |
| `client_profile_id` | integer | header | No | The optional profile number. |

## Request Body

**Content-Type:** `application/json-patch+json`
**Schema:** `CommitRequest`

Parameter for CommitTransactions API.

| Property | Type | Required | Description |
|---|---|---|---|
| `doc` | string | No | Document code. |
| `cmmt` | boolean | No | Indicates if transactions for the specified document code should be committed. |
| `opt` | KeyValuePair[] | No | Overrides value for OptionalFields field in reports. |

**Content-Type:** `application/json`
**Schema:** `CommitRequest`

Parameter for CommitTransactions API.

| Property | Type | Required | Description |
|---|---|---|---|
| `doc` | string | No | Document code. |
| `cmmt` | boolean | No | Indicates if transactions for the specified document code should be committed. |
| `opt` | KeyValuePair[] | No | Overrides value for OptionalFields field in reports. |

**Content-Type:** `text/json`
**Schema:** `CommitRequest`

Parameter for CommitTransactions API.

| Property | Type | Required | Description |
|---|---|---|---|
| `doc` | string | No | Document code. |
| `cmmt` | boolean | No | Indicates if transactions for the specified document code should be committed. |
| `opt` | KeyValuePair[] | No | Overrides value for OptionalFields field in reports. |

**Content-Type:** `application/*+json`
**Schema:** `CommitRequest`

Parameter for CommitTransactions API.

| Property | Type | Required | Description |
|---|---|---|---|
| `doc` | string | No | Document code. |
| `cmmt` | boolean | No | Indicates if transactions for the specified document code should be committed. |
| `opt` | KeyValuePair[] | No | Overrides value for OptionalFields field in reports. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `CommitResponse` |

### 200 Response: `CommitResponse`

Response body for Commit API.

| Property | Type | Required | Description |
|---|---|---|---|
| `ok` | boolean | No | Indicates if document code's commit status was updated successfully. |
| `err` | Error[] | No | Error description (as applicable). |