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
Get the printer. If you need to use WeChat single PC software, you need to call.
How to call:
GET https://api.weixin.qq.com/cgi-bin/express/business/printer/getall?access_token=ACCESS_TOKEN
Property | Type | The default | Required | Description |
---|---|---|---|---|
access_token | string | Is | The interface calls the credentials |
{
"count": 2,
"openid": [
"oABC",
"oXYZ"
],
"tagid_list": [
"123",
"456"
]
}
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.getPrinter
Permissions for the logistics.getPrinter API need to be configured in config.json, details
const cloud = require('wx-server-sdk')
cloud.init()
exports.main = async (event, context) => {
try {
const result = await cloud.openapi.logistics.getPrinter({})
return result
} catch (err) {
return err
}
}
{
"count": 2,
"openid": [
"oABC",
"oXYZ"
],
"tagidList": [
"123",
"456"
],
"errMsg": "openapi.logistics.getPrinter:ok"
}