# Danh sách sản phẩm được áp dụng mã coupon

* Tính năng này được sử dụng để lấy danh sản phẩm coupon, dùng trong tình huống bạn tạo các coupon chỉ muốn áp dụng cho 1 số sản phẩm cụ thể. Nếu kết quả trả về productIds là null hoặc 1 mảng rỗng nghĩa là mã coupon được áp dụng cho tất cả sản phẩm (không bị giới hạn chỉ được áp dụng cho 1 vài sản phẩm nào đó).

## Request

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

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

### Filters

| Key     | Type                       | Description            |
| ------- | -------------------------- | ---------------------- |
| batchId | int $$^{{\color{red}\*}}$$ | ID chương trình coupon |

## 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": [
    {
      "batchId": "(int) ID chương trình giảm giá",
      "product": {
        "id": "(int) ID sản phẩm",
        "name": "(string) Tên 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/promotion/couponproduct.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.
