---
title: "Classify an HS Code"
method: POST
path: "/utils/classify-hscode"
tags: ["Utilities"]
---

# Classify an HS Code

`POST /utils/classify-hscode`

Look up or validate a Harmonized System (HS) code for a product using its description or a known HS code. The endpoint returns the best-matching HS code along with a confidence score and product classification details.

**When to use:** Call this endpoint when preparing international shipments and you need the correct HS code for customs declarations, commercial invoices, or duty/tax estimation.

**Prerequisites:**
- Valid JWT authentication token (Bearer)
- At least one of: a product text description (`description`) or an existing HS code to validate (`hsCodeProvided`)

**Key behaviors:**
- Powered by the Zonos classification engine for accurate tariff lookup
- Returns a confidence score — low-confidence results should be reviewed manually
- You can optionally provide destination country codes to get country-specific classifications
- If both `description` and `hsCodeProvided` are supplied, the API cross-references them for higher accuracy
- Use the returned HS code in the `/ship/commercial-invoice` and `/ship/generate/` endpoints for international shipments

## Request body

- object
  - `description` string — Product description for HS code classification. Required if hsCodeProvided is not provided.
  - `hsCodeProvided` string — Customer or third party provided HS code. When provided, the classification will be guided by this code. Required if description is not provided.
  - `shipToCountries` string[] — List of destination countries for shipping
  - `includeAlternatives` boolean — Whether to include alternative HS code suggestions in the response

## Response `200`

Successful HS code classification

- object
  - `success` boolean — Indicates if the request was successful
  - `data` object — HS code classification data
    - `hsCode` string — Harmonized System code
    - `description` string — Friendly description of the HS code
    - `fullDescription` string — Full detailed description of the HS code
    - `confidenceScore` number — Confidence score for the classification (0-1)

---

[API](https://skmtc.net/envia/apis/envia-shipping-api-complete-documentation.md) · [All operations](https://skmtc.net/envia/apis/envia-shipping-api-complete-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/envia/envia-shipping-api-complete-documentation/versions/39f9208959d6/schema)
