v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Orders

Cancel Order

To cancel order<br>取消訂單

patch/orders/{orderId}/cancel

Path parameters

orderIdstring required

Order ID

Request body

operated_by'merchant' | 'customer'

where to cancel the order, the default is customer<br>從哪裡取消訂單,預設是 customer

refund_orderboolean

Do you want to refund the order? <br>是否要退款此筆訂單<br>-<br>*Default:true

mail_notifyboolean

Do you want to notify the customer via email when the order is cancelled? <br>此筆訂單取消之後是否要通知顧客?<br>-<br>*Default:true

Example request

{
  "refund_order": true,
  "mail_notify": true
}

Response

Success

Example response

{
  "order_items_stock_tag": [
    {
      "product_id": "5d8c8b3be388095d25acbc89",
      "sku_id": "5d8c8b3be388095d25acbc90",
      "order_item_id": "5d8c8b3be388095d25acbc91",
      "stock_tag": "REDUCE_FAILED"
    }
  ]
}