Skip to content

Commit 180bea9

Browse files
github-actions[bot]github-actionshabara-k
authored
Add Coupon API Support to Messaging API (#719)
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 <github-actions@github.com> Co-authored-by: habara keigo <habara.keigo@lycorp.co.jp>
1 parent ebf52cb commit 180bea9

File tree

126 files changed

+127858
-9033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+127858
-9033
lines changed

docs/classes/LINE-Clients-MessagingApi-Api-MessagingApiApi.html

Lines changed: 4536 additions & 2858 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-AcquisitionConditionRequest.html

Lines changed: 1892 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-AcquisitionConditionResponse.html

Lines changed: 1892 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-CashBackFixedPriceInfoRequest.html

Lines changed: 1968 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-CashBackFixedPriceInfoResponse.html

Lines changed: 2208 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-CashBackPercentagePriceInfoRequest.html

Lines changed: 1968 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-CashBackPercentagePriceInfoResponse.html

Lines changed: 1968 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-CashBackPriceInfoRequest.html

Lines changed: 1892 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-CashBackPriceInfoResponse.html

Lines changed: 1892 additions & 0 deletions
Large diffs are not rendered by default.

docs/classes/LINE-Clients-MessagingApi-Model-CouponCashBackRewardRequest.html

Lines changed: 1968 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)