Get Tickets
Description
取得票劵。
Resource
GET /v1/tickets
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| type | string(enum) | 票劵類型 ALLOWED VALUES:
|
| order_id | string | 訂單編號 (optional) |
Request Example
GET /v1/tickets?type=app&order_id=23100221020400022
Response
{
"tickets": [
{
"name": "禮券",
"begin_date": "2019/06/21",
"end_date": "2099/12/31",
"id": "TE0020",
"ticket_type": "一般票券",
"ticket_kind": "禮券",
"product_ticket_type": null,
"prod_id": "ZZ001",
"product_name": "100元禮券",
"price": 100,
"points": 0,
"img": null,
"can_transfer": true,
"description": "",
"is_hidden_ticket_no": true,
"can_use": true,
"external_id": null,
"store": null,
"redeem_products": [],
"discount": null
},
{
"name": "商品折扣券",
"begin_date": "2019/06/21",
"end_date": "2099/12/31",
"id": "TE0021",
"ticket_type": "一般票券",
"ticket_kind": "商品券",
"product_ticket_type": "PRODUCT_SPECIFIC_DISCOUNT_COUPON",
"prod_id": "ZZ002",
"product_name": "飲料8折券",
"price": 80,
"points": 0,
"img": null,
"can_transfer": true,
"description": "",
"is_hidden_ticket_no": true,
"can_use": true,
"external_id": null,
"store": null,
"redeem_products": [
{
"id": "B070030025",
"name": "綠茶"
}
],
"discount": 80
}
]
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| tickets | Ticket | 票劵列表 |
Response Body Parameters - Ticket
| Name | Type | Description |
|---|---|---|
| id | string | 票劵編號 |
| name | string | 票劵名稱 |
| ticket_type | string | 票卷類型 ALLOWED VALUES:
|
| ticket_kind | string | 票劵種類 ALLOWED VALUES:
|
| product_ticket_type | string | 商品票券型態 ALLOWED VALUES:
(optional) |
| product_name | string | 商品名稱 |
| price | integer | 票卷商品面額 |
| points | integer | 票卷點數 |
| img | string | 票卷圖檔 |
| can_transfer | boolean | 是否可轉送 |
| prod_id | string | 票券商品編號 |
| description | string | 描述 |
| begin_date | string | 票劵上架日 |
| end_date | string | 票劵下架日 |
| is_hidden_ticket_no | boolean | 是否隱藏票卷號碼 |
| can_use | boolean | 是否可使用 |
| external_id | string | 外部票券編號 |
| store | string | 門市編號 |
| redeem_products | Redeem Product[] | 可兌換商品列表 |
| discount | integer | 折扣率/折價金額 假設此值為70 若為折價券、商品折價券,代表折價70元 若為折扣券、商品折扣券,代表打7折 (optional) |
Response Body Parameters - Redeem Product
| Name | Type | Description |
|---|---|---|
| id | string | 商品編號 |
| name | string | 商品名稱 |