Skip to content

Commit eddcada

Browse files
github-actions[bot]github-actionshabara-k
authored
Add Coupon API Support to Messaging API (#604)
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 f1e723e commit eddcada

File tree

48 files changed

+4189
-1
lines changed

Some content is hidden

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

48 files changed

+4189
-1
lines changed

line-openapi

linebot/messaging_api/.openapi-generator/FILES

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
api_messaging_api.go
22
api_messaging_api_blob.go
3+
model_acquisition_condition_request.go
4+
model_acquisition_condition_response.go
35
model_action.go
46
model_age_demographic.go
57
model_age_demographic_filter.go
@@ -18,13 +20,44 @@ model_camera_action.go
1820
model_camera_roll_action.go
1921
model_carousel_column.go
2022
model_carousel_template.go
23+
model_cash_back_fixed_price_info_request.go
24+
model_cash_back_fixed_price_info_response.go
25+
model_cash_back_percentage_price_info_request.go
26+
model_cash_back_percentage_price_info_response.go
27+
model_cash_back_price_info_request.go
28+
model_cash_back_price_info_response.go
2129
model_chat_reference.go
2230
model_clipboard_action.go
2331
model_clipboard_imagemap_action.go
2432
model_confirm_template.go
33+
model_coupon_cash_back_reward_request.go
34+
model_coupon_cash_back_reward_response.go
35+
model_coupon_create_request.go
36+
model_coupon_create_response.go
37+
model_coupon_discount_reward_request.go
38+
model_coupon_discount_reward_response.go
39+
model_coupon_free_reward_request.go
40+
model_coupon_free_reward_response.go
41+
model_coupon_gift_reward_request.go
42+
model_coupon_gift_reward_response.go
43+
model_coupon_list_response.go
44+
model_coupon_message.go
45+
model_coupon_others_reward_request.go
46+
model_coupon_others_reward_response.go
47+
model_coupon_response.go
48+
model_coupon_reward_request.go
49+
model_coupon_reward_response.go
2550
model_create_rich_menu_alias_request.go
2651
model_datetime_picker_action.go
2752
model_demographic_filter.go
53+
model_discount_explicit_price_info_request.go
54+
model_discount_explicit_price_info_response.go
55+
model_discount_fixed_price_info_request.go
56+
model_discount_fixed_price_info_response.go
57+
model_discount_percentage_price_info_request.go
58+
model_discount_percentage_price_info_response.go
59+
model_discount_price_info_request.go
60+
model_discount_price_info_response.go
2861
model_emoji.go
2962
model_emoji_substitution_object.go
3063
model_error_detail.go
@@ -83,6 +116,8 @@ model_issue_link_token_response.go
83116
model_limit.go
84117
model_location_action.go
85118
model_location_message.go
119+
model_lottery_acquisition_condition_request.go
120+
model_lottery_acquisition_condition_response.go
86121
model_mark_messages_as_read_request.go
87122
model_members_ids_response.go
88123
model_membership.go
@@ -93,9 +128,12 @@ model_message.go
93128
model_message_action.go
94129
model_message_imagemap_action.go
95130
model_message_quota_response.go
131+
model_messaging_api_pager_coupon_list_response.go
96132
model_multicast_request.go
97133
model_narrowcast_progress_response.go
98134
model_narrowcast_request.go
135+
model_normal_acquisition_condition_request.go
136+
model_normal_acquisition_condition_response.go
99137
model_number_of_messages_response.go
100138
model_operator_demographic_filter.go
101139
model_operator_recipient.go
@@ -109,6 +147,7 @@ model_quota_consumption_response.go
109147
model_quota_type.go
110148
model_recipient.go
111149
model_redelivery_recipient.go
150+
model_referral_acquisition_condition_response.go
112151
model_reply_message_request.go
113152
model_reply_message_response.go
114153
model_rich_menu_alias_list_response.go

0 commit comments

Comments
 (0)