# Get HSCodes

## /hs-codes

<mark style="color:blue;">`GET`</mark> `https://api.terminal.africa/v1/hs-codes`

This endpoint allows you to get a list of all hs codes available.

#### Query Parameters

| Name           | Type   | Description                                                                                   |
| -------------- | ------ | --------------------------------------------------------------------------------------------- |
| perPage        | Number | Specify how many records will be sent in a single response. Defaults to 100.                  |
| page           | Number | Specify what page of records will be sent in response. Defaults to 1.                         |
| chapter        | String | Specify what hs code chapter to return. Defaults to all. Currently supports up to 97 chapters |
| category\_code | String | Specify what hs code category code to be returned                                             |
| hs\_code       | String | Specify what group of hs code to be returned                                                  |

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Set value to `Bearer SECRET_KEY` |

{% tabs %}
{% tab title="200 Hs codes retrieved successfully" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "status": true,
    "message": "Hs codes retrieved successfully",
    "data": {
        "hs_codes": [
            {
                "_id": "641d65dfd1b41ab967642832",
                "chapter": "90",
                "category": "Optical fibres and optical fibre bundles; optical fibre cables (excl. made up of individually sheathed fibres of heading 8544); sheets and plates of polarising material; lenses, incl. contact lenses, prisms, mirrors and other optical elements of any material, unmounted (excl. such elements of glass not optically worked)",
                "category_code": "9001",
                "sub_category": "Optical fibres, optical fibre bundles and cables (excl. made up of individually sheathed fibres of heading 8544)",
                "hs_code": "900110",
                "hs_code_id": "HS-91033501933",
                "__v": 0,
                "id": "641d65dfd1b41ab967642832"
            },
            {
                "_id": "641d65dfd1b41ab967642833",
                "chapter": "90",
                "category": "Optical fibres and optical fibre bundles; optical fibre cables (excl. made up of individually sheathed fibres of heading 8544); sheets and plates of polarising material; lenses, incl. contact lenses, prisms, mirrors and other optical elements of any material, unmounted (excl. such elements of glass not optically worked)",
                "category_code": "9001",
                "sub_category": "Image conductor cables of optical fibres (excl. cables made up of individually sheathed fibres of heading 8544)",
                "hs_code": "90011010",
                "hs_code_id": "HS-39846437965",
                "__v": 0,
                "id": "641d65dfd1b41ab967642833"
            },
            {
                "_id": "641d65dfd1b41ab967642834",
                "chapter": "90",
                "category": "Optical fibres and optical fibre bundles; optical fibre cables (excl. made up of individually sheathed fibres of heading 8544); sheets and plates of polarising material; lenses, incl. contact lenses, prisms, mirrors and other optical elements of any material, unmounted (excl. such elements of glass not optically worked)",
                "category_code": "9001",
                "sub_category": "Optical fibres, optical fibre bundles and cables (excl. made up of individually sheathed fibres of heading 8544 and image conductor cables)",
                "hs_code": "90011090",
                "hs_code_id": "HS-14513435157",
                "__v": 0,
                "id": "641d65dfd1b41ab967642834"
            },
            {
                "_id": "641d65dfd1b41ab967642835",
                "chapter": "90",
                "category": "Optical fibres and optical fibre bundles; optical fibre cables (excl. made up of individually sheathed fibres of heading 8544); sheets and plates of polarising material; lenses, incl. contact lenses, prisms, mirrors and other optical elements of any material, unmounted (excl. such elements of glass not optically worked)",
                "category_code": "9001",
                "sub_category": "Sheets and plates of polarising material",
                "hs_code": "90012000",
                "hs_code_id": "HS-48789662202",
                "__v": 0,
                "id": "641d65dfd1b41ab967642835"
            },
            {
                "_id": "641d65dfd1b41ab967642836",
                "chapter": "90",
                "category": "Optical fibres and optical fibre bundles; optical fibre cables (excl. made up of individually sheathed fibres of heading 8544); sheets and plates of polarising material; lenses, incl. contact lenses, prisms, mirrors and other optical elements of any material, unmounted (excl. such elements of glass not optically worked)",
                "category_code": "9001",
                "sub_category": "Contact lenses",
                "hs_code": "90013000",
                "hs_code_id": "HS-47812076456",
                "__v": 0,
                "id": "641d65dfd1b41ab967642836"
            }
        ],
        "pagination": {
            "page": 1,
            "perPage": 5,
            "prevPage": null,
            "nextPage": 2,
            "currentPage": 1,
            "total": 70,
            "pageCount": 14,
            "pagingCounter": 1,
            "hasPrevPage": false,
            "hasNextPage": true
        }
    }
}
</code></pre>

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.terminal.africa/tship/hs-codes/get-hs-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
