# Upload logistics information
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
uploadCombinedShippingInfo
# Functional description
- Call this interface to upload the logistics information
- This interface is used for merchants to access shopping order business. After the merchant is connected, it helps the user to view the/Manage orders within WeChat, track order progress, obtain after-sales service, etc. Users can follow up from WeChatI-service-Wallet-billYou can also backtrack the purchase order by entering the billing details page from the payment voucher message.
- Specific service introduction and complete access guide can be found at Shopping Order。
# Note
- According to the specified order number type, different parameters are used to upload the order information for the specified order. When uploading logistics information for the order, the order number type of the main order and the sub-order must be consistent with the order information uploaded.
- In the form of merchant side order number (enumerating value 1), an order is determined by placing single merchant number and merchant side order number.
- WeChat Pay order number (enumerating value 2), through WeChat Pay order number to determine an order
- Delivery mode selected according to the specific delivery situation
- Unified shipment (enumerate value 1), one order unified shipment, only one logistics order number, this type no longer need to specify the goods in the package
- Split shipment (enumerate value 2), one order split shipment, including multiple logistics order numbers. You need to specify the specific items contained in each logistics list. System usageUpload Shopping DetailsTo identify specific goods by using the "merchant side product ID" in the
- Logistics company code, seeAccess to capacity id Listget_delivery_list
- Upload time, used to identify the order of the request, if you want to update the logistics information, upload time must be updated than the previous request, please fill in the Rfc3399 format
- Logistics information must be uploaded after payment is completed
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/user-order/combine-orders/shippings?access_token=ACCESS_TOKEN
# Third Party Invocation
The calling method and parameters are the same as HTTPS, only the calling token is different
The permission sets to which this interface belongs are: 120, 121, 142
After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant
# Request parameters
attribute | type | Required | Introductions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
access_Token | string | yes | Interface invokes the certificate, which is URL Parameters, non Body Parameters. usegetAccessToken or authorizer_access_Token | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_key | object | yes | Joint order, need to upload the shopping details of the joint order, according to the order type of two to choose one | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sub_orders | array | no | Sublist Shopping Details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
upload_time | string | no | Upload time, used to identify the order of requests Example value: 2021-05-20T13:29:35.120+08:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pay | object | no | Payer, payer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# Return parameters
attribute | type | 初始值 |
---|---|---|
errcode | number | Error code |
errmsg | string | Wrong reasons |
# Call Example
Example Dxplaination: JS Fetch API
# Sample Request Data
// Assemble URL
let url = `https://api.weixin.qq.com/user-order/combine-orders/shippings`
// Json Package
let jsonBody = {}
jsonBody["order_key"] = {
"order_number_type": "WXPAY_TRADE_NUMBER",
"transaction_id": "o9a3q",
"mchid": "bpgux",
"out_trade_no": "tktyq"
}
jsonBody["sub_orders"] = [
{
"order_key": {
"order_number_type": "MERCHANT_TRADE_NUMBER",
"transaction_id": "6r6m0",
"mchid": "kzwri",
"out_trade_no": "v1rsd"
},
"delivery_mode": "SPLIT_DELIVERY",
"shipping_list": [
{
"tracking_初始值 "323244567777",
"express_company": "DHL",
"item_list": [
{
"merchant_item_id": "1246464644"
},
{
"merchant_item_id": "1246464644"
}
],
"contact": {
"consignor_contact": "****1234",
"receiver_contact": "189****1234"
}
},
{
"tracking_no": "323244567777",
"express_company": "DHL",
"item_list": [
{
"merchant_item_id": "1246464644"
},
{
"merchant_item_id": "1246464644"
}
],
"contact": {
"consignor_contact": "****1234",
"receiver_contact": "0**2-******23-10"
}
}
]
},
{
"order_key": {
"order_number_type": "MERCHANT_TRADE_NUMBER",
"transaction_id": "2m08y",
"mchid": "fr2db"
"out_trade_no": "m2dok"
},
"delivery_mode": "UNIFIED_DELIVERY",
"shipping_list": [
{
"tracking_no": "323244567777",
"express_company": "DHL",
"item_list": [
{
"merchant_item_id": "1246464644"
},
{
"merchant_item_id": "1246464644"
}
],
"contact": {
"consignor_contact": "0**2-***1234",
"receiver_contact": "****123-8008"
}
},
{
"tracking_no": "323244567777",
"express_company": "DHL",
"item_list": [
{
"merchant_item_id": "1246464644"
},
{
"merchant_item_id": "1246464644"
},
{
"merchant_item_id": "1246464644"
}
],
"contact": {
"consignor_contact": "0**2-***1234",
"receiver_contact": "189****1234"
}
}
]
},
{
"order_key": {
"order_number_type": "MERCHANT_TRADE_NUMBER",
"transaction_id": "dxy5d",
"mchid": "w5acd",
"out_trade_no": "TQBIK"
},
"delivery_mode": "UNIFIED_DELIVERY",
"shipping_list": [
{
"tracking_no": "323244567777",
"express_company": "DHL",
"item_list": [
{
"merchant_item_id": "1246464644"
},
{
"merchant_item_id": "1246464644"
}
],
"contact": {
"consignor_contact": "****123-8008",
"receiver_contact": "****1234"
}
},
{
"tracking_no": "323244567777",
"express_company": "DHL",
"item_list": [
{
"merchant_item_id": "1246464644"
},
{
"merchant_item_id": "1246464644"
}
],
"contact": {
"consignor_contact": "****123-8008",
"receiver_contact": "0**2-***1234"
}
}
]
}
]
jsonBody["upload_time"] = "2021-05-20T13:29:35.120 08:00"
jsonBody["pay"] = {
"opens": "oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"
}
// Set the header
let headers = {"Content-Type": "application/json"}
// Send Request
fetch(url, {
body: JSON.stringify(jsonBody),
headers: headers,
method: "POST"
})
.then(response => response.json())
.then(response => console.log("Success:", JSON.stringify(response)))
. catch(error => console.error("Error:", error))
# Return Data Example
{
"errcode":0,
"errmsg":"ok"
}
# Error code
Error code | Error code | Solutions |
---|---|---|
-1 | system error | The system is busy, please wait for the developer to try again |
268435461 | Parameter error | Modify the parameters according to the description of the cause of the error |
268485192 | User ID openid is empty | User ID openid must be filled in |
268485214 | Upload time must be set | Upload time must be filled in |
268485195 | WeChat payment in the form of transaction_The id field must be set | WeChat payment in the form of transaction_The id field must be set |
268485196 | The mchid field in the form of merchant side order number must be set | The mchid field in the form of merchant side order number must be set |
268485197 | Merchant side single number form out_trade_The no field must be set | Out in the form of merchant side single number_trade_The no field must be set |
268485194 | Order Number Type Illegal | Fill in the field as enumerated by the order type in the document |
268485253 | Uploaded Combined Order Shopping Details The order number type of the main order does not match the order number type of the suborder | Uploaded Combined Purchase Details Order Number Type of Master Order and Suborder Number Type must be the same |
268485195 | WeChat payment in the form of transaction_The id field must be set | WeChat payment in the form of transaction_The id field must be set |
268485196 | The mchid field in the form of merchant side order number must be set | The mchid field in the form of merchant side order number must be set |
268485197 | Merchant side single number form out_trade_The no field must be set | Out in the form of merchant side single number_trade_The no field must be set |
268485194 | Order Number Type Illegal | Fill in the field as enumerated by the order type in the document |
268485224 | Logistics delivery mode illegal | Set this field by enumeration in the form of logistics in the document |
268485229 | The list is empty. | Logistics Information List Fill out at least one |
268485228 | In the unified shipping mode, the length of the logistics information list must be 1. | In the unified shipping mode, the length of the logistics information list must be 1. |
268485231 | Unified delivery mode does not need to fill in the product ID | Unified delivery mode does not need to fill in the product ID |
268485226 | The number cannot be empty. | Logistics number must be filled in |
268485227 | Logistics company code must be set | Logistics company code must be completed |
268485230 | The merchant side item ID in the item list associated with logistics cannot be empty | The merchant side item ID in the list of goods associated with logistics must be filled in |
268485232 | In split delivery mode, the list of goods associated with logistics cannot be empty | In the split delivery mode, the list of goods associated with logistics is filled in at least one |
268457014 | Openid decoded to 0 | Openid is not valid, please confirm and try again |
268485216 | Upload time is illegal, please fill in Rfc3399 format | Upload time must meet the Rfc3399 format, such as 2021-05-20 T13: 29: 35.120 + 08: 00 |
268485217 | The merchant number is not valid, please confirm and try again | The merchant number is not valid, please confirm and try again |