> For the complete documentation index, see [llms.txt](https://apidocs.nhanh.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.nhanh.vn/v3/promotion/pricelistproduct.md).

# Danh sách sản phẩm trong bảng giá

* Tính năng này dùng để lấy danh sách sản phẩm trong các bảng giá trên Nhanh.vn.

## Request

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

```curl
curl --location 'https://pos.open.nhanh.vn/v3.0/promotion/pricelistproduct?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json'
--data '{
   "filters": {
       "priceListIds": [],
       "productIds": []
   },
   "paginator": {
       "size": 50,
       "sort": {
           "id": "desc"
       }
       "next": {
           "id": 676578
       }
   }
}'
```

#### Filters

| Key          | Type                        | Description                |
| ------------ | --------------------------- | -------------------------- |
| productIds   | array                       | Mảng id sản phẩm.          |
| priceListIds | array$$^{{\color{red}\*}}$$ | Mảng id sản phẩm bảng giá. |

## 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": [
   {
     "product": {
       "id": "(int) Id sản phẩm",
       "name": "(string)Tên sản phẩm",
       "code": "(string)Mã sản phẩm",
       "barcode": "(string)Mã vạch sản phẩm",
       "price": "(int)Giá bán sản phẩm",
       "remain": "(int) Tồn sản phẩm",
       "importPrice": "(int)Giá nhập sản phẩm",
       "category": {
         "id": "(int) Id danh mục sản phẩm",
         "name": "(string) Tên danh mục sản phẩm"
       }
     },
     "priceList": [
       {
         "id": "(int) Id bảng giá",
         "businessId": "(int) Id doanh nghiệp",
         "name": "(string) Tên bảng giá",
         "value": "(int)Giá bán sản phẩm theo bảng giá"
       },
       {
         "id": "(int) Id bảng giá",
         "businessId": "(int) Id doanh nghiệp",
         "name": "(string) Tên bảng giá",
         "value": "(int)Giá bán sản phẩm theo bảng giá"
       }
     ]
   }
 ]
}
```
