You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
line/line-openapi#111
# Add Coupon API Support to Messaging API
We've supported a set of new APIs that make it possible to create,
manage, and deliver coupons via the Messaging API. These features
provide functionality similar to what's available through the LINE
Official Account Manager interface ([see
here](https://www.lycbiz.com/jp/manual/OfficialAccountManager/coupons-create/)),
allowing developers to integrate coupon-related workflows into their
bots more flexibly.
For more details, see the official announcement:
[LINE Developers News — Coupon API Released
(2025/08/06)](https://developers.line.biz/en/news/2025/08/06/coupon-api/)
## New API Endpoints
- `POST /v2/bot/coupon`
Create a new coupon.
The request includes metadata such as the coupon title, description,
image URLs, validity period, reward details(e.g. 1000yen discount),
acquisition requirements, time zone, etc.
- `GET /v2/bot/coupon`
Retrieve a list of coupons associated with the bot.
- `GET /v2/bot/coupon/{couponId}`
Fetch detailed information about a specific coupon.
- `PUT /v2/bot/coupon/{couponId}`
Mark a coupon as expired.
## Messaging API Update
Message Object now supports a new type: `type=coupon`
This allows developers to send coupons directly to users via the
Messaging API, similar to sending text, image, or template messages.
## Example Requests
### Create a Coupon
```
POST /v2/bot/coupon
Content-Type: application/json
```
#### Request body
```json
{
"title": "1000 yen off coupon",
"acquisitionCondition": {
"type": "normal"
},
"visibility": "PUBLIC",
"startTimestamp": 1672537600,
"endTimestamp": 1672624000,
"maxUseCountPerTicket": 1,
"reward": {
"type": "discount",
"priceInfo": {
"priceInfoType": "fixed",
"fixedAmount": 1000
}
},
"imageUrl": "https://example.com/coupon_image.png",
"barcodeImageUrl": "https://example.com/coupon_barcode.png",
"timezone": "ASIA_TOKYO"
}
```
#### Response
```json
{
"couponId": "abc1234"
}
```
### Send a Coupon Message
```json
{
"to": "<userId>",
"messages": [
{
"type": "coupon",
"couponId": "abc1234"
}
]
}
```
Co-authored-by: github-actions <[email protected]>
0 commit comments