物流

物流相关接口

物流上传接口

post

物流上传接口

Header parameters
gateway-nostring(16)Required

网关号

request-idstring(64)Required

请求id,30分钟之内唯一

request-timestring(16)Required

时间戳,以毫秒(ms)为单位,请求误差不能超过10分钟

sign-infostring(255)Required

验签字段,具体加签方式请参阅数据签名过程章节

Body

物流单号上传对象

lcCodestring(50)Optional

物流运输商代码;最大长度为50,如:TWTH

Example: TWTH
orderNostring(64)Optional

商户订单号;当流水订单号为空时,则该字段时必须的;最小长度为1,最大长度为64,如:12167001000000000001

Example: 12167001000000000000
trackingNostring(50)Required

物流单号;最小长度为2,最大长度为50,如:1223212312

Example: 1223212312
trackingWebstring(200)Required

物流网址;最小长度为2,最大长度为200,如:https://abc.com

Example: https://abc.com
tradeNostring(64)Optional

流水订单号;当商户订单号为空时,则该字段时必须的;最小长度为1,最大长度为64,如:2021092810011380477264

Example: 2021092810011380477264
Responses
200
OK
*/*
post
POST /openApi/V2022-03/logistics HTTP/1.1
Host: {openapiurl}
gateway-no: null
request-id: null
request-time: null
sign-info: null
Content-Type: application/json
Accept: */*
Content-Length: 139

{
  "lcCode": "TWTH",
  "orderNo": 12167001000000000000,
  "trackingNo": 1223212312,
  "trackingWeb": "https://abc.com",
  "tradeNo": "2021092810011380477264"
}
200

OK

{
  "code": "00000",
  "data": {
    "description": "uploadSuccess",
    "status": "success",
    "tradeNo": 2.0210928100113805e+21
  },
  "message": "message info"
}

物流上传接口请求报文示例

uploadLogistics.sh
curl --request POST \
  --url https://{openApiUrl}/openApi/V2022-03/logistics \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
  --data '{
    "lcCode": "aCommerce",
    "orderNo": "NEW_API1213244582639",
    "trackingNo": "7735609666",
    "trackingWeb": "www.hinlc.com",
    "tradeNo": "2022051810582957553787"
}'

结果对象属性描述

property name
type
description

code

String

响应码

message

String

响应信息

data

Object

数据体

tradeNo

String

交易流水号

status

String

上传结果状态码

description

String

上传结果信息描述

物流信息查询请求报文示例

logistics.sh
curl --request GET\
  --url https://{openApiUrl}/openApi/V2022-03/logistics/2022051618185700208077 \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

物流信息查询

get
Path parameters
tradeNosstring(255)Required

交易流水号,传入多个时英文逗号隔开,如:2021092810011380477264,2021092810011380477265

Header parameters
gateway-nostring(16)Required

网关号

request-idstring(64)Required

请求id,30分钟之内唯一

request-timestring(16)Required

时间戳,以毫秒(ms)为单位,请求误差不能超过10分钟

sign-infostring(255)Required

验签字段,具体加签方式请参阅数据签名过程章节

Responses
200
OK
*/*
get
GET /openApi/V2022-03/logistics/{tradeNos} HTTP/1.1
Host: {openapiurl}
gateway-no: null
request-id: null
request-time: null
sign-info: null
Accept: */*
200

OK

{
  "code": "00000",
  "data": [
    {
      "logisticsStatus": "Delivered",
      "tbLcCode": "TWTH",
      "trackingNo": 1223212312,
      "trackingWeb": "https://abc.com",
      "tradeNo": "2021092810011380477264"
    }
  ],
  "message": "message info"
}

结果对象属性描述

property name
type
description

code

String

响应码

message

String

响应信息

data

Object

数据体

logisticsStatus

String

物流状态,Pending待查询、NotFound 查询不到 、InfoReceived 预报发货 、InTransit 运输途中 、ArrivedDelivery 到达待取 、Delivering 派送途中、Delivered 成功派送、Exception 包裹异常、DeliveryFailure 投递失败、Return 包裹退回

tbLcCode

String

物流运输商编号

trackingNo

String

物流单号

trackingWeb

String

物流网址

tradeNo

String

交易流水号

Last updated