# getClassification

Retrieve a single classification by ID

`GET /api/v2/companies/{companyId}/classifications/{classificationId}`

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

Source: https://developer.avalara.com/products/managed-and-premium-tariff-code/api/methods/Classifications/getClassification/

## Description

Returns the unify view of a single classification by its composite
ID. The ID is the value previously returned in
`items[].classifications[].id` from `POST /classifications`
(e.g. `2-76713-1651708-CHEM-SAMPLE-008-HS_FULL-US`).

Internally the controller delegates to `UnifyGetService`, which
mirrors the legacy V1 GET pipeline: token check, SKU mapping
lookup, cross-customer guard, customer access checks, then
`ClassificationService.getClassification(...)`. The legacy
result is then reshaped into `ClassificationGetResponse` with
the unify field-name flips reversed automatically.

## Error envelope by HTTP status

| Status | Envelope        | Trigger                                                                                  |
|--------|-----------------|------------------------------------------------------------------------------------------|
| 200    | `ClassificationGetResponse` | Classification found.                                                        |
| 401    | `AvaTaxError`   | Gateway authentication failure (rejected before the controller ran).                     |
| 404    | `AvaTaxError`   | `SkuMappingNotFound` OR underlying classification null OR downstream `AvaTaxException`.  |
| 422    | `AvaTaxError`   | `ErrorCodeException` (auth / company-id / customer access). Same envelope as V1 GET.     |
| 500    | `AvaTaxError`   | Unhandled exception — same envelope as `POST .../classifications` (`UnhandledException`).  |

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `undefined` |  |  | No |  |
| `classificationId` | string | path | Yes | Composite classification ID returned by the POST endpoint
(e.g. `2-76713-1651708-CHEM-SAMPLE-008-HS_FULL-US`). Treat
it as opaque on the client - the server resolves it through
the SKU mapping store, not by parsing segments. |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Classification found. Returns the unify-shaped
`ClassificationGetResponse` populated from the legacy
store; absent fields mean the underlying record didn't
carry them. | `ClassificationGetResponse` |
| 401 | Gateway authentication failure - the request was rejected
by the upstream authentication layer BEFORE the controller
ran. Body uses `AvaTaxError` — not the nested `Error` objects
that may appear inside a **`207`** `items[].classifications[].error`. | `AvaTaxError` |
| 404 | No classification exists for the supplied
`classificationId`. Three controller paths produce 404,
all returning the same `AvaTaxError` shape: unknown SKU
mapping; SKU mapping resolves but the classification
record is null; downstream `AvaTaxException` (treated as
not-found per V1 parity). | `AvaTaxError` |
| 422 | Validation / authorization failure raised as
`ErrorCodeException` (e.g. `NO_AUTHORIZATION` when the
token customer doesn't match the SKU customer;
`INVALID_FIELD_OPTION_VALUE` when the SKU's encoded
companyId is non-numeric). Body uses the AvaTax envelope
(`AvaTaxError`), **same structural family as POST `/classifications` HTTP-level 422**. | `AvaTaxError` |
| 429 |  |  |
| 500 | Unhandled server error. Body uses **`AvaTaxError`**
(`UnhandledException`, number **50**) via
`HSClassificationErrors.getUnhandledException()` —
**same envelope as POST** `/classifications` **500**. | `AvaTaxError` |

### 200 Response: `ClassificationGetResponse`

Unify GET response - one classification record identified by the
composite `id`, with the originating item embedded as `item`.
Field projection is driven by the legacy classification record
loaded from the underlying store (HSCT / ItemMaster / DW /
parking lot, in priority order), not by parsing the ID. Fields
beyond `id` / `status` are populated when the legacy record
carries them. The embedded `item` reverses the legacy
field-name flips (`description` -> `title`, `summary` ->
`description`, `itemGroup` -> `category`); the
`_uncategorized` sentinel is silently dropped.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | string | **Yes** | Composite ID; same value the POST response surfaces under `items[].classifications[].id`. |
| `activity` | string | No | Reverse-mapped from the legacy uppercase activity (`HS_FULL` -> `hsFull`, etc.). Values: `hsFull`, `hs6`, `export`, `coo`. |
| `classificationType` | string | No |  Values: `managed`, `autoPro`, `autoEssentials`. |
| `countryOfDestination` | string | No | Present for `hsFull` / `hs6`. |
| `countryOfExport` | string | No | Present for `export`. |
| `enrichments` | string[] | No |  |
| `classificationModifiers` | ClassificationModifiers | No |  |
| `status` | string | **Yes** | Reverse-mapped from the legacy status using the same heuristics as the POST builder. Values: `pending`, `classified`, `rejected`, `cannotBeClassified`. |
| `hsCode` | string | No | Final HS code; present once `status == "classified"` for `hsFull` / `hs6`. |
| `confidence` | string | No | Suppressed when the resolved customer's `confidenceFlag` is off. Values: `high`, `medium`, `low`, `test`. |
| `confidenceDescription` | string | No | Suppressed alongside `confidence` for customers without the confidence flag. |
| `rationale` | string | No | Suppressed unless `status == "classified"` (V1 parity). |
| `item` | Item | No |  |

## Example Request

```bash
curl -X GET "https://api-sandbox.classification.avalara.net/api/v2/companies/{companyId}/classifications/{classificationId}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```