# logistics.updateBusiness
Call this API at the server side. For more information, see Server API.
This API supports Cloud Calls. The WeChat DevTools version must be
1.02.1904090or later (download the latest stable version here), and thewx-server-sdkversion must be0.4.0or later.
Updates the merchant review result.
Calling methods:
# HTTPS Call
# Request Address
POST https://api.weixin.qq.com/cgi-bin/express/delivery/service/business/update?access_token=ACCESS_TOKEN
# Request Parameters
| Attribute | Type | Default | Required | Description |
|---|---|---|---|---|
| access_token | string | Yes | Credentials to call API | |
| shop_app_id | string | Yes | The AppID of the merchant's Mini Program. It is the ShopAppID in the merchant review event. | |
| biz_id | string | Yes | The account of the merchant. | |
| result_code | number | Yes | The review result. The value "0" indicates that the merchant is approved, and other values indicate that the merchant is rejected. | |
| result_msg | string | No | The cause of rejection. It is required only when result_code is not "0". |
# Return Value
# Object
| Property | Type | Description |
|---|---|---|
| errcode | number | Error code |
| errmsg | string | Error message |
Valid values of errcode
| Value | Description | Minimum Version |
|---|---|---|
| 0 | Succeeded | |
| -1 | Other errors | |
| 40013 | Invalid AppID of the merchant's Mini Program | |
| 9300525 | The merchant didn't apply for review |
# Request Data Example
{
"shop_app_id": "wxABCD",
"biz_id": "xyz",
"result_code": 0,
"result_msg": " Approved |"
}
# Return Data Example
{
"errcode": 0,
"errmsg": "ok"
}
# Cloud Call
Cloud call is a capability provided by Mini Program·Cloud Base that allows you to call WeChat APIs in a cloud function. It must be used via
wx-server-sdkin the cloud function.
# API Calling Method
openapi.logistics.updateBusiness
You need to configure the permissions for the
logistics.updateBusinessAPI viaconfig.json. Details
# Request Parameters
| Attribute | Type | Default | Required | Description |
|---|---|---|---|---|
| shopAppId | string | Yes | The AppID of the merchant's Mini Program. It is the ShopAppID in the merchant review event. | |
| bizId | string | Yes | The account of the merchant. | |
| resultCode | number | Yes | The review result. The value "0" indicates that the merchant is approved, and other values indicate that the merchant is rejected. | |
| resultMsg | string | No | The cause of rejection. It is required only when result_code is not "0". |
# Return Value
# Object
| Property | Type | Description |
|---|---|---|
| errCode | number | Error code |
| errMsg | string | Error message |
Valid values of errCode
| Value | Description | Minimum Version |
|---|---|---|
| 0 | Succeeded |
# Exceptions
# Object
Thrown Exceptions
| Property | Type | Description |
|---|---|---|
| errCode | number | Error code |
| errMsg | string | Error message |
Valid values of errCode
| Value | Description | Minimum Version |
|---|---|---|
| -1 | Other errors | |
| 40013 | Invalid AppID of the merchant's Mini Program | |
| 9300525 | The merchant didn't apply for review |
# Request Data Example
const cloud = require('wx-server-sdk')
cloud.init()
exports.main = async (event, context) => {
try {
const result = await cloud.openapi.logistics.updateBusiness({
shopAppId: 'wxABCD',
bizId: 'xyz',
resultCode: 0,
resultMsg: ' Approved |'
})
console.log(result)
return result
} catch (err) {
console.log(err)
return err
}
}
# Return Data Example
{
"errCode": 0,
"errMsg": "openapi.logistics.updateBusiness:ok"
}