> For the complete documentation index, see [llms.txt](https://apidocs.nhanh.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.nhanh.vn/v2/store/user.md).

# Nhân viên

* /api/user/index: Tính năng này dùng để lấy danh sách nhân viên của doanh nghiệp

## Request

* Xem các [common request params](/v2/readme.md#request-params)
* Các key của mảng **data array** dùng để tạo **data** json string:

| Key  | Type | Description                                                           |
| ---- | ---- | --------------------------------------------------------------------- |
| page | int  | Phân trang (giá trị mặc định là 1)                                    |
| icpp | Int  | Số lượng nhân viên trên 1 trang. Mặc định là 10. Tối đa không quá 50. |

## Response

JSON decode the response to get the structure:

| Key      | Type   | Description                    |
| -------- | ------ | ------------------------------ |
| code     | int    | 1 = success or 0 = failed      |
| messages | string | is a error message if code = 0 |
| data     | array  | is an array of articles        |

```javascript
[
    "totalPages" => int // Tổng số page
    "page" => int // Page hiện tại
    "users" => [ // Kết quả trả về
        "id" => [ // user 1
            "id" => int, // Id nhân viên
            "username" => string, // username
            "fullName" => string, // Tên đầy đủ
            "email" => string, // Email
            "mobile" => string, // Mobile
            "roleName" => string, // Nhóm quyền nhân viên
            "depots" => [ // Danh sách kho nhân viên đang quản lý
                // Key này sẽ không được trả về nếu nhân viên
                // không bị giới hạn kho (được quản lý hết các kho)
                "id kho 1" => string, // Tên kho 1
                "id kho 2" => string, // Tên kho 2
                ...
            ]
        ],
        "id" => [ // user 2
            ...    
        ]
    ]
]
```


---

# 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 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/v2/store/user.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.
