# Danh sách nhân viên

* API này dùng để lấy [danh sách nhân viên](https://nhanh.vn/store/user/index).

## Request

* Xem [common request params](/v3/readme.md#request-params).
* Xem [Postman sample](https://www.postman.com/nhanh-vn/pos-open-nhanh-vn/request/5zqsy92/business-user).

```curl
curl --location 'https://pos.open.nhanh.vn/v3.0/business/user?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
        "ids": [XXX,XXXX]
    },
    "paginator": {
        "size": 100
    }
}'
```

### Filters

| Key | Type  | Description                                      |
| --- | ----- | ------------------------------------------------ |
| ids | array | List ID nhân viên (chỉ hỗ trợ lọc tối đa 100 ID) |

### Paginator

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

## 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

* `depots` mảng các kho hàng:
  * Nếu mảng có giá trị: User chỉ được phép theo tác với các kho hàng này.
  * Nếu mảng rỗng: User được phép thao tác với toàn bộ kho hàng.

```javascript
{
    "code": 1,
    "paginator": {
        "next": "(int) ID bản ghi tiếp theo"
    },
    "data": [
        {
            "id": "(int) ID nhân viên 1",
            "username": "(string) Tài khoản đăng nhập 1",
            "fullName": "(string) Họ và tên 1",
            "email": "(string) Email",
            "mobile": "(string) Số điện thoại",
            "roleName": "(string) tên nhóm quyền",
            "depots": [
                {
                    "id": "(int) ID kho hàng 1",
                    "name": "(string) Tên kho hàng 1"
                },
                {
                    "id": "(int) ID kho hàng 2",
                    "name": "(string) Tên kho hàng 2"
                }
            ]
        },
        {
            "id": "(int) ID nhân viên 2",
            "username": "(string) Tài khoản đăng nhập 2",
            "fullName": "(string) Họ và tên 2",
            "email": "(string) Email",
            "mobile": "(string) Số điện thoại",
            "roleName": "(string) tên nhóm quyền",
            "depots": [
                {
                    "id": "(int) ID kho hàng",
                    "name": "(string) Tên kho hàng"
                }
            ]
        }
    ]
}
```


---

# 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/business/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.
