Skip to content

Get Usable Product Tickets

Description

取得可使用的商品券。

Resource

GET /v1/ticket/usable_product

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Query Parameters

Name Type Description
sale_kind List[string]
(enum)
銷售類型
ALLOWED VALUES:
  • GENERAL
  • PICKUP
  • POINT
GENERAL=一般
PICKUP=跨店隨取
POINT=點數兌換商品
(optional)
Example : [GENERAL,PICKUP]

Request

GET /v1/ticket/usable_product?sale_kind=[GENERAL,PICKUP]

Response Body Parameters

Name Type Description
tickets Ticket 票劵

Response Body Parameters - Ticket

Name Type Description
product_name string 商品名稱
image_url string 圖檔URL
purchase_date string 購買日期 ISO 8601 format
EXAMPLE "2020-01-01 15:16:54"
purchase_quantity int 購買張數
remaining_quantity int 剩餘數量
number List[string] 票券列表

Response

{
  "tickets": [
    {
      "product_name": "咖啡禮盒",
      "image_url": "http://40.83.96.208:8080/kiosk/app/public/product00/5839-1-1550816490_s.png",
      "purchase_date": "2020-01-01 15:16:54",
      "purchase_quantity": 2,
      "remaining_quantity": 2,
      "number": [
        "tick00001",
        "tick00002" 
      ]
    },
    {
      "product_name": "美式咖啡3張",
      "image_url": "http://40.83.96.208:8080/kiosk/app/public/product00/5839-1-1550816490_s.png",
      "purchase_date": "2020-04-20 15:16:54",
      "purchase_quantity": 3,
      "remaining_quantity": 2,
      "number": [
        "tick00003",
        "tick00004",
        "tick00005" 
      ]
    }
  ]
}