# GetBatchTaxCodeRecommendations

Retrieves the status and results of a tax code recommendation batch.

`GET /api/v2/companies/{companyId}/taxcode-recommendations/batches/{batchId}`

**API:** AvaTax API
**Tag:** Items
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/avatax/api/methods/Items/GetBatchTaxCodeRecommendations/

## Description

Retrieves the status and results of a tax code recommendation batch for the specified company.
If the batch status is "Completed", the response includes the tax code recommendations for all items in the batch.
If the batch status is "Waiting", "Processing", or any other non-complete status, only the status information is returned.
Returns '404 Not Found' if the batch has been deleted or does not exist.
            
Batches are automatically deleted after 1 day.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The unique ID of the company. |
| `batchId` | integer | path | Yes | The unique ID of the recommendation batch. |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `ItemTaxcodeRecommendationBatchStatusOutputModel` |
| 400 | Bad Request | `ProblemDetails` |
| 401 | Unauthorized | `ProblemDetails` |
| 404 | Not Found | `ProblemDetails` |
| 500 | Server Error |  |

### 200 Response: `ItemTaxcodeRecommendationBatchStatusOutputModel`

Represents the output model containing the status and results of a tax code recommendation batch.

| Property | Type | Required | Description |
|---|---|---|---|
| `batchId` | integer | No | The unique ID of the batch. Example: `105`. |
| `batchStatus` | string | No | The current processing status of the batch.
Possible values: "Pending", "Processing", "Completed", "Failed", "Deleted" Example: `Completed`. |
| `value` | ItemTaxcodeRecommendationBatchesOutputModel[] | No | The list of items with their tax code recommendations.
This property is populated only when the batch status is "Completed". |
| `message` | string | No | An optional message providing additional information about the batch. |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/taxcode-recommendations/batches/{batchId}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```