# HSCodeValidationRequest

Validate HS Codes

`POST /api/v2/companies/{companyId}/classifications/hscodes/validate`

**API:** Avalara Item Classification API
**Tag:** HSCodeValidationRequest
**API Version:** 16.0.1-oas3
**Base URL:** https://api-sandbox.classification.avalara.net
**Authentication:** Basic (username + license key)

Source: https://developer.avalara.com/products/item-classification/api/methods/HSCodeValidationRequest/HSCodeValidationRequest/

## Description

Validates a list of HS codes for a given customer and company.
There is a limit to the number of HS codes that can be validated in a single request.
Requests exceeding this limit will be rejected with a 413 Payload Too Large error.

The customer must be enabled for HS code validation service.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | string | path | Yes | The unique identifier of the company. |
| `customerId` | string | query | Yes | The unique identifier of the customer. |
| `HEADER_CONTEXT` | string | header | No | Optional header context. |

## Request Body

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

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Successful validation of HS codes. |  |
| 401 | Authentication required. Can be caused by a missing or incorrect credentials. | `ErrorInfo` |
| 402 | The company is not provisioned for hs_code validation. | `ErrorInfo` |
| 413 | Payload Too Large | `ErrorInfo` |
| 422 | Company could not be found. | `ErrorInfo` |
| 500 | An invalid exception handler routine has been detected. | `ErrorInfo` |
| 503 | Service unavailable - HS Classification API not responding. | `ErrorResponse` |

## Example Request

```bash
curl -X POST "https://api-sandbox.classification.avalara.net/api/v2/companies/{companyId}/classifications/hscodes/validate" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '[
  {
    "hsCode": "123456",
    "country": "US",
    "version": "2023",
    "isExport": ""
  }
]'
```