POST:orders/cancel.json
Commerce APIPOST:orders/cancel.json

POST:orders/cancel.json

Description

Cancel an order.

Permission bit: "orders.cancel"

Topic: Orders

Query Parameters

order_id: String, required

Unique order identifier. See also: Unique Identifiers

Example: ?order_id=or_EQzGqWoY


shop_id: String, required

Unique shop identifier. See also: Unique Identifiers

Example: ?shop_id=sh_EQzGqWoY

Request Body

OrderCancel

{
  "archive": false,
  "notify": false,
  "reason": "customer",
  "refund": {
    "customer_balance": 52600,
    "full_refund": false,
    "full_restock": false,
    "line_items": [
      {
        "dest_inventory_location_id": "il_EQzGqWoY",
        "fulfillment_id": "fu_EQzGqWoY",
        "inventory_location_id": "il_EQzGqWoY",
        "line_item_id": "li_EQzGqWoY",
        "refund_amount": 768,
        "refund_fee": 234,
        "restock_quantity": 4,
        "variant_id": "va_EQzGqWoY"
      }
    ],
    "notify": false,
    "reason": "adjustment",
    "shipping": {
      "refund_amount": 657,
      "refund_fee": 234
    },
    "undo_coupon_usage": false
  }
}

Response Body

Order

Response Body Type

Loading module