Skip to content

Conversation

@habara-k
Copy link
Contributor

@habara-k habara-k commented Aug 6, 2025

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"
    }
  ]
}

---------

Co-authored-by: habara keigo <habara.keigo@linecorp.com>
Co-authored-by: habara keigo <habara.keigo@lycorp.co.jp>
@CLAassistant
Copy link

CLAassistant commented Aug 6, 2025

CLA assistant check
All committers have signed the CLA.

@habara-k habara-k requested a review from a team August 6, 2025 05:48
@Yang-33 Yang-33 changed the title Add coupon schema Add Coupon API Support to Messaging API Aug 6, 2025
@github-actions
Copy link

github-actions bot commented Aug 6, 2025

GO

You can check generated code in go

Check the diff here

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

JAVA

You can check generated code in java

Check the diff here

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

NODEJS

You can check generated code in nodejs

Check the diff here

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

PHP

You can check generated code in php

Check the diff here

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

PYTHON

You can check generated code in python

Check the diff here

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

RUBY

You can check generated code in ruby

Check the diff here

@habara-k habara-k added this pull request to the merge queue Aug 6, 2025
Merged via the queue into main with commit b4589bc Aug 6, 2025
23 checks passed
@habara-k habara-k deleted the coupon-api branch August 6, 2025 07:07
github-merge-queue bot pushed a commit to line/line-bot-sdk-python that referenced this pull request 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](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>
github-merge-queue bot pushed a commit to line/line-bot-sdk-java that referenced this pull request 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](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>
github-merge-queue bot pushed a commit to line/line-bot-sdk-nodejs that referenced this pull request 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](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>
github-merge-queue bot pushed a commit to line/line-bot-sdk-go that referenced this pull request 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](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>
github-merge-queue bot pushed a commit to line/line-bot-sdk-php that referenced this pull request 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](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>
github-merge-queue bot pushed a commit to line/line-bot-sdk-ruby that referenced this pull request 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](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>
@habara-k habara-k self-assigned this Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants