1. Introduction

This document is intended for Qianyi's outsourcing partners to integrate with warehouses.

Order Business Process Flowchart:

Order Creation Business Process Flowchart

2. Environment Requirements

Authorization: accessId (Customer ID), secretKey (Key used to verify message information).

API Endpoint: The third-party provides a service address for Qianyi to call. Request method:

  • Method: POST
  • Content-Type: application/json

Common Request Parameters:

Field Name Type Required Description
accessId String Yes Third-party authorized Qianyi customer ID
method String Yes API method name
content String Yes Business parameters
sign String Yes Signature

Header Parameters:

Field Name Type Required Description
warehouseType String N Warehouse type
secret String N Third-party warehouse secret/Token

Common Response Parameters:

Field Name Type Required Description
success boolean Yes Whether the business processing was successful
message String No Business processing error message

Signature Method:

  1. Compose accessId and content into a JSON string

{"accessId":"accessId","content":" specific business parameters "}, when content is empty:

{"accessId":"accessId"}

  1. Append the customer secretKey assigned by the third party to the end of the JSON to get the string to be encrypted

{"accessId":"accessId","content":"specific business parameters"}secretKey

  1. Perform SHA1 encryption on the string to be encrypted to get the signature

(org.apache.commons.codec.digest.DigestUtils.sha1Hex(string to be encrypted))

  1. Assign the signature to the sign field in the common request

Example of string before encryption: {"accessId":"ibxakq31y","content":"{\"pageSize\":1000,\"page\":1,\"warehouseCode\":\"WH000005\"}"}30534885b3eb4625c8c279822651683a

3. Warehouse List

Description: Get all shipping warehouses for subsequent processes such as issuing inbound orders, inventory synchronization, and order dispatch.

Method Name:

  • warehouses

Response Information:

Field Name Field Description Type Required Remarks
warehouseList Warehouse Info Array
└ warehouseCode Warehouse Code String Required Must be unique
└ warehouseName Warehouse Name String Required Must be unique

Request Example:

{
    "accessId": "3215435",
    "method": "warehouses",
    "content": "",
    "sign": "11fbd649164860b5571cb60dfc99baccb375f392"
}

Response Example:

{
    "success": "true",
    "message": "",
    "warehouseList": [
        {
            "warehouseCode": "CA1",
            "warehouseName": "CA Warehouse"
        },
        {
            "warehouseCode": "CA2",
            "warehouseName": " CA Warehouse 2"
        }
    ]
}

4. Warehouse Logistics List

Description: When orders are reviewed in the ERP system, logistics options must be selected. We support warehouses providing logistics lists, which are then dispatched to the warehouse after selection in the ERP. The 'channels' interface is used to obtain the logistics supported by the warehouse.

Method Name:

  • channels

Interface Parameters:

Field Name Field Description Type Required Remarks
warehouseCode Warehouse Code String N

Response Information:

Field Name Field Description Type Required Remarks
channelList ArrayList
└ channelCode Warehouse Logistics Code String Required Must be unique
└ channelName Warehouse Logistics Name String Required
└ warehouseCode Warehouse Code String Required
└ carrierName Carrier Name String Required

Request Example:

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

Response Example:

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

5. Create Order

Description: After creating an order in Qianyi, a request is sent to the warehouse to create the order so that the warehouse can prepare and ship the goods.

Method Name:

  • createOrder

Interface Parameters:

Field Name Field Description Type Required Remarks
orderNumber Qianyi Order Number String Required
onlineOrderId Platform Order Number String Required Original order number, parent order number
shopName Store Name String Required
warehouseCode Warehouse Code String Required
logisticsCode Shipping Channel Code String Required
platform Platform String Required
freight Shipping Cost BigDecimal Required
packageType Package Type String N Default NORMAL standard package, OWN_PACKAGE self-shipped package
trackingNumber Tracking Number String N Customer-provided label, required when package type is self-shipped
labelData Label Data String N Customer-provided label, required when package type is self-shipped, label data in PDF BASE64
codEnabled Is COD Order Integer Required 1: COD order, 0: non-COD order
codPayAmount COD Amount BigDecimal N COD amount, required for COD orders
codCurrency COD Currency String N COD currency, required for COD orders
orderCreate Order Creation Time Date N
deliveryTime Promised Delivery Time Date N
onlineShopId Online Store ID String N Online store ID, used only by certain warehouses
receiver Recipient Information Object Required
└ name Contact Person String Required
└ phone Contact Phone String Required
└ email Contact Email String Y
└ country Country Code String Required
└ state State/Province String Required
└ city City String Required
└ district District String N
└ address1 Address 1 String Required
└ address2 Address 2 String N
└ postalCode Postal Code String Required
skuList Order Product Info Array Required
└ sku Warehouse Product Code String Required
└ erpSku Product Code String Required
└ name Product Name String Required
└ quantity Quantity String Required
└ amount Product Amount BigDecimal Required
└ shippingPrice Product Shipping Cost BigDecimal N
└ hsCode Customs Code String N
└ chineseCustomsDeclarationName Chinese Declaration Name String N
└ englishCustomsDeclarationName English Declaration Name String N

