# CalculateTaxes

Performs tax calculations on all invoices and line items within the request body.

`POST /api/v2/afc/calcTaxes`

**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/CalculateTaxes/

## 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:** `CalcTaxesRequest`

Request body for tax calculation API.

| Property | Type | Required | Description |
|---|---|---|---|
| `cfg` | RequestConfig | No |  |
| `cmpn` | CompanyData | No |  |
| `inv` | Invoice[] | No | List of invoices to process. |
| `ovr` | TaxOverride[] | No | Tax rate overrides. |
| `sovr` | SafeHarborOverride[] | No | Safe harbor overrides for USF taxes. |

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

Request body for tax calculation API.

| Property | Type | Required | Description |
|---|---|---|---|
| `cfg` | RequestConfig | No |  |
| `cmpn` | CompanyData | No |  |
| `inv` | Invoice[] | No | List of invoices to process. |
| `ovr` | TaxOverride[] | No | Tax rate overrides. |
| `sovr` | SafeHarborOverride[] | No | Safe harbor overrides for USF taxes. |

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

Request body for tax calculation API.

| Property | Type | Required | Description |
|---|---|---|---|
| `cfg` | RequestConfig | No |  |
| `cmpn` | CompanyData | No |  |
| `inv` | Invoice[] | No | List of invoices to process. |
| `ovr` | TaxOverride[] | No | Tax rate overrides. |
| `sovr` | SafeHarborOverride[] | No | Safe harbor overrides for USF taxes. |

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

Request body for tax calculation API.

| Property | Type | Required | Description |
|---|---|---|---|
| `cfg` | RequestConfig | No |  |
| `cmpn` | CompanyData | No |  |
| `inv` | Invoice[] | No | List of invoices to process. |
| `ovr` | TaxOverride[] | No | Tax rate overrides. |
| `sovr` | SafeHarborOverride[] | No | Safe harbor overrides for USF taxes. |

## Responses

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

### 200 Response: `CalcTaxesResponse`

Response body for tax calculation API.

| Property | Type | Required | Description |
|---|---|---|---|
| `inv` | InvoiceResult[] | No | Tax calculation results for each invoice submitted in request. |
| `err` | Error[] | No | Error description (as applicable). |