Lingxing
切换旧版

更新多平台发货单物流信息

POST/basicOpen/multiplatform/shippingList/updateLogistics

用于更新平台仓发货单内的【物流信息】,包括物流商/物流渠道/物流单号/跟踪号/各项时间/运费/其他费用等。支持按发货单号批量更新,每个发货单可携带多条物流信息明细。

物流信息为覆盖式更新:logisticsInfo 数组传入后会替换该发货单原有物流信息,未传或传空数组会清空原有物流明细。请按需传入完整物流信息。

接口信息

API Path请求协议请求方式令牌桶容量
/basicOpen/multiplatform/shippingList/updateLogisticsHTTPSPOST1

请求参数

dataarray<object>必填
参数数组
隐藏子属性
shippingListCodestring必填
发货单号
logisticsProviderIdinteger
物流商id
查询头程物流商接口对应字段【providerId】
logisticsChannelIdinteger
物流渠道id:按计费重分摊时必填,以获取材积参数用于计算
查询头程物流渠道列表接口对应字段【id】
headFeeTypeinteger
头程费分配方式:
1-按计费重
2-按实重
3-按体积重
4-按SKU数量
5-按箱子体积
6-自定义
arrivalTimestring
到货时间,格式:Y-m-d
sailTimestring
开船时间,格式:Y-m-d
expectedArrivalTimestring
预计到港时间,格式:Y-m-d
actualDeliveryTimestring
实际发货时间,格式:Y-m-d
actualDueTimestring
实际妥投时间,格式:Y-m-d
shippingListRemarkstring
发货单备注
logisticsInfoarray<object>
物流信息明细数组。覆盖式更新:未传或传空数组会清空原有物流明细
隐藏子属性
logisticsNumberstring
物流商单号
trackingNumberstring
跟踪号
transportationCoststring
实际物流费用,精度小数点后 2 位。费用填写时 transportationCurrency 必填
transportationCurrencystring
实际物流费用币种,字母代码(如 CNY/USD)
otherCoststring
实际其他费用,精度小数点后 2 位。费用填写时 otherCurrency 必填
otherCurrencystring
实际其他费用币种
otherCostRemarkstring
实际其他费用备注
expectedTransportationCoststring
预估物流费用,精度小数点后 2 位。费用填写时 expectedTransportationCurrency 必填
expectedTransportationCurrencystring
预估物流费用币种
expectedOtherCoststring
预估其他费用,精度小数点后 2 位。费用填写时 expectedOtherCurrency 必填
expectedOtherCurrencystring
预估其他费用币种
expectedOtherCostRemarkstring
预估其他费用备注

请求cURL示例

curl --location 'https://openapi.lingxing.com/basicOpen/multiplatform/shippingList/updateLogistics?access_token=value&timestamp=value&sign=value&app_key=value' \
--header 'Content-Type: application/json' \
--data '{
    "data": [
        {
            "shippingListCode": "SP202608050000000",
            "logisticsInfo": [
                {
                    "logisticsNumber": "LOG20260810001",
                    "trackingNumber": "TRK20260810001"
                }
            ]
        }
    ]
}'

请求示例

  1. 基础场景:单发货单更新物流单号与跟踪号
{
    "data": [
        {
            "shippingListCode": "SP202608050000000",
            "logisticsInfo": [
                {
                    "logisticsNumber": "LOG20260810001",
                    "trackingNumber": "TRK20260810001"
                }
            ]
        }
    ]
}
  1. 完整场景:批量更新物流商、渠道、各项时间与费用
{
    "data": [
        {
            "shippingListCode": "SP202608050000000",
            "logisticsProviderId": 10086,
            "logisticsChannelId": 20011,
            "headFeeType": 1,
            "sailTime": "2026-08-10",
            "arrivalTime": "2026-08-25",
            "expectedArrivalTime": "2026-09-05",
            "actualDeliveryTime": "2026-08-12",
            "actualDueTime": "2026-09-10",
            "logisticsInfo": [
                {
                    "logisticsNumber": "LOG20260810000",
                    "trackingNumber": "TRK20260810000",
                    "transportationCost": "1500.00",
                    "transportationCurrency": "CNY",
                    "otherCost": "100.00",
                    "otherCurrency": "CNY",
                    "otherCostRemark": "报关代办费",
                    "expectedTransportationCost": "1400.00",
                    "expectedTransportationCurrency": "CNY",
                    "expectedOtherCost": "80.00",
                    "expectedOtherCurrency": "CNY",
                    "expectedOtherCostRemark": "预估报关费"
                }
            ]
        },
        {
            "shippingListCode": "SP202608050000001",
            "logisticsInfo": [
                {
                    "logisticsNumber": "LOG20260800000",
                    "trackingNumber": "TRK20260810000"
                }
            ]
        }
    ]
}
  1. 清空物流明细场景
{
    "data": [
        {
            "shippingListCode": "SP202608050000000",
            "logisticsInfo": []
        }
    ]
}

返回结果

Json Object

codeinteger必填
接口处理结果码;逐单失败原因见error_details
示例 0
messagestring必填
接口处理结果消息
示例 success
error_detailsarray<object>必填
逐单失败明细;全部成功时为空数组
隐藏子属性
shippingListCodestring
更新失败的发货单号
示例 SP202608000000000
fail_reasonstring
失败原因
示例 已请款,不支持覆盖更新物流信息
request_idstring必填
请求追踪ID
示例 426951E6-1B62-1B12-90AF-07648AACC512
response_timestring必填
响应时间,格式:yyyy-MM-dd HH:mm:ss
示例 2026-08-26 14:30:00
totalinteger必填
本次请求的发货单数量
示例 2
dataarray<any>必填
返回数据;当前为空数组

返回成功示例

  1. 全部成功
{
    "code": 0,
    "message": "success",
    "error_details": [],
    "request_id": "426951E6-1B62-1B12-90AF-07648AACC512",
    "response_time": "2026-08-26 14:30:00",
    "total": 2,
    "data": []
}
  1. 部分成功
{
    "code": 0,
    "message": "success",
    "error_details": [
        {
            "shippingListCode": "SP202608000000000",
            "fail_reason": "发货单状态为已取消,不允许更新物流信息"
        }
    ],
    "request_id": "426951E6-1B62-1B12-90AF-07648AACC512",
    "response_time": "2026-08-26 14:30:00",
    "total": 2,
    "data": []
}