# Kho hàng

* /api/store/depot: Tính năng này dùng để lấy danh sách kho của doanh nghiệp. Hỗ trợ tìm kiếm thông qua ID kho.
* 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 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          |
| ------- | ---- | -------------------- |
| depotId | Int  | Tìm kiếm theo ID kho |

## Response

JSON decode the response to get the structure:

| Key      | Type  | Description                               |
| -------- | ----- | ----------------------------------------- |
| code     | int   | 1 = success or 0 = failed                 |
| messages | array | is an array of error messages if code = 0 |
| data     | array | Mảng danh sách kho của doanh nghiệp       |

```javascript
data = [
    "id" => [
        "id" => int, // ID kho hàng
        "name" => string, // Tên kho hàng,
        "mobile" => string, // Số điện thoại kho hàng,
        "cityId" => int, // ID thành phố,
        "cityName" => string, // Tên 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ỉ kho
    ],
    "id" => [
        "id" => int, // ID kho hàng
        "name" => string, // Tên kho hàng,
        "mobile" => string, // Số điện thoại kho hàng,
        "cityId" => int, // ID thành phố,
        "cityName" => string, // Tên 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ỉ kho
   ]
]
```


---

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