Queries

HS codes (Harmonized System) classify products for international trade.

Available queries

HsCodes - Returns a list of HS codes based on the filters defined

query HsCodes(
  $where: QueryHsCodesWhereWhereConditions,
  $orderBy: [QueryHsCodesOrderByOrderByClause!],
  $first: Int = 50,
  $page: Int
) {
  HsCodes(
    where: $where
    orderBy: $orderBy
    first: $first
    page: $page
  ) {
    paginatorInfo {
      total
    }
    data {
      id
      code
      label
    }
  }
}
{
  "first": 50,
  "page": 1,
  "where": {
    "AND": [
      {
        "column": "CODE",
        "operator": "LIKE",
        "value": "%11%"
      }
    ]
  },
  "orderBy": [
    {
      "column": "CODE",
      "order": "ASC"
    }
  ]
}


Available fields

HsCode type

id
Unique identifier of the HS code
code
HS code
label
Label of the HS code


Filters

You can create filters based on following fields

id
Example: { "column": "ID", "operator": "EQ", "value": 100012 }
code
Example: { "column": "CODE", "operator": "LIKE", "value": "%11%" }
label
Example: { "column": "LABEL", "operator": "LIKE", "value": "%widget%" }

Sorting

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

query HsCodes(
  $orderBy: [QueryHsCodesOrderByOrderByClause!],
  $first: Int = 50,
  $page: Int
) {
  HsCodes(
    orderBy: $orderBy
    first: $first
    page: $page
  ) {
    paginatorInfo {
      total
    }
    data {
      id
      code
      label
    }
  }
}
{
  "orderBy": [
    {
      "column": "CODE",
      "order": "ASC"
    }
  ],
  "first": 50,
  "page": 1
}

Example of data returned

{
  "data": {
    "HsCodes": {
      "paginatorInfo": {
        "total": 2
      },
      "data": [
        {
          "id": 100012,
          "code": "61091000",
          "label": "T-shirts, singlets and other vests, knitted or crocheted"
        },
        {
          "id": 100013,
          "code": "62052000",
          "label": "Men's or boys' shirts of cotton"
        }
      ]
    }
  }
}