HS Code Queries

HsCodes — Returns a list of HS codes with ordering and filters

query HsCodes(
  $where: QueryHsCodesWhereWhereConditions,
  $orderBy: [QueryHsCodesOrderByOrderByClause!]
) {
  HsCodes(
    where: $where
    orderBy: $orderBy
  ) {
    id
    code
    label
  }
}
{
  "where": {
    "AND": [
      { "column": "CODE", "operator": "LIKE", "value": "84%" }
    ]
  },
  "orderBy": [
    { "column": "CODE", "order": "ASC" }
  ]
}

Available fields

FieldTypeDescription
idIDUnique identifier of the HS code.
codeStringHS code number.
labelStringDescription of the HS code.

Filters

You can create filters based on following fields

id - ID
Example: { "column": "ID", "operator": "EQ", "value": 100012 }
code - String
Example: { "column": "CODE", "operator": "LIKE", "value": "84%" }
label - String
Example: { "column": "LABEL", "operator": "LIKE", "value": "%machinery%" }

Sorting

You can sort data based on following fields: id, code, label

query SortHsCodes(
  $where: QueryHsCodesWhereWhereConditions
) {
  HsCodes(
    where: $where
    orderBy: [{ column: CODE, order: ASC }]
  ) {
    id
    code
    label
  }
}

Example of data returned

{
  "data": {
    "HsCodes": [
      {
        "id": 100001,
        "code": "8471.30.00",
        "label": "Portable digital automatic data processing machines"
      },
      {
        "id": 100002,
        "code": "8471.41.00",
        "label": "Digital automatic data processing machines"
      }
    ]
  }
}

Data Types

HsCode

FieldTypeDescription
idIDUnique identifier of the HS code.
codeStringHS code number.
labelStringDescription of the HS code.

HsCodeInput

FieldTypeDescription
idID!HS code ID (required for updates).
codeStringHS code number.
labelStringDescription of the HS code.