cancel_order
Cancel a specific order to handle customer cancellations, stock shortages, or payment failures. Returns success status and resource ID for confirmation.
Instructions
[WRITE] 取消訂單。
【用途】 取消指定訂單,適用於客戶要求取消、庫存不足或付款問題等場景。
【呼叫的 Shopline API】
POST /v1/orders/{order_id}/cancel
【回傳結構】 dict 含 success: bool, resource_id: str, message: str。
【副作用】
訂單狀態變更為已取消,操作不可逆
若訂單已出貨,可能無法取消(取決於 Shopline 規則)
已付款訂單取消後需另行退款
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_id": "<order_id>"
},
"name": "cancel_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | 取消原因(選填) | |
| order_id | Yes | 訂單 ID |