Skip to content

Join Group API

Description

加入團購 API 允許一般會員或訪客加入已存在的團購訂單。

Resource

POST /v1/order/group/{group_order_id}/join

Authorization

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

Path Parameters

Name Type Description
group_order_id string 團主訂單編號 (Host Order ID)

Request Body Parameters

Name Type Description
store Store 門市資訊
customer Customer 訂購人資訊 (若帶 Token 則優先使用會員資料)
placed_at string 下單時間 (格式: YYYY-MM-DD HH:mm:ss)
client_device string 裝置來源
special_instructions string 訂單備註
external_id string 外部訂單編號

Store

Name Type Description
id string 門市代號
name string 門市名稱

Customer

Name Type Description
id string 會員編號 (訪客可忽略或填空)
(optional)
name string 訂購人姓名
mobile string 訂購人手機
address string 地址,銷售方式為外送時必填 (order.type is DELIVERY)
(optional)
vip_group_id string vip群組代碼
(optional)

Request Example

{
    "store": {
        "id": "A01",
        "name": "台北總店"
    },
    "customer": {
        "name": "訪客小明",
        "mobile": "0912345678"
    },
    "placed_at": "2026-01-16 16:30:00",
    "client_device": "WIXGO",
    "special_instructions": "去冰微糖"
}

Response Body Parameters

Name Type Description
id string 此筆參與訂單的編號 (New Order ID)

Response Example

{
    "id": "A012601160005"
}

Notes

  1. 使用者身分

    • 若 Header 帶有有效 Token (非 KIOSK Token),系統會優先使用 Token 解析出的 member_info (name, mobile, email) 來建立訂單。
    • 若為 Ocard 會員,請務必於 Request Body customer 欄位提供手機號碼以識別身分
    • 若為訪客(預設會員),則使用 Request Body 中的 customer 資訊。
  2. 關聯建立

    • 此 API 會在 weborder_group_detail 表中建立一筆資料,將 group_order_id (Host) 與新產生的 id (Member) 進行關聯。