HS Code Classification
How CargoLint uses AI to suggest Harmonized System codes for your trade documents.
What Are HS Codes?
The Harmonized System (HS) is an internationally standardized system for classifying traded products. HS codes are:
- 6-digit minimum codes - Core product classification
- Extended to 8-10 digits - Country-specific tariff schedules
- Required for customs clearance - Mandatory for import/export
- Determine tariff rates - Affect duty calculations and trade agreements
- Standardized internationally - Used by ~200 countries
Example: Fresh apples = HS code 0808.30 (under Chapter 08 - Edible Fruit and Nuts).
How CargoLint Classifies HS Codes
CargoLint uses AI-powered recommendations to match line item descriptions from your trade documents to the appropriate HS codes. The model understands plain trade language - you describe the goods the way you would on an invoice, and it recommends the most relevant codes.
The system works as follows:
- Extract line item descriptions from invoice, packing list, or certificate of origin
- Analyse each description using our AI classification model
- Recommend HS codes from 5,600+ WCO 6-digit subheadings, ranked by relevance
- Return top suggestions with confidence scores
Example Extraction
{
"document_id": "doc_456",
"line_item": {
"description": "Stainless steel electric mixer",
"hs_code_suggestions": [
{
"code": "8509.40",
"description": "Food grinders and mixers",
"confidence": 0.92
},
{
"code": "8509.80",
"description": "Other electric machines for food preparation",
"confidence": 0.71
},
{
"code": "7326.90",
"description": "Articles of iron or steel, other",
"confidence": 0.45
}
]
}
}
HS Code Search API
Search for HS codes by product description or keyword:
curl -X GET "https://api.cargolint.com/api/v1/hs-codes/search?q=electric%20mixer&topK=10" \
-H "X-API-Key: YOUR_API_KEY"
The search accepts plain-language descriptions - trade wording, brand-agnostic product names, and material or use details all improve the results.
HS Code Versions
CargoLint maintains HS 2022 codes as the primary version, with fallback to HS 2017 for codes that only exist in the older version.
Confidence in HS Code Suggestions
HS code confidence scores determine how suggestions are handled:
- >= 0.55 - Top suggestion is auto-selected for the line item
- 0.25 - 0.54 - Suggestions are shown but require manual selection
- < 0.25 - No suggestions returned; manual classification needed
Checks Applied to a Declared Code
A code printed on a document is checked at two levels, and the two are reported separately because they fail for different reasons.
The first 6 digits are the international (WCO) part every country shares. They are checked two ways: the subheading must exist in the current HS edition, and the line item’s description must independently route to it. When the description routes somewhere else, the code is reported as doubtful; when the subheading does not exist at all, the code is reported as unrecognised, and if exactly one single-digit change produces a code the description does route to, that near-match is offered as the likely intended code.
Digits beyond the 6th belong to the destination country’s own tariff schedule, so they can only be checked when that schedule is loaded (currently the US schedule; other destinations stop at six digits and say so). The full code is matched against the currently effective lines under its subheading, and where several lines exist the description decides which one applies - or records the single question that would decide it, rather than guessing.
Which of these run depends on the document type:
| Document | Checks applied |
|---|---|
| Invoice, Certificate of Origin | All of the above - the line description describes the product |
| Bill of Lading | Only the checks that read no description: the subheading must exist, and a code longer than 6 digits must be a current tariff line. A B/L cargo line is freight (“said to contain: 36 cartons apparel”), so scoring a code against it would flag correct codes |
| Packing List | None - packing lists carry no HS codes |
The resulting state is shown as a pill on each line in the Document Issues panel; see what each HS code state means for the full list.
The same verdict runs everywhere a document is shown - Document Details, the review editor, and shared documents - so a line renders the same state, and the same badge colour, on every page. When two documents in one shipment declare different codes for the same goods, that disagreement is reported by the shipment consistency checks rather than the per-document rows.
HS Code Selector (UI)
In the web dashboard, you can use the HS Code Selector to:
- Search for codes by description
- Browse the hierarchical HS code tree (97 WCO chapters)
- Select a code and apply it to a line item
Common Classification Challenges
Material Composition
A product’s material composition affects classification:
- Cotton T-shirt - HS 6204.62 (Garments, cotton)
- Polyester T-shirt - HS 6204.65 (Garments, synthetic fiber)
CargoLint needs material details to classify correctly.
Mixed Assemblies
Products combining multiple materials may classify under the component material:
- Plastic phone case with metal stand - Could classify under plastic or metal depending on composition percentage
- Recommend: Specify which material is >= 50%
Use vs. Material
Some products classify by intended use rather than material:
- Stainless steel wire - Could be cutlery (HS 8215), wire (HS 7217), or fasteners (HS 7318)
- Context matters: What is the wire intended for?
Best Practices
- Provide complete product descriptions (material, size, use)
- Use industry-standard terminology
- Specify material composition percentages for mixed products
- Review suggested codes before finalizing
- Escalate borderline classifications to tariff experts
- Document classification reasoning for audit purposes