Skip to content

Send Notification By Type

Description

依據類型發送通知。

Resource

POST /v1/push/notification_by_type

Request Body Parameters

Name Type Description
notifications Notification 通知列表

Request Body Parameters - Notification

Name Type Description
title string 標題
(optional)
message string 訊息
(optional)
type string
(enum)
連結型態
ALLOWED VALUES:
  • ALL
  • APP
  • LINE
notification_type string
(enum)
通知類型
ALLOWED VALUES:
  • SEND_PICKUP_TICKET_SUCCESS
  • REISSUE_PICKUP_TICKET_SUCCESS
  • SEND_PICKUP_TICKET_FAIL
  • POINTS_ABOUT_TO_EXPIRE
  • POINTS_EXPIRED

(optional)
data Data 會員相關資料

Request Body Parameters - Data Instruction

Name Type Description
vip_id string 會員編號
expiration_date string 點數到期日
(optional)
以下通知類型為必填
  • POINTS_ABOUT_TO_EXPIRE
  • points string 即將/已經 到期點數
    (optional)
    以下通知類型為必填
  • POINTS_ABOUT_TO_EXPIRE
  • POINTS_EXPIRED
  • 一般情境 Request Example

    {
      "notifications": [
        {
          "type": "ALL",
          "notification_type": "SEND_PICKUP_TICKET_SUCCESS",
          "data": [
            {
              "vip_id": "APP001"          
            },
            {
              "vip_id": "APP002"
            }
          ]
        }
      ]
    }
    

    點數即將到期 Request Example

    {
      "notifications": [
        {
          "type": "ALL",
          "notification_type": "POINTS_ABOUT_TO_EXPIRE",
          "data": [
            {
              "vip_id": "APP001",
              "expiration_date": "2022-09-09",
              "points": "105"
            },
            {
              "vip_id": "APP002",
              "expiration_date": "2022-09-09",
              "points": "95"
            }
          ]
        }
      ]
    }
    

    點數已到期 Request Example

    {
      "notifications": [
        {
          "type": "ALL",
          "notification_type": "POINTS_EXPIRED",
          "data": [
            {
              "vip_id": "APP001",
              "points": "105"
            },
            {
              "vip_id": "APP002",
              "points": "95"
            }
          ]
        }
      ]
    }
    

    Response

    Status-Code: 204 No Content