Skip to content

Add Coupon API Support to Messaging API #1684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2025
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 6, 2025

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), 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)

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

{
  "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

{
  "couponId": "abc1234"
}

Send a Coupon Message

{
  "to": "<userId>",
  "messages": [
    {
      "type": "coupon",
      "couponId": "abc1234"
    }
  ]
}

@habara-k habara-k added this pull request to the merge queue Aug 6, 2025
Merged via the queue into master with commit a17d57d Aug 6, 2025
6 checks passed
@habara-k habara-k deleted the update-diff-20250806075930 branch August 6, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants