# Danh sách kho hàng

* API này dùng để lấy [danh sách kho hàng](https://nhanh.vn/store/setting/expire).
* Chú ý: Dữ liệu này rất ít khi bị thay đổi (chỉ xảy ra khi doanh nghiệp mở thêm kho mới), bạn có thể cache dữ liệu trên hệ thống của bạn để giảm tải việc phải gọi API liên tục, thời gian cache khuyến cáo là 24h.

## Request

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

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

### Filters

| Name | Type  | Description                                               |
| ---- | ----- | --------------------------------------------------------- |
| ids  | array | Mảng id cần lấy dữ liệu. Để trống để lấy toàn bộ dữ liệu. |

## 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": "Giá trị để lấy dữ liệu trang tiếp theo"
  },
  "data": [
    {
      "id": "(int) ID kho hàng 1",
      "code": "(string) Mã kho hàng 1",
      "name": "(string) Tên kho hàng 2",
      "mobile": "(string) Số điện thoại",
      "location": {
        "cityId": "(int) ID tỉnh/thành phố",
        "cityName": "(string) Tên tỉnh/thành phố",
        "districtId": "(int) ID quận/huyện",
        "districtName": "(string) Tên quận/huyện",
        "wardId": "(int) ID phường/xã",
        "wardName": "(string) Tên phường/xã",
        "address": "(string) Địa chỉ"
      }
    },
    {
      "id": "(int) ID kho hàng 2",
      "code": "(string) Mã kho hàng 2",
      "name": "(string) Tên kho hàng 2",
      "mobile": "(string) Số điện thoại",
      "location": {
        "cityId": "(int) ID tỉnh/thành phố",
        "cityName": "(string) Tên tỉnh/thành phố",
        "districtId": "(int) ID quận/huyện",
        "districtName": "(string) Tên quận/huyện",
        "wardId": "(int) ID phường/xã",
        "wardName": "(string) Tên phường/xã",
        "address": "(string) Địa chỉ"
      }
    }
  ]
}
```


---

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