# Thêm mã coupon vào chương trình

Tính năng này được sử dụng để cập nhật thêm mã vào chương trình coupon đã có trên hệ thống.

## Request

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

```curl
curl --location 'https://pos.open.nhanh.vn/v3.0/promotion/batchincreasecode?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json'
--data '{
    "batchId": 27642,
    "couponNumber": 500,
    "canUsedTimes": 10
}'
```

### Thông tin cập nhật chương trình coupon

| Key          | Type                       | Description                                   |
| ------------ | -------------------------- | --------------------------------------------- |
| batchId      | int $$^{{\color{red}\*}}$$ | ID chương trình coupon                        |
| couponNumber | int $$^{{\color{red}\*}}$$ | Số lượng mã coupon muốn thêm (Tối đa 1000 mã) |
| canUsedTimes | int $$^{{\color{red}\*}}$$ | Số lần sử dụng từng mã coupon                 |
| codeLength   | int                        | Độ dài mã coupon                              |
| prefix       | string                     | Tiền tố                                       |
| suffix       | string                     | Hậu tố                                        |

## 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,
  "data": {
    "batchId": "(int) ID chương trình giảm giá"
  }
}
```


---

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