Skip to content

Get Post Pay Table Status

Description

WiXGo 掃碼後結:取得桌況。客人每次進入、重新整理、切回畫面時呼叫。

有兩種查法,桌號與訂單編號只能擇一:

查法 使用時機 可能的狀態
門市+桌號 只有剛掃桌上的固定 QR 貼紙時 DINING、NOT_OPENED
門市+訂單編號 動態 QR、分享連結、重新整理,以及任何已知道訂單編號的時候 DINING、MERGED、CLOSED、NOT_OPENED

用桌號查的規則: - 只認以固定 QR 開桌、用餐中的單;以動態 QR 開桌的桌子回 NOT_OPENED(沒有開桌代碼可驗證,客人需掃出單上的動態 QR)。 - 只認「開桌時間+用餐時間+2 小時」內的單(POS 開桌未給用餐時間時為 24 小時),避免沒結帳的舊單佔住桌子。 - 剛結帳、被併掉的單也回 NOT_OPENED,新客人不會看到上一組的狀態。

用訂單編號查的規則: - 被併桌時回 MERGED 與目標訂單編號;連續被併時直接給最後一張(最多往下追 5 張)。 - 已結帳、已取消或已作廢回 CLOSED。 - 查無此單,或不是由開桌 API 建立的掃碼後結單,回 NOT_OPENED。

此 API 不會寫入任何資料。

Resource

GET /v1/order/post-pay/table-status

Authorization

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

Query Parameters

Name Type Description
store_id string 門市代號
table_number string 桌號(與 order_id 擇一)
(optional)
order_id string 訂單編號(與 table_number 擇一)
(optional)

Request Example

GET /v1/order/post-pay/table-status?store_id=11056&table_number=D07

GET /v1/order/post-pay/table-status?store_id=11056&order_id=11056-202610140001

Response Body Parameters

Name Type Description
status string
(enum)
桌況
ALLOWED VALUES:
  • DINING:用餐中
  • NOT_OPENED:尚未開桌
  • MERGED:已併到其他訂單
  • CLOSED:已結帳、已取消或已作廢
order_id string 訂單編號;用桌號查且為 DINING 時,這是前端第一次取得訂單編號的地方
(nullable)
merged_to_order_id string MERGED 時要切換過去的目標訂單編號
(nullable)
table_number string 訂單目前的桌號;換桌後會改變,畫面請以此為準
(nullable)
is_dynamic_qr bool 是否以動態 QR 開桌
(nullable)
open_code string 完整 4 碼開桌代碼,只有固定 QR 開桌的單才有
(nullable)
need_verify bool 是否需要客人輸入開桌代碼;只有用桌號查、固定 QR、且這桌已有人加入時為 true
people_count integer 用餐人數,POS 開桌填寫,或由客人透過 Update Post Pay People Count 補填;沒有人數時為 null
(nullable)
joined_count integer 已加入同桌的人數
opened_at string 開桌時間 YYYY-MM-DD HH:MM:SS
(nullable)
dining_end_at string 用餐截止時間;POS 未給用餐時間時為 null
(nullable)
ordering_end_at string 點餐截止時間;POS 未給點餐時間時為 null
(nullable)

NOT_OPENED、CLOSED 只回 status 與 order_id(若有),MERGED 另回 merged_to_order_id,其餘欄位為 null/預設值。

Response

HTTP-Status-Code: 200

{
  "status": "DINING",
  "order_id": "11056-202610140001",
  "merged_to_order_id": null,
  "table_number": "D07",
  "is_dynamic_qr": false,
  "open_code": "0628",
  "need_verify": true,
  "people_count": 4,
  "joined_count": 2,
  "opened_at": "2026-10-14 18:00:00",
  "dining_end_at": "2026-10-14 19:30:00",
  "ordering_end_at": "2026-10-14 19:15:00"
}

HTTP-Status-Code: 200(被併桌)

{
  "status": "MERGED",
  "order_id": "11056-202610140001",
  "merged_to_order_id": "11056-202610140002",
  "table_number": null,
  "is_dynamic_qr": null,
  "open_code": null,
  "need_verify": false,
  "people_count": null,
  "joined_count": 0,
  "opened_at": null,
  "dining_end_at": null,
  "ordering_end_at": null
}

HTTP-Status-Code: 400(參數錯誤)

{
  "message": "桌號與訂單編號必須擇一帶入"
}