版本:202506
完成履约
POST/openapi/2025-06/orders/:order_id/fulfillments/:fulfillment_id/complete
将指定履约标记为已完成;若该履约已为完成状态,则直接返回履约详情。
请求
Path参数
order_id string必填
订单 ID
fulfillment_id string必填
待完成的履约 ID
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
pending: 待发货shipped: 已发货finished: 已完成cancelled: 已取消- Array [
- Array [
- ]
- ]
codestring
错误码
messagestring
错误信息
data object
fulfillment object
已完成的履约
idstring
履约 ID
order_idstring
订单 ID
statusstring
物流单状态:
created_atstring
创建时间(ISO-8601 格式)
updated_atstring
最后更新时间(ISO-8601 格式)
tracking_companystring
物流商
tracking_numberstring
运单号
tracking_company_codestring
物流商编码
line_items object[]
本次履约包含的订单商品项列表
idstring
订单商品项 ID
product_idstring
商品 ID
product_titlestring
已购商品名称
variant_idstring
子款式 ID
variant_titlestring
子款式标题,例如 Blue, Size M
quantityuint32
已购该商品的数量
notestring
订单商品项的商品备注
image object
商品图片
srcstring
图片源 URL
widthint32
宽度尺寸
heightint32
高度尺寸
altstring
图片替代文本
pricestring
售价
compare_at_pricestring
划线价
total_pricestring
总价
fulfillment_statusstring
订单商品项的履约状态,例如 fulfilled(已履约)、unfulfilled(未履约);详见履约状态文档
skustring
SKU
weightstring
商品重量
weight_unitstring
商品重量的计量单位,例如 kg、lbs
vendorstring
商品供应商
product_urlstring
商品页面 URL
created_atstring
创建时间(ISO-8601 格式)
updated_atstring
最后更新时间(ISO-8601 格式)
options object[]
订单商品项关联的商品款式属性列表
namestring
商品款式属性名称
valuestring
商品款式属性值
product_slugstring
商品的 URL 友好标识
taxableboolean
是否需要纳税
requires_shippingboolean
订单商品项是否需要物流
spustring
标准商品单元(SPU)
product_tagsstring
商品标签
refund_quantity_totaluint32
退款数量
ship_quantityuint32
发货数量
customboolean
是否为自定义商品项
trunk_pricestring
主干价格
discount_applicationsstring
订单商品项运费的折扣应用数量
tax_pricestring
订单商品项的税费
duty_pricestring
关税费用
payment_discount_pricestring
应用于订单商品项的支付折扣金额
custom_propertiesobject
订单商品项的自定义属性(如尺码、颜色等),JSON 格式
tracking_urlstring
物流链接
phone_numberstring
电话号码
{
"code": "string",
"message": "string",
"data": {
"fulfillment": {
"id": "string",
"order_id": "string",
"status": "string",
"created_at": "string",
"updated_at": "string",
"tracking_company": "string",
"tracking_number": "string",
"tracking_company_code": "string",
"line_items": [
{
"id": "string",
"product_id": "string",
"product_title": "string",
"variant_id": "string",
"variant_title": "string",
"quantity": 0,
"note": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string"
},
"price": "string",
"compare_at_price": "string",
"total_price": "string",
"fulfillment_status": "string",
"sku": "string",
"weight": "string",
"weight_unit": "string",
"vendor": "string",
"product_url": "string",
"created_at": "string",
"updated_at": "string",
"options": [
{
"name": "string",
"value": "string"
}
],
"product_slug": "string",
"taxable": true,
"requires_shipping": true,
"spu": "string",
"product_tags": "string",
"refund_quantity_total": 0,
"ship_quantity": 0,
"custom": true,
"trunk_price": "string",
"discount_applications": "string",
"tax_price": "string",
"duty_price": "string",
"payment_discount_price": "string",
"custom_properties": {}
}
],
"tracking_url": "string",
"phone_number": "string"
}
}
}