Request Example:

{
    "accessId": "3215435",
    "method": "createOrder",
    "content": "{\"orderNumber\":\"CESH210204147401\",\"onlineOrderId\":\"11319575377 9\",\"shopName\":\"测试\",\"logisticsCode\":\"FedexGround\",\"platform\":\"tiktok\",\"warehouseCode\":\"QY_01\",\"fr eight\":20.0,\"receiver\":{\"name\":\"Kimberly White\",\"phone\":\"1889838055188\",\"email\":\"\",\"country\":\"US\",\"state\":\"AR\",\"city\":\"Harrison\",\"district\":\"null\",\"address1\": \"TestStreet1\",\"address2\":\"\",\"postalCode\":\"72601\"},\"skuLi st\":[{\"sku\":\"CL0000000000001\",\"name\":null,\"quantity\":1,\"amo unt\":120.0,\"shippingPrice\":20.0,\"hsCode\":\"CL0000000000001\",\"chineseCustomsDeclarationName\":\" 测 试 商 品\",\"englishCustomsDeclarationName\":\"TEST\"}]}",
    "sign": "11fbd649164860b5571cb60dfc99baccb375f392"
}

Response example:

{
    "success": "true",
    "message": "",
    "data": {
        "warehouseOrderNumber": "S111111-09987666"
    }
}

6. Cancel Order

Description: Used for Qianyi to cancel orders with the warehouse

Method Name:

  • cancelOrder

Interface Parameters:

Field Name Field Description Type Required Remarks
orderNumber Qianyi Order Number String Required
warehouseCode Warehouse Code String N
warehouseOrderNumber Warehouse Order Number String N

Request Example:

{
    "accessId": "3215435",
    "method": " cancelOrder",
    "content": " {\"orderNumber\":\"CESH210204147401\",\"warehouseOrderNumber\":\"CESH210204147401\"}",
    "sign": "11fbd649164860b5571cb60dfc99baccb375f392"
}

Response example:

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

7. Query Order Information

Description: Used to synchronize waybill numbers and order status from the warehouse to Qianyi.

Method Name:

  • getOrder

Interface Parameters:

Field Name Field Description Type Required Remarks
orderNumber Qianyi Order Number String Required
warehouseCode Warehouse Code String N
warehouseOrderNumber Warehouse Order Number String

Response Information:

Field Name Field Description Type Required Remarks
orderNumber Qianyi Order Number String Required
wmsStatus Third-party System Outbound Status String Required
status Qianyi Outbound Status String Required Needs to be mapped by wmsStatus: SENDING (Outbound in progress), SUCCESS (Shipped/Outbound completed), CANCEL (Cancelled), FAILED (Failed or Exception)
carrierName Carrier Name String N
trackingNumber Waybill Number String N Required when status is SUCCESS
failedReason Failure Reason String N Required when status is FAILED

Request Example:

{
    "accessId": "3215435",
    "method": " getOrder",
    "content": " {\"orderNumber\":\"CESH210204147401\"}",
    "sign": "11fbd649164860b5571cb60dfc99baccb375f392"
}

Response example:

{
    "success": "true",
    "message": "",
    "data": {
        "orderNumber": "S0000001",
        "wmsStatus": "Shipped",
        "status": "SUCCESS",
        "carrierName": "FEDEX",
        "trackingNumber": "TEST0001"
    }
}

8. Inventory Synchronization

Description: Synchronize SKU and inventory information from the warehouse to Qianyi.

Method Name:

  • syncInventory

Request Parameters:

