cancel_order
Cancel a Shopline order for reasons like customer request, inventory shortage, or payment issues. The order status changes to cancelled and cannot be reversed.
Instructions
[WRITE] 取消訂單。
【用途】 取消指定訂單,適用於客戶要求取消、庫存不足或付款問題等場景。
【呼叫的 Shopline API】
POST /v1/orders/{order_id}/cancel
【回傳結構】 dict 含 success: bool, resource_id: str, message: str。
【副作用】
訂單狀態變更為已取消,操作不可逆
若訂單已出貨,可能無法取消(取決於 Shopline 規則)
已付款訂單取消後需另行退款
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | 訂單 ID | |
| reason | No | 取消原因(選填) |