# Danh sách sản phẩm nhà cung cấp

* Tính năng này dùng để lấy [danh sách sản phẩm nhà cung cấp](https://nhanh.vn/supplier/product/index). Chú ý:
* Dữ liệu sẽ được phân trang, mỗi trang tối đa không quá 100 sản phẩm.

## Request

* Xem [common request params](/v3/readme.md#request-params).

```curl
curl --location --globoff 'https://pos.open.nhanh.vn/v3.0/product/supplierproduct?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
    },
    "paginator": {
        "size": 100,
        "next": {"id": 100}
    }
}'
```

### Filters

| Key           | Type  | Description                                      |
| ------------- | ----- | ------------------------------------------------ |
| productIds    | array | Mảng ID sản phẩm, tối đa 100                     |
| supplierIds   | array | Mảng ID nhà cung cấp, tối đa 100                 |
| createdAtFrom | int   | Ngày tạo sản phẩm từ ngày (định dạng timestamp)  |
| createdAtTo   | int   | Ngày tạo sản phẩm đến ngày (định dạng timestamp) |

### Paginator

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

#### sort

| Value | Description              | Sort                                     |
| ----- | ------------------------ | ---------------------------------------- |
| id    | ID sản phẩm nhà cung cấp | desc: giảm dần (mặc định), asc: tăng dần |

## 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": "Dùng để lấy dữ liệu trang tiếp theo"
	},
	"data": [
		{
			"productId": "(int) Id sản phẩm",
			"supplierId": "(int) Id nhà cung cấp",
			"supplierProductCode": "(string) Mã sản phẩm nhà của cung cấp",
			"createdAt": "(int) Thời gian tạo sản phẩm"
		}
	]
}
```


---

# 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/product/supplierproduct.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.
