---
updatedAt: 2026-08-18T18:39:20.000Z
agentTools:
  projectIndex: https://stockpit.readme.io/llms.txt
---

# Queries

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

# Available queries

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

```graphql
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
    }
  }
}
```

```json Variables (JSON)
{
  "first": 50,
  "page": 1,
  "where": {
    "AND": [
      {
        "column": "CODE",
        "operator": "LIKE",
        "value": "%11%"
      }
    ]
  },
  "orderBy": [
    {
      "column": "CODE",
      "order": "ASC"
    }
  ]
}
```

<br/>

***

# Available fields

## HsCode type

| id <span style={{ fontWeight: "normal" }}>- [ID](/reference/data-types#id) </span> |
| :--------------------------------------------------------------------------------- |
| Unique identifier of the HS code                                                   |

| code <span style={{ fontWeight: "normal" }}>- [String](/reference/data-types#string)</span> |
| :------------------------------------------------------------------------------------------ |
| HS code                                                                                     |

| label <span style={{ fontWeight: "normal" }}>- [String](/reference/data-types#string)</span> |
| :------------------------------------------------------------------------------------------- |
| Label of the HS code                                                                         |

<br/>

***

# 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

```graphql
query HsCodes(
  $orderBy: [QueryHsCodesOrderByOrderByClause!],
  $first: Int = 50,
  $page: Int
) {
  HsCodes(
    orderBy: $orderBy
    first: $first
    page: $page
  ) {
    paginatorInfo {
      total
    }
    data {
      id
      code
      label
    }
  }
}
```

```json Variables (JSON)
{
  "orderBy": [
    {
      "column": "CODE",
      "order": "ASC"
    }
  ],
  "first": 50,
  "page": 1
}
```

## Example of data returned

```json
{
  "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"
        }
      ]
    }
  }
}
```