Field Name Field Description Type Required Remarks
pageSize Number of items per page Integer Required
page Current page Integer Required
warehouseCode Warehouse Code String Required
warehouseSku Warehouse Product Code String Optional
Response Information:
Field Name Field Description Type Required Remarks
isLastPage Whether it is the last page Boolean Required true: last page, false: not last page
currentPage Current page Integer Required
pageCount Total number of pages Integer Required
data Inventory Information List\
warehouseCode Warehouse Code String Required
warehouseSku Warehouse Product Code String Required
onwayQuantity In-transit Quantity String Optional Default 0
pendingQuantity Pending Putaway Quantity String Optional Default 0
sellableQuantity Sellable Quantity String Required
unsellableQuantity Unqualified Quantity String Optional Default 0
reservedQuantity Reserved for Outbound Quantity String Optional Default 0
useQuantity Occupied Quantity String Optional Default 0
totalQuantity Total Inventory Quantity String Required

Request Example:

{
    "accessId": "3215435",
    "method": " syncInventory",
    "content": " {\"pageSize \":\"50\",\"page \":\"1\",\"warehouseCode\":\"wms\",\"warehouseSku \":\"sku\"}",
    "sign": "11fbd649164860b5571cb60dfc99baccb375f392"
}

Response example:

{
    "success": "true",
    "message": "",
    "isLastPage": true,
    "currentPage": 1,
    "pageCount": 1,
    "data": [
        {
            "warehouseCode": "wms",
            "warehouseSku": "sku",
            "onwayQuantity": "11",
            "pendingQuantity": "22",
            "sellableQuantity": "33",
            "unsellableQuantity": "0",
            "reservedQuantity": "22",
            "useQuantity": "11",
            "totalQuantity": "99"
        }
    ]
}

9. ASN Order Creation

Description: After creating an ASN order in Qianyi, a request will be sent to the warehouse to create the ASN order, aiming to increase the inventory of the warehouse SKU.

Method Name:

  • createAsnOrder

Interface Parameters:

Field Name Field Description Type Required Remarks
asnNumber Qianyi ASN Order No. String Required
warehouseCode Warehouse Code String Required
customNumber Reference No. String N
estimatedArrivalDate Estimated Arrival Time Long Optional
trackNumber Tracking Number String Optional
type ASN Order Type String Optional ASN Order Types
orderNumber ERP Order No. String Optional Value present for return orders
onlineOrderId Online Order No. String Optional Value present for return orders
saleReturnReason Return Reason String Optional Value present for return orders
skuList Product Information Array Required Detailed product information
└ sku Product Code String Required
└ name Product Name String Optional
└ quantity Quantity Number Required
asnMarkSku Packing Information List Optional Packing information filled separately, not related to skuList field
└ boxNumber Box Number Number Optional Same box number indicates the same box
└ markCode Box Mark Code String Optional
└ quantity Packed Quantity Number Optional
└ sku Product Code String Optional
└ name Product Name String Optional
└ length Length Decimal Optional
└ width Width Decimal Optional
└ height Height Decimal Optional

Request Example:

{
    "accessId": "67436532",
    "method": "createAsnOrder",
    "content": "{\"skuList\":[{\"sku\":\"CLO-CNQM5069BL\",\"quantity\":2}],\"trackNumber\":\"A240925139551\",\"asnNumber\":\"A240925139551\",\"asnMarkSku\":[{\"sku\":\"CLO-CNQM5069BL\",\"quantity\":2,\"markCode\":\"QY556553-A240925139551-1\",\"boxNumber\":\"1\",\"length\":1.0,\"width\":1.0,\"height\":1.0}],\"estimatedArrivalDate\":null,\"warehouseCode\":\"53\"}",
    "sign": "1f04df03d527653ab65beafb4aa59c778ff3bd73"
}

Response example:

{
    "success": true,
    "message": "",
    "results": [
        {
            "asnNumber": "A1234",
            "operation": "CANCEL",
            "info": ""
        }
    ]
}

9.1. Get ASN List

Method Name: Description: Used to synchronize the status of warehouse inbound orders

  • getAsnList

Interface Parameters:

Field Name Field Description Type Required Remarks
asnNumbers Qianyi Inbound Order Numbers (Batch) List <String> Required
warehouseCode Warehouse Code String Optional

Return Information:

Field Name Field Description Type Required Remarks
asnNumber Qianyi Inbound Order Number String Required
wmsStatus Third-party System Inbound Order Status String Required The status needs to be mapped by wmsStatus, see the mapping table below Inbound Order Status
referenceNumber Warehouse Inbound Order Number String Required
finishTime Completion Time String Required
skuList Product Information Array Required
sku Product Code String Required
name Product Name String Optional
estimatedQuantity Estimated Quantity Number Required
receivedQuantity Received Quantity Number Required
goodQuantity Good Quantity Number Required
badQuantity Defective Quantity Number Required

