Get Orders
Description
取得訂單列表。
Resource
GET /v1/orders
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| status | string (enum) |
訂單狀態
(optional) |
| start_date | string | 開始日期 (例:2020-08-14 12:00:00) (optional) |
| end_date | string | 結束日期 (例:2020-08-14 23:59:59) (optional) |
| store_id | string | 門市代碼 (optional) |
| client_device | List[string] (enum) |
客戶端裝置 ALLOWED VALUES:
(optional) Example : ["APP","KIOSK"] |
| order_type | string (enum) |
訂單類型,預設為ONLINE ALLOWED VALUES:
(optional) |
| line_id | string | LINE UID (optional) |
| modified_user_id | string | 異動人員編號 (optional) |
| admission_status | string (enum) |
入園狀態 ALLOWED VALUES:
(optional) |
| order_line_id | string | 非會員的訂單 LINE ID (optional) |
| master_only | boolean | 只取得訂單主檔資料 (optional) |
Request
GET /v1/orders?status=ALL&start_date=2020-08-14 12:00:00&end_date=2020-08-14 23:59:59&store_id=A01&client_device=["APP","KIOSK"]&order_type=ONLINE
Response
{
"orders": [
{
"id": "A012005010001",
"current_state": "Ready For Pickup",
"order_type": "ONLINE",
"paid": true,
"create_at": "2020-05-01 22:25:49",
"pickup_at": "2020-05-02 08:30:00",
"store": {
"id": "A01",
"name": "台南店"
},
"customer": {
"name": "王大明",
"mobile": "0910123456",
"address": "台南市安平區健康三街999號"
},
"sale_method": {
"type": "PICK_UP",
"name": "外帶"
},
"payments": [
{
"type": "CASH",
"name": "臨櫃結帳",
"charges": {
"total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"sub_total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"discount": {
"amount": 100,
"currency_code": "TWD",
"formatted_amount": "100"
},
"total_fee": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
},
"total_extra": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
}
}
],
"receipt": {
"type": "ELECTRONIC",
"tax_ID_number": "",
"npoban": "",
"carrier_type": "",
"carrier": "",
"receipt_number": ""
},
"has_course": false,
"special_instructions": "訂單備註內容"
},
{
"id": "A012110020001",
"current_state": "COMPLETED",
"order_type": "ONLINE",
"paid": true,
"create_at": "2021-10-02T19:25:49Z",
"store": {
"id": "A01",
"name": "台南店"
},
"customer": {
"name": "王大明",
"mobile": "0910123456",
"address": "台南市安平區健康三街999號"
},
"payments": [
{
"type": "LINE_PAY",
"name": "LINE Pay",
"charges": {
"total": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
},
"sub_total": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
},
"discount": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_fee": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
},
"total_extra": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
}
}
],
"admission_ticket": {
"type": "ELECTRONIC",
"verification_code": "134679",
"expected_admission_date": "2021-10-10 15:00:00",
"actual_admission_date": "2021-10-15 15:00:00",
"extended_expiration_date": "2021-11-10 15:00:00"
},
"receipt": {
"type": "ELECTRONIC",
"tax_ID_number": "24436074",
"npoban": "",
"carrier_type": "3J0002",
"carrier": "/ABC+123",
"receipt_number": "VB17566068"
},
"has_course": true,
"special_instructions": "訂單備註內容"
}
]
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| id | string | 訂單編號 |
| current_state | string | 訂單狀態 ALLOWED VALUES:
|
| order_type | string | 訂單類型 ALLOWED VALUES:
|
| paid | bool | 是否已付款 |
| create_at | string | 訂單建立時間 ISO 8601 format EXAMPLE "2020-01-01 15:16:54" |
| pickup_at | string | 取貨時間 ISO 8601 format EXAMPLE "2020-01-01 15:16:54" |
| store | Store | 門市資訊 |
| customer | Customer | 消費者資訊 |
| sale_method | Sale Method | 銷售方式 |
| payments | Payment[] | 付款資訊 |
| receipt | Receipt | 發票資訊,發票組合詳細範例 (optional) |
| takeno | string | 訂單取餐號 |
| client_device | string (enum) |
客戶端裝置 ALLOWED VALUES:
|
| admission_ticket | Admission Ticket | 門票資訊 (optional) |
| has_course | bool | 是否有課程 |
| special_instructions | string | 特殊要求 (optional) |
| tot_sales | integer | 訂單總金額 |
Response Body Parameters - Store
| Name | Type | Description |
|---|---|---|
| id | string | 門市代碼 |
| name | string | 門市名稱 |
Response Body Parameters - Customer
| Name | Type | Description |
|---|---|---|
| name | string | 姓名 (optional) |
| mobile | string | 手機號碼 (optional) |
| address | string | 地址 (optional) |
Response Body Parameters - Sale Method
| Name | Type | Description |
|---|---|---|
| type | string | 銷售方式種類 (optional) |
| name | string | 銷售方式名稱 (optional) |
Response Body Parameters - Payment
| Name | Type | Description |
|---|---|---|
| type | string (enum) |
付款方式 ALLOWED VALUES:
|
| name | string (enum) |
付款名稱 ALLOWED VALUES:
|
| charges | Charges | 費用 |
| detail | Detail | 付款明細 (optional) |
Response Body Parameters - Receipt
| Name | Type | Description |
|---|---|---|
| type | string (enum) |
發票類型 ALLOWED VALUES:
|
| tax_ID_number | string | 買方統一編號 (optional) |
| npoban | string | 捐贈碼 (optional) |
| carrier_type | string | 買方載具類別 (optional) |
| carrier | string | 買方載具 (optional) |
| receipt_number | string | 發票號碼 (optional) |
Response Body Parameters - Charges
| Name | Type | Description |
|---|---|---|
| total | Money | 整張訂單總金額 |
| sub_total | Money | 所有品項總金額 |
| discount | Money | 折扣金額 |
| total_fee | Money | 實際付款金額 |
| total_extra | Money | 總溢收金額 |
Response Body Parameters - Detail
| Name | Type | Description |
|---|---|---|
| auth_code | string | 信用卡授權碼 |
| reference_no | string | 信用卡參考編號 |
| resource_number | string | 信用卡資源編號 |
| terminal_data | string | 信用卡終端機資料 |
Response Body Parameters - Money
| Name | Type | Description |
|---|---|---|
| amount | integer | 最小單位金額 |
| currency_code | string | 貨幣代碼 ISO 4217 code |
| formatted_amount | string | 顯示用金額 |
Response Body Parameters - Admission Ticket
| Name | Type | Description |
|---|---|---|
| type | string (enum) |
門票類型 ALLOWED VALUES:
|
| verification_code | string | 驗證碼 |
| expected_admission_date | string | 預計入園日期 EXAMPLE "2020-01-01 12:00:00" |
| actual_admission_date | string | 實際入園日期 EXAMPLE "2020-01-01 12:00:00" |
| extended_expiration_date | string | 系統展延有效日期 EXAMPLE "2020-01-01 12:00:00" |