May 19, 2021 WeChat Mini Program Development Document
This interface should be called on the server side, as detailed in the Service Side API.
This interface supports cloud calls. Developer tool version required . . . 1.02.1904090 (latest stable download)
wx-server-sdk >= 0.4.0
Update the ticket track
How to call:
POST https://api.weixin.qq.com/cgi-bin/express/delivery/path/update?access_token=ACCESS_TOKEN
Property | Type | The default | Required | Description |
---|---|---|---|---|
access_token | string | Is | The interface calls the credentials | |
token | string | Is | The Token field pushed in the merchant side order event | |
waybill_id | string | Is | The ticket ID | |
action_time | number | Is | Track change Unix timestamp | |
action_type | number | Is | The type of trajectory change | |
action_msg | string | Is | Details of the trajectory change are shown on the Express Track Details page. I f you have a mobile phone number, write the 11-bit mobile phone number directly. Code with UTC-8. |
action_type legal value of the data
Value | Description | The lowest version |
---|---|---|
100001 | Tout stage - Touting success | |
100002 | Tout phase - Tout failed | |
100003 | Tout phase - assign salesman | |
200001 | Transport Phase - Update the transport track | |
300002 | Delivery Phase - Start delivery | |
300003 | Delivery Phase - Signed successfully | |
300004 | Delivery phase - sign-off failed | |
400001 | Abnormal Stage - Order Cancellation | |
400002 | Abnormal phase - order stranded |
Property | Type | Description |
---|---|---|
errcode | number | Error code |
errmsg | string | The error message |
The legal value of errcode
Value | Description | The lowest version |
---|---|---|
0 | Success | |
-1 | The system failed | |
40199 | The ticket ID was incorrect and the ticket was not found | |
9300507 | Token is incorrect |
{
"token": "TOKEN",
"waybill_id": "12345678901234567890",
"action_time": 1533052800,
"action_type": 300002,
"action_msg": "丽影邓丽君【18666666666】正在派件"
}
{
"errcode": 0,
"errmsg": "ok"
}
Cloud call is the ability provided by the small program Cloud Development to call WeChat open interfaces in cloud functions and need to be used in cloud functions via wx-server-sdk.
openapi.logistics.updatePath
Permissions for the logistics.updatePath API need to be configured in config.json, details
Property | Type | The default | Required | Description |
---|---|---|---|---|
token | string | Is | The Token field pushed in the merchant side order event | |
waybillId | string | Is | The ticket ID | |
actionTime | number | Is | Track change Unix timestamp | |
actionType | number | Is | The type of trajectory change | |
actionMsg | string | Is | Details of the trajectory change are shown on the Express Track Details page. I f you have a mobile phone number, write the 11-bit mobile phone number directly. Code with UTC-8. |
The legal value of actionType
Value | Description | The lowest version |
---|---|---|
100001 | Tout stage - Touting success | |
100002 | Tout phase - Tout failed | |
100003 | Tout phase - assign salesman | |
200001 | Transport Phase - Update the transport track | |
300002 | Delivery Phase - Start delivery | |
300003 | Delivery Phase - Signed successfully | |
300004 | Delivery phase - sign-off failed | |
400001 | Abnormal Stage - Order Cancellation | |
400002 | Abnormal phase - order stranded |
Property | Type | Description |
---|---|---|
errCode | number | Error code |
errMsg | string | The error message |
The legal value of errCode
Value | Description | The lowest version |
---|---|---|
0 | Success |
The exception thrown
Property | Type | Description |
---|---|---|
errCode | number | Error code |
errMsg | string | The error message |
The legal value of errCode
Value | Description | The lowest version |
---|---|---|
-1 | The system failed | |
40199 | The ticket ID was incorrect and the ticket was not found | |
9300507 | Token is incorrect |
const cloud = require('wx-server-sdk')
cloud.init()
exports.main = async (event, context) => {
try {
const result = await cloud.openapi.logistics.updatePath({
token: 'TOKEN',
waybillId: '12345678901234567890',
actionTime: 1533052800,
actionType: 300002,
actionMsg: '丽影邓丽君【18666666666】正在派件'
})
return result
} catch (err) {
return err
}
}
{
"errCode": 0,
"errMsg": "openapi.logistics.updatePath:ok"
}