Skip to content

Get Tickets

Description

取得票劵。

Resource

GET /v2/ticket

Authorization

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

Query Parameters

Name Type Description
type string(enum) 票劵類型
ALLOWED VALUES:
  • ALL
  • APP
  • USABLE
  • UNAVAILABLE
order_id string 訂單編號
(optional)
store_id string 門市代碼
(optional)

Request Example

GET /v2/ticket?type=APP&order_id=23100221020400022

Response

{
    "discount_coupons": [
        {
            "name": "測試折扣券",
            "begin_date": "2022/01/21",
            "end_date": "2025/01/31",
            "ticket_type": "GENERAL_TICKET",
            "points": 0,
            "can_transfer": false,
            "img": "",
            "product_name": "梁社漢QA測試折扣券",
            "price": 75,
            "ticket_kind": "DISCOUNT_COUPON",
            "prod_id": "005",
            "description": "",
            "id": "EE0005",
            "use_time": "2025/02/13 12:42:47",
            "is_hidden_ticket_no": false,
            "external_id": null,
            "store": null,
            "product_ticket_type": null,
            "can_use": true,
            "remaining_days": 1075
        }
    ],
    "cash_coupons": [
        {
            "name": "測試折價券",
            "begin_date": "2022/01/21",
            "end_date": "2025/01/31",
            "ticket_type": "GENERAL_TICKET",
            "points": 0,
            "can_transfer": false,
            "img": "",
            "product_name": "梁社漢QA測試折價券",
            "price": 10,
            "ticket_kind": "CASH_COUPON",
            "prod_id": "006",
            "description": "",
            "id": "FF0003",
            "use_time": "2025/02/13 12:42:47",
            "is_hidden_ticket_no": false,
            "external_id": null,
            "store": null,
            "product_ticket_type": null,
            "can_use": true,
            "remaining_days": 1075
        }
    ],
    "product_specific_coupons": [
        {
            "name": "TEST",
            "begin_date": "2021/12/29",
            "end_date": "2031/12/31",
            "ticket_type": "GENERAL_TICKET",
            "points": 0,
            "can_transfer": false,
            "img": "https://kiosk.lafresh.com.tw/kiosk/apptest/public/activity/271-1-1644219064.jpg",
            "product_name": "梁社漢QA測試商品提貨券",
            "price": 0,
            "ticket_kind": "PRODUCT_SPECIFIC_COUPONS",
            "prod_id": "002",
            "description": "<ul>\r\n<li>123</li>\r\n<li>456</li>\r\n</ul>",
            "id": "BB0116",
            "use_time": "2025/02/13 12:42:47",
            "is_hidden_ticket_no": false,
            "external_id": null,
            "store": null,
            "product_ticket_type": "PRODUCT_VOUCHER",
            "can_use": true,
            "remaining_days": 3600
        }
    ],
    "gift_vouchers": [
        {
            "name": "測試禮券",
            "begin_date": "2022/01/26",
            "end_date": "2025/01/31",
            "ticket_type": "GENERAL_TICKET",
            "points": 0,
            "can_transfer": false,
            "img": "",
            "product_name": "梁社漢QA測試禮券",
            "price": 50,
            "ticket_kind": "GIFT_VOUCHER",
            "prod_id": "001",
            "description": "",
            "id": "AA0606",
            "use_time": "2025/02/13 12:42:47",
            "is_hidden_ticket_no": false,
            "external_id": null,
            "store": null,
            "product_ticket_type": null,
            "can_use": true,
            "remaining_days": 1075
        }
    ],
    "other_tickets": []
}

Response Body Parameters

Name Type Description
discount_coupons Ticket 折扣劵列表
cash_coupons Ticket 折價劵列表
product_specific_coupons Ticket 商品劵列表
gift_vouchers Ticket 禮劵列表
other_tickets Ticket 其他票券列表

Response Body Parameters - Ticket

Name Type Description
id string 票劵編號
name string 票劵名稱
ticket_type string 票卷類型
ALLOWED VALUES:
  • GENERAL_TICKET
  • POINT_TICKET
ticket_kind string 票劵種類
ALLOWED VALUES:
  • GIFT_VOUCHER
  • SALE_EVENT_COUPON
  • ENTRANCE_TICKET
  • DISCOUNT_COUPON
  • CASH_COUPON
  • PRODUCT_SPECIFIC_COUPONS
product_ticket_type string 商品票券型態
ALLOWED VALUES:
  • PRODUCT_VOUCHER
  • PRODUCT_SPECIFIC_DISCOUNT_COUPON
  • PRODUCT_SPECIFIC_CASH_COUPON
(option)
product_name string 商品名稱
price integer 票卷商品面額
points integer 票卷點數
img string 票卷圖檔
can_transfer boolean 是否可轉送
prod_id string 票券商品編號
description string 描述
begin_date string 票劵上架日
end_date string 票劵下架日
use_time string 票劵使用日期
is_hidden_ticket_no boolean 是否隱藏票卷號碼
can_use boolean 是否可使用
external_id string 外部票券編號
store boolean 門市編號
remaining_days integer 剩餘天數

Response kind_type

kind_type description
GIFT_VOUCHER 禮券
SALE_EVENT_COUPON 抵用券
ENTRANCE_TICKET 入場券
DISCOUNT_COUPON 折扣券
CASH_COUPON 折價券
PRODUCT_SPECIFIC_COUPONS 商品券

Response product_ticket_type

product_ticket_type description
PRODUCT_VOUCHER 商品提貨券
PRODUCT_SPECIFIC_DISCOUNT_COUPON 商品折扣券
PRODUCT_SPECIFIC_CASH_COUPON 商品折價券