# InitiateHSCodeClassification

Create an HS code classification request.

`POST /api/v2/companies/{companyId}/items/$initiate-hscode-classification`

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

Source: https://developer.avalara.com/products/crossborder/api/methods/Items/InitiateHSCodeClassification/

## Description

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company for which you want to create this HS code classification request. |
| `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/) . |

## Request Body

**Schema:** `ItemHSCodeClassificationInputModel[]`

Input model of the HS code classification.

| Property | Type | Required | Description |
|---|---|---|---|
| `itemId` | integer | **Yes** | The unique item ID. |
| `countryOfDestinations` | string[] | **Yes** | Country of destination for this HS code classification.
Please provide all the values as valid 2-letter ISO 3166 country code.
Refer to 'ListCountries' api to get valid country code for any country if needed. |
| `isPremiumClassification` | boolean | No | Used for checking the premium classification status. |
| `isReclassification` | boolean | No | A field for checking whether this is a reclassification. |
| `isDisputed` | boolean | No | Whether this item classification is disputed. |
| `isPriority` | boolean | No | Whether this item classification is a priority classification. |
| `isExport` | boolean | No | the item is exported to other countries. |
| `isExportControl` | boolean | No | IsExportControl flag to identify cross border classification |
| `isCompliance` | boolean | **Yes** | Indicates whether this classification is for compliance purposes. |
| `instructions` | string | No | Instructions related to this item classification. |
| `language` | string | No | The language used in this item classification. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Created |  |
| 400 | Bad Request | `ProblemDetails` |
| 401 | Unauthorized | `ProblemDetails` |
| 404 | Not Found | `ProblemDetails` |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/items/$initiate-hscode-classification" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "itemId": 12345677890,
    "countryOfDestinations": [
      "US",
      "CA",
      "BR"
    ],
    "isPremiumClassification": false,
    "isReclassification": false,
    "isDisputed": false,
    "isPriority": false,
    "isExport": false,
    "isExportControl": false,
    "isCompliance": false,
    "instructions": "Sample instructions.",
    "language": "en-us"
  }
]'
```