# Tra cứu IMEI bán ra theo ngày

* /api/product/imeisold: Tính năng này dùng để tra cứu danh sách IMEI bán ra theo ngày ở trên Nhanh.vn. Dữ liệu sẽ được phân trang, mỗi trang tối đa không quá 50 IMEI.

## 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 sẽ là 1.                                                            |
| icpp       | int    | Số lượng sản phẩm trên 1 trang. Tối đa không quá 50. Mặc định nếu không set giá trị gì sẽ là 50. |
| fromDate   | string | Ngày bán imei (từ ngày) định dạng yyyy-mm-dd                                                     |
| toDate     | string | Ngày bán imei (đến ngày) định dạng yyyy-mm-dd                                                    |
| productIds | int    | Tìm theo ID những sản phẩm /api/product/search                                                   |
| brandId    | int    | Tìm theo thương hiệu                                                                             |
| imei       | string | Tìm theo IMEI                                                                                    |

## 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 | is an array of product imei list          |

```javascript
data = [
    [
        "imei" => string, // IMEI number
        "soldDate" => string, // Ngày bán ra
        "depotId" => int, // ID cửa hàng bán ra
        "depotName" => string, // Tên cửa hàng bán ra
        "mode" => int, // loại xuất bán" => 1 = Chuyển hàng, 2 = Bán lẻ, 6 = Bán sỉ
        "modeName" => string, // Chuyển hàng || Bán lẻ || bán sỉ,
        "productName" => string, // Tên sản phẩm
        "productPrice" => double, // Giá sản phẩm
        "customer" => [ // Thông tin khách hàng
            "id" => int, // ID khách hàng
            "code" => string, // Mã khách hàng
            "phone" => string, // Điện thoại khách hàng
            "name" => string, // Tên khách hàng
            "email" => string, // Email khách hàng
            "address" => string // Địa chỉ khách 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/v2/product/imeisold.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.