9.2. Inbound Order Status

Enum Value Remarks
NEW New
DELETED Deleted
SHIPPING In Transit
RECEIVING Receiving
FINISHED Completed
CLOSED Closed

Request Example:

{
    "accessId": "3215435",
    "method": " getAsnList",
    "content": " {\"asnNumbers\":[\"CESH210204147401\",\"warehouseCode\":\"warehouse1\"]}",
    "sign": "11fbd649164860b5571cb60dfc99baccb375f392"
}

Response Example:

{
    "success": "true",
    "message": "",
    "asnList": [
        {
            "asnNumber": "sja11122",
            "wmsStatus": "NEW",
            "finishTime": "2024-10-26 12:23:34",
            "referenceNumber": "A123445",
            "skuList": [
                {
                    "sku": "acs",
                    "name": "Cup",
                    "estimatedQuantity": 12,
                    "receivedQuantity": 12,
                    "goodQuantity": 5,
                    "badQuantity": 7
                }
            ]
        }
    ]
}

10. Cancel ASN Order

Description: Used to cancel warehouse inbound orders

Method Name:

  • cancelAsnOrder

Interface Parameters:

Field Name Field Description Type Required Remarks
asnNumbers Qianyi Inbound Order Numbers (Batch) List <String> Required
warehouseCode Warehouse Code String Optional
Return Information:
Field Name Field Description Type Required Remarks
success Whether the operation on current SKU is successful String Required true: success, false: failure
message Failure Information String Required
results Results List Optional
asnNumber Qianyi Inbound Order Number String Required
operation Operation on inbound order String Required Cancel: CANCEL
info Remarks String Optional Failure information

Request Example:

{
    "accessId": "3215435",
    "method": " cancelAsnOrder",
    "content": " {\"asnNumbers\":[\"CESH210204147401\"],\"warehouseCode\":\"warehouse1\"}",
    "sign": "11fbd649164860b5571cb60dfc99baccb375f392"
}

Response Example:

{
    "success": true,
    "message": "",
    "results": [
        {
            "asnNumber": "A1234",
            "operation": "CANCEL",
            "info": ""
        }
    ]
}

11. Product Distribution to Warehouse

Description: After creating product SKUs in Qianyi and warehouse SKUs, distribute the mapping relationship to the warehouse to maintain the SKU mapping relationship between Qianyi and the warehouse. If warehouse product does not exist, create new; if exists, update.

Method Name:

  • insert_sku_info

Interface Parameters:

Field Name Field Description Type Required Remarks
warehouseCode Warehouse Code String Optional
sku Warehouse Product SKU, up to 255 characters String Required
erpSku Product SKU, up to 255 characters String Required
title Product Name, up to 255 characters String Optional
barcode Product Barcode, up to 255 characters String Optional
specifications Product Specifications String Optional
imageUrl Image Link String Optional
weight Gross Weight Decimal Optional
netWeight Net Weight Decimal Optional
weightUnit Weight Unit String Optional
length Length Decimal Optional
width Width Decimal Optional
height Height Decimal Optional
dimensionUnit Length Unit String Optional
itemPackage Packaging Quantity Number Optional
Return Information:
Field Name Field Description Type Required Remarks
success Whether the operation on current SKU is successful String Required true: success, false: failure
message Failure Information String Required
results Failure Result Set List Optional
sku Product Code String Required
operation Operation on SKU String Required Create: CREATE
info Remarks String Optional Failure information

Request Example:

{
    "method": "insert_sku_info",
    "accessId": "67436532",
    "content": "{\"itemPackage\":null,\"dimensionUnit\":\"cm\",\"length\":\"1\",\"weight\":\"1\",\"title\":\"A1234名称\",\"specifications\":\"黄-M\",\"warehouseCode\":\"53\",\"netWeight\":\"1\",\"imageUrl\":\"http://qianyierp-test.oss.aliyuncs.com/image/NjRhNzU5YWU3Y2M1NjI4YjZlNzIyZjJkYzUxYmYxNjk%3D.jpg\",\"width\":\"1\",\"sku\":\"A1234\",\"barcode\":\"A1234条码\",\"weightUnit\":\"KG\",\"height\":\"1\"}",
    "sign": "d6c07b78107f3fd6819e038257b9236a7e48e297"
}

Response Example:

{
    "success": true,
    "message": "",
    "results": [
        {
            "sku": "A1234",
            "operation": "CANCEL",
            "info": ""
        }
    ]
}

