Close Group
Description
收單關團。 此 API 讓已登入的團主關閉一個「團購主訂單」,關閉後無法再加入或修改訂單。 與鎖定 (Lock) 不同,關閉狀態用於明確結束團購活動,防止其他人繼續加入。
Resource
POST /v1/order/group/{group_order_id}/close
Authorization
採用 OAuth 2.0 Bearer Token,需帶入會員 Token (acckey) 以識別團主身分。
詳細使用流程請參考 Auth Login。
Path Parameters
| Name | Type | Description |
|---|---|---|
| group_order_id | string | 團主訂單編號 |
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| store | Store | 門市 |
| customer | Customer | 訂購人資訊 (Ocard 會員驗證身分必填) |
Request Body Parameters - Store
| Name | Type | Description |
|---|---|---|
| id | string | 門市代碼 |
Request Body Parameters - Customer
| Name | Type | Description |
|---|---|---|
| id | string | 會員編號 (optional) |
| name | string | 姓名 |
| mobile | string | 手機號碼 (optional) |
| address | string | 地址,銷售方式為外送時必填 (order.type is DELIVERY) (optional) |
| vip_group_id | string | vip群組代碼 (optional) |
Request Example
{
"store": {
"id": "A01"
},
"customer": {
"name": "小明",
"mobile": "0912345678"
}
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| id | string | 訂單編號 |
Response
{
"id": "A012601090001"
}
Notes
- 必須是該團購單的擁有者 (團主) 才能執行關閉操作,否則會回傳 403 Forbidden。
- 若為 Ocard 會員,需於 Request Body
customer提供手機號碼以驗證身分。 - 關閉後狀態將變更為
CLOSE('2')。