1.1. Introduction

Qianyi outsources logistics spec, this document needs to be reviewed.

1.2. Environment Requirements and Basic Agreements

Authorization: accessId (customer ID), secretKey (key for verifying message information). For warehouses, use the mutually agreed key as the signature verification key.

Interface address: Third-party provides service address for Qianyi to call.

Request Method:

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

Public Request:

Field Name Type Required Remarks
accessId String Yes Third-party authorized Qianyi customer ID. For gwms this field is empty
method String Yes Interface method name
content String Yes Business parameters
sign String Yes Signature

Header Parameters:

Field Name Type Required Remarks
logisticsType String N Logistics type
secret String N Third-party warehouse secret key. gwms uses the mutually agreed secret key for signature verification
accessToken String N accessToken
refreshToken String N refreshToken
authInfo String N gwms passes authorization information used by the logistics provider. JSON format
apiUrl String N Service request domain: https://www.baidu.com

authInfo Value Example: "authInfo":[ {"authInfoKey":"MERCHANT_ID", "value":"BG2447"}, {"authInfoKey":"SECRET_KEY", "value":"f1dafc7b7c934d21327d990b0ea56cfcf4814ef699345a37010c07e02d5219a9"}, {"authInfoKey":"PRINT_SIZE", "value":""} ] Where MERCHANT_ID, SECRET_KEY, PRINT_SIZE are fields agreed upon by the logistics provider. Different logistics providers may have different fields, all requested through JSON format.

Public Response:

Field Name Type Required Remarks
success boolean Yes Whether business processing was successful
message String No Business processing exception message

Signature Method:

  1. Compose accessId and content into a JSON string {"accessId":"accessId","content":"specific business parameters"}, when content is empty {"accessId":"accessId"}. For gwms, accessId is empty.

  2. Add the customer secretKey allocated by the third party to the end of the JSON to get the string to be encrypted {"accessId":"accessId","content":"specific business parameters"}secretKey. For gwms, secretKey is the mutually agreed key.

  3. Perform SHA1 encryption on the string to be encrypted to get the signature (org.apache.commons.codec.digest.DigestUtils.sha1Hex(string to be encrypted))

  4. Assign the signature to the sign field in the public request

1.3. Channel List

Method Name:

  • channels

Return Information:

Field Name Field Description Type Required Remarks
channelList Channel information Array
└ channelCode Channel code String Required Must be unique
└ channelName Channel name String Required
└ carrier Carrier code String N
└ carrierName Carrier name String N
└ countrys Country information List <Country> N
└└countryCode Country code String Y
└└countryName Country name String Y
└ areas Areas List <String> N

1.4. Create Logistics Order (Apply for Tracking Number)

Method Name:

  • createOrder

Interface Parameters:

