# Danh mục nội bộ

* API này được sử dụng để lấy [danh mục nội bộ](https://nhanh.vn/product/category/internal).
* Danh mục nội bộ thường rất ít khi bị thay đổi, bạn có thể lấy dữ liệu và cache khoảng 24h (và có chức năng để user có thể xóa cache, để lấy dữ liệu mới nhất khi cần) giúp giảm tải việc gọi API.

## Request

* Xem [Postman sample](https://www.postman.com/nhanh-vn/pos-open-nhanh-vn/request/xvfzkfq/product-internalcategory).

```curl
curl --location 'https://pos.open.nhanh.vn/v3.0/product/internalcategory?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json'
--data '{
    "filters": {
        "name": "Tên danh mục nội bộ"
    },
    "paginator": {
        "size": 50,
        "next": ""
    }
}'
```

### Filters

| Key  | Type   | Description                         |
| ---- | ------ | ----------------------------------- |
| ids  | array  | Mảng ID danh mục nội bộ, tối đa 100 |
| name | string | Tên danh mục                        |
| code | string | Mã danh mục                         |

## Response

* Xem cấu trúc chung [tại đây](/v3/readme.md#response).

### Failed response

* Xem các mã lỗi chung [tại đây](/v3/readme.md#failed-response).

### Successful response

```json
{
    "code": 1,
    "paginator": {
        "next": "Dùng để lấy dữ liệu trang tiếp theo"
    },
    "data": [
        {
            "id": "(int) ID danh mục nội bộ 1",
            "parentId": "(int) ID danh mục cha 1",
            "name": "(string) Tên danh mục 1",
            "code": "(string) Mã danh mục 1",
        },
        {
            "id": "(int) ID danh mục nội bộ 2",
            "parentId": "(int) ID danh mục cha 2",
            "name": "(string) Tên danh mục 2",
            "code": "(string) Mã danh mục 2",
        }
    ]
}
```


---

# 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://apidocs.nhanh.vn/v3/product/internalcategory.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.
