# 履约更新

**Webhook** fulfillments/update

物流信息更新时触发。

需要 `order` [访问权限](/zh-CN/docs/app/building-blocks/authentication/access-scopes)。最低支持版本：`202007`。

## 请求头

- `X-Shoplazza-Topic` string

  触发本次推送的事件，例如 orders/create

  **示例：** `orders/create`
- `X-Shoplazza-Hmac-Sha256` string

  请求体的 HMAC-SHA256 签名（base64 编码），使用应用的 Client Secret 生成，用于验证请求来自 Shoplazza
- `X-Shoplazza-Shop-Domain` string

  产生该事件的店铺域名

  **示例：** `example.myshoplaza.com`
- `X-Shoplazza-Api-Version` string

  序列化 payload 使用的 API 版本

  **示例：** `2025-06`
- `X-Shoplazza-Deduplication-ID` string

  本次推送的去重 ID，同一事件重发时保持不变，用于幂等去重

## 请求体

**数据结构 | 示例**

- `fulfillment` object

  - `id` string

    发货记录 ID
  - `order_id` string

    订单 ID
  - `status` string

    发货记录状态
  - `created_at` string

    创建时间（即发货时间）
  - `updated_at` string

    更新时间
  - `tracking_company` string

    物流商名称。多个运单见 `tracking_items`
  - `tracking_company_code` string

    物流商编码。多个运单见 `tracking_items`
  - `tracking_number` string

    运单号。多个运单见 `tracking_items`
  - `tracking_url` string

    物流跟踪链接。多个运单见 `tracking_items`
  - `tracking_items` object[]

    运单列表，支持多个运单场景

    *   Array \[

    - `tracking_company` string

      物流商名称
    - `tracking_company_code` string

      物流商编码
    - `tracking_number` string

      运单号
    - `tracking_url` string

      物流跟踪链接
    *   \]
  - `line_items` object[]

    本次运单发货的商品

    *   Array \[

    - `id` string

      订单商品记录 ID
    - `product_id` string

      商品 ID
    - `product_title` string

      商品标题
    - `product_handle` string

      商品 Handle
    - `product_url` string

      商品链接
    - `variant_id` string

      子款式 ID
    - `variant_title` string

      子款式标题
    - `sku` string

      子款式 SKU
    - `spu` string

      商品 SPU
    - `quantity` integer

      购买数量
    - `shipped_quantity` integer

      商品本次发货数量
    - `price` string

      商品售价（单价）
    - `compare_at_price` string

      商品原价（单价）
    - `total` string

      商品总价（商品单价 × 购买数量）
    - `duty_price` string

      关税总价
    - `payment_discount_price` string

      分摊的支付优惠金额
    - `discount_applications` string

      优惠明细数据
    - `fulfillment_status` string

      物流状态
    - `requires_shipping` boolean

      是否需要物流
    - `weight` string

      商品重量
    - `weight_unit` string

      重量单位
    - `image` string

      商品图片链接
    - `note` string

      商品备注
    - `vendor` string

      供应商
    - `custom_properties` object

      商品自定义属性
    - `properties` object[]

      商品款式属性

      *   Array \[

      - `name` string

        款式属性的属性名（如 Color）
      - `value` string

        款式属性的属性值（如 Red）
      *   \]
    - `main_currency_prices` object

      主市场币种金额数据

      - `actual_rate` string

        主市场币种兑订单币种的汇率（如值为 7.25，表示 1 主市场币种可兑 7.25 订单币种）
      - `compare_at_price` string

        单件商品的原价（划线价）换算成主市场币种后的金额
      - `price` string

        单件商品的售价换算成主市场币种后的金额
      - `total` string

        该行商品的总价（售价 × 数量）换算成主市场币种后的金额
    - `refund_quantity` integer (deprecated)

      最近一次发起的退款数量（仅退款相关事件返回）。（已废弃：勿用）
    - `refund_total` string (deprecated)

      累计退款商品售价金额（仅退款相关事件返回）。（已废弃：勿用）
    *   \]

```json
{
  "fulfillment": {
    "id": "string",
    "order_id": "string",
    "status": "string",
    "created_at": "string",
    "updated_at": "string",
    "tracking_company": "string",
    "tracking_company_code": "string",
    "tracking_number": "string",
    "tracking_url": "string",
    "tracking_items": [
      {
        "tracking_company": "string",
        "tracking_company_code": "string",
        "tracking_number": "string",
        "tracking_url": "string"
      }
    ],
    "line_items": [
      {
        "id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_handle": "string",
        "product_url": "string",
        "variant_id": "string",
        "variant_title": "string",
        "sku": "string",
        "spu": "string",
        "quantity": 0,
        "shipped_quantity": 0,
        "price": "string",
        "compare_at_price": "string",
        "total": "string",
        "duty_price": "string",
        "payment_discount_price": "string",
        "discount_applications": "string",
        "fulfillment_status": "string",
        "requires_shipping": true,
        "weight": "string",
        "weight_unit": "string",
        "image": "string",
        "note": "string",
        "vendor": "string",
        "custom_properties": {},
        "properties": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "main_currency_prices": {
          "actual_rate": "string",
          "compare_at_price": "string",
          "price": "string",
          "total": "string"
        }
      }
    ]
  }
}
```
