# Danh sách sản phẩm combo

* Tính năng này dùng để lấy danh sách sản phẩm combo. Chú ý:
* Dữ liệu sẽ được phân trang, mỗi trang tối đa không quá 50 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/combo?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
    },
    "paginator": {
        "size": 50,
        "next": {"id": 100}
    }
}'
```

### Filters

| Key              | Type   | Description                                                                                                               |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| productParentIds | array  | Mảng ID sản phẩm combo, tối đa 50                                                                                         |
| name             | string | Tên, mã, mã vạch sản phẩm                                                                                                 |
| categoryIds      | array  | [List ID danh mục sản phẩm](/v3/product/category.md) (Khi lọc danh mục cha sẽ tự lấy toàn bộ sản phẩm thuộc danh mục con) |
| status           | array  | [Trạng thái sản phẩm](/v3/modelconstant.md#product-type)                                                                  |
| price            | array  | {"from": "Từ giá trị", "to": "Đến giá trị"}                                                                               |
| brandIds         | array  | [List ID thương hiệu](/v3/product/brand.md) (Khi lọc thương hiện cha sẽ tự lấy toàn bộ sản phẩm thuộc thương hiệu con)    |
| updatedAtFrom    | int    | Cập nhật sản phẩm từ ngày (định dạng timestamp)                                                                           |
| updatedAtTo      | int    | Cập nhật 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                                     |
| --------------- | ----------------- | ---------------------------------------- |
| productParentId | ID sản phẩm combo | asc: tăng dần (mặc định), desc: giảm 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": [
      {
        "id": "(int) Id sản phẩm combo",
        "comboName": "(string) Tên sản phẩm combo",
        "comboCode": "(string) Mã sản phẩm combo",
        "avgCost": "(float) Giá nhập",
        "comboItems": [
          {
            "id": "(int) Id sản phẩm con trong combo",
            "code": "(string) Mã sản phẩm con trong combo",
            "name": "(string) Tên sản phẩm con trong combo",
            "avgCost": "(float) Giá nhập sản phẩm con trong combo",
            "price": "(float) Giá bán sản phẩm con trong combo",
            "qty": "(int) Số lượng sản phẩm con trong combo"
          },
          {
            "id": "(int) Id sản phẩm con trong combo",
            "code": "(string) Mã sản phẩm con trong combo",
            "name": "(string) Tên sản phẩm con trong combo",
            "avgCost": "(float) Giá nhập sản phẩm con trong combo",
            "price": "(float) Giá bán sản phẩm con trong combo",
            "qty": "(int) Số lượng sản phẩm con trong combo"
          }
        ]
      }
	]
}
```


---

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