Field Name Field Description Type Required Remarks
customerNumber Order number String Required
onlineOrderId Online order ID String N
addedServices Signature service String N Signature service 1 general signature service 2 acknowledged signature service
channelCode Shipping channel code String Required
recipientAddress Recipient information Object Required
└ name Recipient name String Required
└ address1 Recipient address 1 String Required
└ address2 Recipient address 2 String N
└ phone1 Recipient phone 1 String Required
└ phone2 Recipient phone 2 String N
└ email Recipient email String N
└ country Recipient country String Required Two-letter country code ISO 3166-1
└ province Recipient state String Y
└ city Recipient city String Y
└ town Recipient district String N
└ postalCode Recipient postal code String Required
senderAddress Sender information Object Required
└ name Sender name String Required
└ address1 Sender address 1 String Required
└ address2 Sender address 2 String N
└ phone1 Sender phone 1 String Required
└ phone2 Sender phone 2 String N
└ email Sender email String N
└ country Sender country String Required Two-letter country code ISO 3166-1
└ province Sender state String Y
└ city Sender city String Y
└ town Sender district String Y
└ postalCode Sender postal code String Required
itemList Order item information Array Required
└packageNumber Unique package number String N Current document unique package number, required when packageList has value
└ sku Product code String Required
└ skuName Product name String N
└ length Length String N
└ wide Width String N
└ high Height String N
└ lengthUnit Length unit String N cm(cm), In(inch), m(meter)
└ weight Customs weight BigDecimal Y Weight converted to KG, default 0
└ skuWeight Product weight Double N
└ weightUnit Weight unit String N KG(kilogram), GRAM(gram), LBS(pound)
└ color Color String N
└ skuPrice Product actual payment amount BigDecimal N
└ quantity Quantity String Required
└ price Product amount BigDecimal Required Total amount of this product
└ currency Currency String Required ISO 4217
└ customsCode Customs code String N
└ cnCustomsName Chinese customs name String N
└ enCustomsName English customs name String N
codEnabled Whether COD order Integer N 1: COD order 0: non-COD order
codPayAmount COD order amount BigDecimal N
codCurrency COD amount currency String N
packageList Multi-package list Array N
└packageNumber Unique package number String Y Current document package number
└packageLength Package length Number N
└packageWide Package width Number N
└packageHigh Package height Number N
└packageUnit Package unit String N cm(cm), In(inch), m(meter), default: cm
└totalWeight Total weight Number N Unit is KG
packageLength Package length Double N
packageWide Package width Double N
packageHigh Package height Double N
packageUnit Package unit String N cm(cm), In(inch), m(meter), default: cm
totalWeight Total weight BigDecimal N Unit is KG
iossNumber IOSS number String N
taxNumber Tax number String N
receiverTaxNumber Recipient tax number String N
remarks Remarks String N
pickupTime Pickup time Long N 1659690000
pickupTimeRangeId Platform pickup time ID Long N 1
pickupTimeRange Pickup time range String N 10:00 - 19:00
paymentRole Payer Integer N 1: Sender pays 2: Recipient pays
collectType Pickup type Integer N 1: pickup 2: drop off

1.5. Cancel Logistics Order

Method Name:

  • cancelOrder

Interface Parameters:

Field Name Field Description Type Required Remarks
customerNumber Qianyi order number String Optional Can be used with trackingNumber
trackingNumber Tracking number String Optional Can be used with customerNumber

1.6. Get Label

Method Name:

  • getLabel

Interface Parameters:

Field Name Field Description Type Required Remarks
customerNumber Order number String Required
trackingNumber Tracking number String Required
labelType Label type String Y Template size: A4, 10*15 etc

Return Information:

Field Name Field Description Type Required Remarks
trackingNumber Tracking number String Required
customerNumber Order number String N
labelData Label String Required PDF Base64

1.7. Get Tracking Information

Method Name:

  • getTrackingInfo

Interface Parameters:

Field Name Field Description Type Required Remarks
customerNumber Qianyi order number String Required
trackingNumber Tracking number String Required

Return Information:

Field Name Field Description Type Required Remarks
orderNumber Qianyi order number String Required
carrierName Carrier name String Required
trackingNumber Tracking number String Required
status Tracking status String Required CREATED(pending pickup) SHIPPED(picked up) IN_TRANSIT(in transit) OUT_FOR_DELIVERY(out for delivery) DELIVERED(delivered) UNDELIVERABLE(undeliverable) DELAYED(delayed) RETURNING(returning) RETURNED(returned)
trackingEvents Tracking events Array Required
└ eventDate Event date String Required Example: 2021-01-01 10:00:00
└ eventPlace Event place String Required Example: TEST warehouse, CA
└ eventDesc Event description String Required Example: Arrived at transit warehouse

1.8. Get Available Pickup Times

Method Name:

  • getPickupTime

Interface Parameters: None

Return Information:

Field Name Field Description Type Required Remarks
data List<Object> Y
└ pickupTime Long N 1659690000
└ pickupTimeRangeId Long N 1
└ pickupTimeRange String N 10:00 - 19:00
© Copyright QianYi Team 2025 All Rights Reserved            Updated 2025-09-29 04:26:14

results matching ""

    No results matching ""