**版本：202201**

# 取消履约

**POST** `/openapi/2022-01/orders/:order_id/fulfillments/:fulfillment_id/cancel`

取消订单的指定履约；该操作会将履约标记为已取消，停止后续处理与发货操作。

## 请求

**Path参数**

- `order_id` string (required)

  订单 ID。
- `fulfillment_id` string (required)

  待取消的履约 ID。

## 响应

**200**

200

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `fulfillment` object

  - `id` string

    **示例：** `23042b57-f30b-4642-8740-cbdc33115c8a`
  - `order_id` string

    **示例：** `633130-00000001`
  - `status` string

    **示例：** `cancelled`
  - `tracking_company` string

    **示例：** `shoplazza`
  - `tracking_number` string

    **示例：** `111111111`
  - `tracking_company_code` string

    **示例：** `-1`
  - `tracking_url` string

    **示例：**
  - `created_at` string

    **示例：** `2024-04-17T09:05:54Z`
  - `updated_at` string

    **示例：** `2024-04-22T08:49:08Z`
  - `line_items` object[]

    *   Array [

    - `id` string

      **示例：** `3eba6ade-e249-4e4d-b216-624cf2936e9e`
    - `product_id` string

      **示例：** `a1a88be0-a1d4-47e4-a2f2-ba6e131cf447`
    - `variant_id` string

      **示例：** `88e68830-4ef5-4125-bf7d-aef8047176b2`
    - `variant_title` string

      **示例：** `S-blue-T`
    - `product_title` string

      **示例：** `shirt`
    - `product_handle` string

      **示例：** `shirt`
    - `quantity` integer

      **默认值：** `0`

      **示例：** `1`
    - `note` string

      **示例：**
    - `fulfillment_status` string

      **示例：** `waiting`
    - `sku` string

      **示例：** `T-M-S-blue-T-A001004`
    - `weight_unit` string

      **示例：** `kg`
    - `vendor` string

      **示例：** `shoplazza`
    - `product_url` string

      **示例：** `/products/shirt`
    - `compare_at_price` string

      **示例：** `12.10`
    - `image` string

      **示例：** `//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg`
    - `price` string

      **示例：** `10.10`
    - `total` string

      **示例：** `10.10`
    - `weight` string

      **示例：** `1.10`
    - `properties` object[]

      *   Array [

      - `name` string

        **示例：** `size`
      - `value` string

        **示例：** `S`
      *   ]
    - `custom_properties` object

      - `` object
    - `refund_quantity` integer

      **默认值：** `0`

      **示例：** `0`
    - `refund_total` string

      **示例：** `0.00`
    - `taxable` boolean

      **默认值：** `true`

      **示例：** `true`
    - `requires_shipping` boolean

      **默认值：** `true`

      **示例：** `true`
    - `shipping_quantity` integer

      **默认值：** `0`

      **示例：** `1`
    *   ]

```json
{
  "fulfillment": {
    "id": "23042b57-f30b-4642-8740-cbdc33115c8a",
    "order_id": "633130-00000001",
    "status": "cancelled",
    "tracking_company": "shoplazza",
    "tracking_number": "111111111",
    "tracking_company_code": "-1",
    "tracking_url": "",
    "created_at": "2024-04-17T09:05:54Z",
    "updated_at": "2024-04-22T08:49:08Z",
    "line_items": [
      {
        "id": "3eba6ade-e249-4e4d-b216-624cf2936e9e",
        "product_id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
        "variant_id": "88e68830-4ef5-4125-bf7d-aef8047176b2",
        "variant_title": "S-blue-T",
        "product_title": "shirt",
        "product_handle": "shirt",
        "quantity": 1,
        "note": "",
        "fulfillment_status": "waiting",
        "sku": "T-M-S-blue-T-A001004",
        "weight_unit": "kg",
        "vendor": "shoplazza",
        "product_url": "/products/shirt",
        "compare_at_price": "12.10",
        "image": "//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg",
        "price": "10.10",
        "total": "10.10",
        "weight": "1.10",
        "properties": [
          {
            "name": "size",
            "value": "S"
          }
        ],
        "custom_properties": {},
        "refund_quantity": 0,
        "refund_total": "0.00",
        "taxable": true,
        "requires_shipping": true,
        "shipping_quantity": 1
      }
    ]
  }
}
```

```json
{
    "fulfillment": {
        "id": "23042b57-f30b-4642-8740-cbdc33115c8a",
        "order_id": "633130-00000001",
        "status": "cancelled",
        "tracking_company": "shoplazza",
        "tracking_number": "111111111",
        "tracking_company_code": "-1",
        "tracking_url": "",
        "created_at": "2024-04-17T09:05:54Z",
        "updated_at": "2024-04-22T08:49:08Z",
        "line_items": [
            {
                "id": "3eba6ade-e249-4e4d-b216-624cf2936e9e",
                "product_id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
                "variant_id": "88e68830-4ef5-4125-bf7d-aef8047176b2",
                "variant_title": "S-blue-T",
                "product_title": "shirt",
                "product_handle": "shirt",
                "quantity": 1,
                "note": "",
                "fulfillment_status": "waiting",
                "sku": "T-M-S-blue-T-A001004",
                "weight_unit": "kg",
                "vendor": "shoplazza",
                "product_url": "/products/shirt",
                "compare_at_price": "12.10",
                "image": "//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg",
                "price": "10.10",
                "total": "10.10",
                "weight": "1.10",
                "properties": [
                    {
                        "name": "size",
                        "value": "S"
                    },
                    {
                        "name": "color",
                        "value": "blue"
                    },
                    {
                        "name": "type",
                        "value": "T"
                    }
                ],
                "custom_properties": {},
                "refund_quantity": 0,
                "refund_total": "0.00",
                "taxable": true,
                "requires_shipping": true,
                "shipping_quantity": 1
            }
        ]
    }
}
```
