1. Brief

If you need to connect with Qianyi's First leg logistics provider, you need to see the document

2. Environmental requirements and basic agreements

Authorization:appKey、appSecret。For the warehouse, the key agreed upon by both parties is used for verification.

Interface address: The third party provides the service address for Qianyi to call.

Request method:

  • Method: POST
  • Content-Type: application/x-www-form-urlencoded

Base request:

Field DataType Require Description
appKey String Yes
method String Yes The name of the interface method
content String Yes content
sign String Yes Signature

headerParams:

Field DataType Require Description
logisticsType String N 物流DataType
authInfo String N gwms传物流商这边用到的授权信息。json格式
apiUrl String N 服务请求域名: https://www.baidu.com

authInfo Example of value transfer: "authInfo":[ {"authInfoKey":"LOGISTICS_KEY", "value":"BG2447"}, {"authInfoKey":"LOGISTICS_SECRET", "value":"f1dafc7b7c934d21327d990b0ea56cfcf4814ef699345a37010c07e02d5219a9"} ] Among them, LOGISTICS_KEY, LOGISTICS_SECRET are all fields agreed by the logistics provider to be transmitted, and the fields may be different for different logistics providers, and they are all passed Request in JSON format.

Base Response:

Field DataType Require Description
success boolean Yes 业务处理是否成功
message String No 业务处理异常消息

Signature method:

  1. Combine appKey and content into a JSON string {"appKey":"appKey","content":"Specific business Params"}, and when content is empty, {"appKey":"appKey"}.
  2. Append the customer appSecret assigned by the third party to the end of the JSON to obtain the string to be encrypted {"appKey":"appKey","content":"Specific business Params"}appSecret.
  3. Perform SHA1 encryption on the string to be encrypted (org.apache.commons.codec.digest.DigestUtils.sha1Hex(string to be encrypted))
  4. Assign the signature to the sign field of the common request

3. 物流授权

Method Name:

  • auth

Interface Params:

Field Field Description DataType Require Description
logisticsKey logisticsKey String Yes
logisticsSecret logisticsSecret String Yes
openAppKey opapiKey String No
openAppSecret opapiSecret String No

Response:

Field DataType Require Description
success boolean Yes
message String No

Request Example:

{ "appKey": "3215435", "method": "getTrackingInfo", "content": "{\"logisticsKey\":\"id001\",\"logisticsKey\":\"testKey\",\"appKey\":\"dfa32423423",\"appSecret\":\"dfs2323\"}", "sign": "11fbd649164860b5571cb60dfc99baccb375f392" }

Return Example: { "success": "true", "message": "" }

4. 渠道列表

Method Name:

  • channels

Interface Params:

Field Field Description DataType Require Description
logisticsKey key String Yes

Response:

Field Field Description DataType Require Description
channelList Channel information Array
└ channelCode Channel code(物流方式、物流产品) String Yes Unique
└ channelName The name of the channel String Yes
└ carrierName Carrier name String No
└ carrierCode Carrier code String No
└ transportType Transport type String Yes

Request Example:

{ "appKey": "3215435", "content": "", "method": "channels", "sign": "11fbd649164860b5571cb60dfc99baccb375f392" }

Return Example:

{ "success": "true", "message": "", "channelList": [ { "channelCode": "FedexGround", "channelName": "FedEx Ground", "carrierName": "FEDEX", "transportType": "" } ] }

5. 订阅物流轨迹

Method Name:

  • subscribe

Interface Params:

Field Field Description DataType Require Description
logisticsKey key String Yes
orderList orderlist Array No
└ orderNumber orderNumber String No
└ trackingNumber trackingNumber Array Yes

Response:

Field DataType Require Description
orderList Array No Return the failed subscription order. It is empty when all are successful
└ orderNumber String Yes
└ trackingNumber Array Yes
└ errorMessage String Yes The service processes the exception message

Request Example:

{ "success": "true", "message": "", "data": [ { "trackingNumber": ["DS35841212312","DS3584121111"], "orderNumber": "orderNumber", "errorMessage": "order not exist" } ] }

Return Example:

6. 推送物流轨迹

Method Name:

  • pushLogistics

Interface Params:

Field Field Description DataType Require Description
customerNumber Qianyi Order number String Yes
carrierName Carrier name String Yes
trackingNumber Tracking Number String Yes
status Waybill status String Yes CREATED (Pending pickup) SHIPPED (Picked up) IN_TRANSIT (In transit) OUT_FOR_DELIVERY (Out for delivery) DELIVERED (Delivered) UNDELIVERABLE (Undeliverable) DELAYED (Delayed delivery) RETURNING (Returning) RETURNED (Returned)
stageList stage info Array Yes
└ status stage status String Yes
└ number package number Integer Yes
└ trackingEvents Tracking information List Yes

TrackingEvent

Field Field Description DataType Require Description
eventDate Event time String Yes Example: 2021-01-01 10:00:00
eventPlace Event location String Yes Example: TEST transfer warehouse, CA
eventDesc Event description String Yes Example: Arrived at the transfer station

ResponseResponse:

Field DataType Require Description
success boolean Yes
message String No

Request ExampleRequest Example:

{ "success": "true", "message": "", "data": { "orderNumber": "CESH210204147401", "carrierName": "FedEx", "trackingNumber": "DS35841212312", "status": "IN_TRANSIT", "trackingEvents": [ { "eventDate": "2021-01-01 15:00:00", "eventPlace": "CA", "eventDesc": "The shipment has been loaded and is on the way for delivery" }, { "eventDate": "2021-01-01 10:00:00", "eventPlace": "CA", "eventDesc": "Shipping information sent to FedEx" } ] } }

Return ExampleReturn Example:

{ "success": "true", "message": "" }

© Copyright QianYi Team 2025 All Rights Reserved            Updated 2025-09-29 04:26:14

results matching ""

    No results matching ""