12. WebHooks

12.1. Outbound Order Status Push Interface

Description: Warehouse pushes outbound order information to Qianyi ERP. Please contact Qianyi for warehouseExtraType.

Method Name:

  • pushOrderInfo

POST /sys/automatic/receiveOdo/{warehouseExtraType}

Interface Parameters:

Field Name Field Description Type Required Remarks
orderNumber ERP Order Number String Y
onlineOrderId Platform Online Order String N
warehouseCode Warehouse Code String Y
customerCode Customer Code String N
carrier Carrier String N
trackNumber Waybill Number String Y
warehouseOrderNumber Warehouse Outbound Order Number String N
wmsStatus Warehouse Document Status String Y
status Document Status String Y Needs to be mapped by wmsStatus: SENDING (Outbound in progress), SUCCESS (Shipped/Outbound completed), CANCEL (Cancelled), FAILED (Failed or Exception)
shippingTime Shipping Time Long N 13-digit timestamp
skuList Product Details List <sku> N
errorMsg Exception Reason String N

SKU Information:

Field Name Field Description Type Required Remarks
sku Warehouse SKU String Y
quantity Product Quantity Number Y

Return Information:

Field Name Field Description Type Required Remarks
success Success or Not String Required true: success, false: failure
errorMsg Failure Information String Optional

Request Example:

{
    "accessId": "QIANYI",
    "method": "pushOrderInfo",
    "content": "{\"orderNumber\":\"DA250117100074\",\"onlineOrderId\":\"\",\"warehouseCode\":\"XY002\",\"carrier\":\"\",\"trackNumber\":\"333\",\"warehouseOrderNumber\":\"\",\"wmsStatus\":\"error\",\"status\":\"FAILED\",\"skuList\":{\"sku\":\"60000-test02\",\"quantity\":4},\"errorMsg\":\"仓库接收失败\"}",
    "sign": "a125ee2d535ab0811c6d9f74d52a525534b3aee8"
}

Return Information:

{
    "success": true,
    "errorMsg": ""
}

12.2. Inbound Order Push Interface

Description: Warehouse pushes inbound order information to Qianyi ERP. Please contact Qianyi for warehouseExtraType.

Method Name:

  • pushAsnInfo

POST /sys/automatic/receiveAsn/{warehouseExtraType}

Interface Parameters:

Field Name Field Description Type Required Remarks
warehouseCode Warehouse Code String Y
customerCode Customer Code String N
asnNumber Qianyi Inbound Order Number String Y
wmsStatus Third-party System Inbound Order Status String Y Needs to be mapped by wmsStatus. See mapping table below Inbound Order Push Status
referenceNumber Warehouse Inbound Order Number String N
finishTime Completion Time Long N 13-digit timestamp
updateTime Receiving Update Time Long Y 13-digit timestamp
skuList Product Information Array Y
sku Product Code String Y
name Product Name String N
estimatedQuantity Estimated Quantity Number N
receivedQuantity Received Quantity Number Y goodQuantity + badQuantity
goodQuantity Good Quantity Number N
badQuantity Defective Quantity Number N
batchNo Batch Number String N In incremental receiving scenarios, to prevent Qianyi from consuming the same inbound batch message repeatedly, uniqueness must be guaranteed

Return Information:

Field Name Field Description Type Required Remarks
success Success or Not String Required true: success, false: failure
errorMsg Failure Information String Optional

Request Example:

{
    "accessId": "QIANYI",
    "method": "pushAsnInfo",
    "content": "{\"customerCode\":null,\"asnNumber\":\"A241022159999\",\"warehouseCode\":\"Test-bin\",\"wmsStatus\":\"RECEIVING\",\"referenceNumber\":\"A241022159999\",\"finishTime\":null,\"updateTime\":1744098883894,\"skuList\":{\"sku\":\"V-012B-R\",\"name\":\"V-012B-R\",\"estimatedQuantity\":121,\"receivedQuantity\":2,\"goodQuantity\":2,\"badQuantity\":0},\"batchNo\":\"222222-1\"}",
    "sign": "a125ee2d535ab0811c6d9f74d52a525534b3aee8"
}

Return Information:

{
    "success": true,
    "errorMsg": ""
}

13. Inbound Order Push Status

Enum Value Remarks
FINISHED Completed
CLOSED Closed
SHIPPING In Transit
RECEIVING Receiving

Smart Cross-border E-commerce Partner

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

results matching ""

    No results matching ""