DOCS

Classifying items

Learn how to request a classification in Dashboard and via API.

Below you'll find examples illustrating how to request universal and country-specific classifications through Dashboard or via API. For those seeking more comprehensive technical details and extensive documentation, visit our Zonos GraphQL API reference developer site. This comprehensive resource offers detailed insights into API endpoints, GraphQL mutations, and extensive technical information.

Input fields 

While only a description is required to generate a classification, the more product details you provide, the more accurate your classification will be. Alternatively, you can simply provide a product URL and Classify will automatically extract all relevant item details for you. Below is a comprehensive explanation of each input field accepted by Classify. By understanding these input fields, you can maximize their usage and generate highly accurate classifications.

Request a classification 

To request a classification in Dashboard or via API, follow the steps and mutation below.

The example below shows a universal (6-digit) request. To request classifications to specific countries, add the countries' ISO codes in the Classify request as seen in the example below. To request a universal HS code, leave the ship-to country null in the Classify request.

The input takes a list so you can request many or a single classification at once.

Note: To generate audit trails via API, include the auditTrail field in your query. Contact your Zonos representative for access and implementation details.

1mutation ClassifyItems($input: [ClassificationCalculateInput!]!) {
2 classificationsCalculate(input: $input) {
3 id
4 name
5 categories
6 imageUrl
7 hsCode {
8 code
9 description {
10 full
11 }
12 }
13 }
14}

Possible API responses

When Classify receives a classification request, it attempts to match the input item data included in the request with a match in Classify's database based on the highest confidence score. Based on what is found, Classify will return one of the following responses:

  1. When hsCode is returned with a 6 to 8+ digit HS code, depending on whether or not a ship-to country was included in the request, your classification request was successful.
  2. When {"errors": [ { "message": "No adequate response"}]} is returned, that means Classify could not find a classification due to insufficient input information.
GraphQL API ReferenceTypes, inputs, and operations used in this guide
Book a demo

Was this page helpful?


Get support·Legal docs·© 2026 Zonos