Cancel Order
Breaking Changes
Function
Merchants can cancel order via cancel order API.
店家可以透過 cancel order API 取消訂單。
After return_order_revamp feature key on/啟用「return_order_revamp」功能後
- 送貨狀態為已發貨/已到達/已取貨,不可取消訂單。
- 此訂單下任一筆新退貨單狀態為非取消,不可取消訂單。
URL
PATCH <<api_domain>>/v1/orders/:order_id/cancel
Request Parameters
Request Example
curl -X PATCH \
<<api_domain>>/v1/orders/5b2b66599a76f0196a000a54/cancel \
-H 'Accept: application/json' \
-H 'Authorization: access_token' \
-H 'Content-Type: application/json' \
-d '{
"cancelled_reason": { "key": "expensive_price", "message": "expensive" }
}'・Response Field
Field | Type | Description | Example |
|---|---|---|---|
order_items_stock_tag |
| Order items stock tag to indicate increasing or reducing stock failed. If there is no stock error, the field value will be null. |
Response Example
{
"order_items_stock_tag": []
}{
"order_items_stock_tag": [
{
"product_id": "6768d20b0f9fe1005ef8958d",
"sku_id": "6846688044889d001b55db53",
"order_item_id": "68467eee8191ad00612272cf",
"stock_tag": "INCREASE_FAILED"
}
]
}Updated 13 days ago