Skip to main content

HS Commodity Coder

The HS Commodity Coder classifies HS Codes based on provided text descriptions. You need the hs_coder permission in order to access these endpoints.

Partial HS Codes

In addition to a description, the first 2 or 4 digits of an HS Code may be provided in the partial_hs parameter. When set, the Commodity Coder will only return HS Codes starting with those digits.

Coding Methods

The Commodity Coder has several coding methods that it uses in order to do its classification. For the parse endpoint you can individually specify which of these methods to enable.

Order Matters

The first method that finds HS Codes returns its results before trying subsequent methods.

OrderMethodDescription
1ParserThis method attempts to find HS Codes that may be formatted in a variety of ways within the provided description.
2Manual LogicThis method attempts to match pre-defined textual content against the descriptions to determine an HS Code.
3ClassifierThis is a lightweight ML model that matches the provided description to an HS Code.

Parse (v1)

Method: POST, Endpoint: https://api.panjiva.com/latest/hs-codes/parse

Request Schema

description
required
string
partial_hs
string
use_parser
boolean
use_manual_logic
boolean
use_classifier
boolean

Response Schema

result_count
number
Array of objects

Parse Many

Method: POST, Endpoint: https://api.panjiva.com/latest/hs-codes/parse-many

Use this endpoint to parse many items at once

Request Schema

required
object

Response Schema

classifier_training_date
string
classifier_version
string
Array of objects