**Version: 202201**

# Update Fulfillment

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

Updates the details of an existing fulfillment, including tracking information and notification preferences.

## Request

**Path Parameters**

- `order_id` string (required)

  Order's ID
- `fulfillment_id` string (required)

  Fulfillment's id

**application/json**

**Body | Example**

**Body**

- `tracking_number` string

  Tracking Number, for example: `DHL1231232113`
- `tracking_company` string

  Tracking Company, for example: `DHL`
- `tracking_company_code` string

  Tracking Company's code, for example: `dhl`
- `tracking_url` string

  Tracking Url
- `send_email` boolean

  Whether to send email notifications

```json
{
  "tracking_number": "string",
  "tracking_company": "string",
  "tracking_company_code": "string",
  "tracking_url": "string",
  "send_email": true
}
```

## Responses

**200**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `fulfillment` object

  - `id` string

    **Example:** `51c7dd5d-8f49-40c3-b2c1-5dfdeef9946d`
  - `order_id` string

    **Example:** `633130-00000007`
  - `status` string

    **Example:** `shipped`
  - `tracking_company` string

    **Example:** `燕文物流`
  - `tracking_number` string

    **Example:** `11111111112`
  - `tracking_company_code` string

    **Example:** `DJ-11343`
  - `tracking_url` string

    **Example:**
  - `created_at` string

    **Example:** `2024-04-22T08:37:12Z`
  - `updated_at` string

    **Example:** `2024-04-22T08:42:54Z`
  - `line_items` object[]

    *   Array [

    - `id` string

      **Example:** `ed8af005-1f4e-42d1-859d-99b0fd420781`
    - `product_id` string

      **Example:** `a1a88be0-a1d4-47e4-a2f2-ba6e131cf447`
    - `variant_id` string

      **Example:** `a7175820-36b3-4fc6-9baf-51e3035242ba`
    - `variant_title` string

      **Example:** `L-blue-T`
    - `product_title` string

      **Example:** `shirt`
    - `product_handle` string

      **Example:** `shirt`
    - `quantity` integer

      **Default value:** `0`

      **Example:** `1`
    - `note` string

      **Example:**
    - `fulfillment_status` string

      **Example:** `shipped`
    - `sku` string

      **Example:** `T-M-L-blue-T-A001008`
    - `weight_unit` string

      **Example:** `kg`
    - `vendor` string

      **Example:** `shoplazza`
    - `product_url` string

      **Example:** `/products/shirt`
    - `compare_at_price` string

      **Example:** `97.00`
    - `image` string

      **Example:** `//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg`
    - `price` string

      **Example:** `81.00`
    - `total` string

      **Example:** `81.00`
    - `weight` string

      **Example:** `1.10`
    - `properties` object[]

      *   Array [

      - `name` string

        **Example:** `size`
      - `value` string

        **Example:** `L`
      *   ]
    - `custom_properties` object

      - `` object
    - `refund_quantity` integer

      **Default value:** `0`

      **Example:** `0`
    - `refund_total` string

      **Example:** `0.00`
    - `taxable` boolean

      **Default value:** `true`

      **Example:** `true`
    - `requires_shipping` boolean

      **Default value:** `true`

      **Example:** `true`
    - `shipping_quantity` integer

      **Default value:** `0`

      **Example:** `1`
    *   ]

```json
{
  "fulfillment": {
    "id": "51c7dd5d-8f49-40c3-b2c1-5dfdeef9946d",
    "order_id": "633130-00000007",
    "status": "shipped",
    "tracking_company": "燕文物流",
    "tracking_number": "11111111112",
    "tracking_company_code": "DJ-11343",
    "tracking_url": "",
    "created_at": "2024-04-22T08:37:12Z",
    "updated_at": "2024-04-22T08:42:54Z",
    "line_items": [
      {
        "id": "ed8af005-1f4e-42d1-859d-99b0fd420781",
        "product_id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
        "variant_id": "a7175820-36b3-4fc6-9baf-51e3035242ba",
        "variant_title": "L-blue-T",
        "product_title": "shirt",
        "product_handle": "shirt",
        "quantity": 1,
        "note": "",
        "fulfillment_status": "shipped",
        "sku": "T-M-L-blue-T-A001008",
        "weight_unit": "kg",
        "vendor": "shoplazza",
        "product_url": "/products/shirt",
        "compare_at_price": "97.00",
        "image": "//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg",
        "price": "81.00",
        "total": "81.00",
        "weight": "1.10",
        "properties": [
          {
            "name": "size",
            "value": "L"
          }
        ],
        "custom_properties": {},
        "refund_quantity": 0,
        "refund_total": "0.00",
        "taxable": true,
        "requires_shipping": true,
        "shipping_quantity": 1
      }
    ]
  }
}
```

```json
{
    "fulfillment": {
        "id": "51c7dd5d-8f49-40c3-b2c1-5dfdeef9946d",
        "order_id": "633130-00000007",
        "status": "shipped",
        "tracking_company": "燕文物流",
        "tracking_number": "11111111112",
        "tracking_company_code": "DJ-11343",
        "tracking_url": "",
        "created_at": "2024-04-22T08:37:12Z",
        "updated_at": "2024-04-22T08:42:54Z",
        "line_items": [
            {
                "id": "ed8af005-1f4e-42d1-859d-99b0fd420781",
                "product_id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
                "variant_id": "a7175820-36b3-4fc6-9baf-51e3035242ba",
                "variant_title": "L-blue-T",
                "product_title": "shirt",
                "product_handle": "shirt",
                "quantity": 1,
                "note": "",
                "fulfillment_status": "shipped",
                "sku": "T-M-L-blue-T-A001008",
                "weight_unit": "kg",
                "vendor": "shoplazza",
                "product_url": "/products/shirt",
                "compare_at_price": "97.00",
                "image": "//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg",
                "price": "81.00",
                "total": "81.00",
                "weight": "1.10",
                "properties": [
                    {
                        "name": "size",
                        "value": "L"
                    },
                    {
                        "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
            }
        ]
    }
}
```
