> 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/batchincreasecode.md).

# 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á"
  }
}
```
