> For the complete documentation index, see [llms.txt](https://docs.terminal.africa/tship/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terminal.africa/tship/hs-codes/get-hs-codes-2.md). Agents can also search and read this documentation through its [MCP server](https://docs.terminal.africa/tship/~gitbook/mcp).

# Get HSCode Categories

Fetch list of HS Code Categories for a specific chapter

## /hs-codes/category

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

This endpoint allows you to get a list of available hs code categories for a given chapter.

#### Query Parameters

| Name    | Type   | Description                                                              |
| ------- | ------ | ------------------------------------------------------------------------ |
| chapter | String | HS Chapter code. If not provided, all available categories are returned. |

#### Headers

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

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

```json
{
    "status": true,
    "message": "Hs codes categories retrieved successfully",
    "data": [
        {
            "_id": "3306",
            "category": "Preparations for oral or dental hygiene, incl. denture fixative pastes and powders; yarn used to clean between the teeth \"dental floss\", in individual retail packages",
            "category_code_count": 3
        },
        {
            "_id": "3307",
            "category": "Shaving preparations, incl. pre-shave and aftershave products, personal deodorants, bath and shower preparations, depilatories and other perfumery, toilet or cosmetic preparations, n.e.s.; prepared room deodorisers, whether or not perfumed or having disinfectant properties",
            "category_code_count": 6
        },
        {
            "_id": "3305",
            "category": "Preparations for use on the hair",
            "category_code_count": 4
        },
        {
            "_id": "3301",
            "category": "Essential oils, whether or not terpeneless, incl. concretes and absolutes; resinoids; extracted oleoresins; concentrates of essential oils in fats, fixed oils, waxes or the like, obtained by enfleurage or maceration; terpenic by-products of the deterpenation of essential oils; aqueous distillates and aqueous solutions of essential oils",
            "category_code_count": 29
        },
        {
            "_id": "3302",
            "category": "Mixtures of odoriferous substances and mixtures, incl. alcoholic solutions, based on one or more of these substances, of a kind used as raw materials in industry; other preparations based on odoriferous substances, of a kind used for the manufacture of beverages",
            "category_code_count": 9
        },
        {
            "_id": "3303",
            "category": "Perfumes and toilet waters",
            "category_code_count": 3
        },
        {
            "_id": "3304",
            "category": "Beauty or make-up preparations and preparations for the care of the skin, incl. sunscreen or suntan preparations (excl. medicaments); manicure or pedicure preparations",
            "category_code_count": 5
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
