# logistics.onGetQuota
This documentation describes messages or events received on the server. For details, see Message Push.
Triggers a merchant balance query event.
# Message Parameters
# Object
| Property | Type | Description |
|---|---|---|
| ToUserName | string | The UserName of the express company's Mini Program. |
| FromUserName | string | The OpenID of WeChat Team. It is a fixed value. |
| CreateTime | number | The time of the event. It is a Unix timestamp. |
| MsgType | string | The type of the message. It is event. |
| Event | string | The type of the event. It is get_quota and is case-insensitive. |
| BizID | string | The ID of the merchant. It is the customer code or monthly statement account of the merchant in the express company. |
| BizPwd | string | The password of the BizID. |
| ShopAppID | string | The AppID of the merchant's Mini Program. |
# Message Responses
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| ToUserName | string | Yes | The FromUserName in the request is returned as it is. | |
| FromUserName | string | Yes | The UserName of the express company's Mini Program. | |
| CreateTime | number | Yes | The time of the event. It is a Unix timestamp. | |
| MsgType | string | Yes | The type of the message. It is event. | |
| Event | string | Yes | The type of the event. It is get_quota and is case-insensitive. | |
| BizID | string | Yes | The ID of the merchant. | |
| ResultCode | number | Yes | The error code for the result. | |
| ResultMsg | string | Yes | Details about the result. | |
| Quota | number | Yes | The available balance of the merchant. "0" indicates no balance is available. |
Valid values of ResultCode
| Value | Description | Minimum Version |
|---|---|---|
| 0 | The query is successful. | |
| -1 | Other errors | |
| 10001 | The customer code or monthly statement account does not exist. | |
| 10002 | Incorrect customer password |
# Example of the Message Data Packet
In XML format
<xml>
<ToUserName><![CDATA[gh_abcdefg]]></ToUserName>
<FromUserName><![CDATA[oABCD]]></FromUserName>
<CreateTime>1533042556</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[get_quota]]></Event>
<BizID><![CDATA[xyz]]></BizID>
<BizPwd><![CDATA[xyz123]]></BizPwd>
<ShopAppID><![CDATA[wxABCD]]></ShopAppID>
</xml>
In JSON format
{
"ToUserName": "gh_abcdefg",
"FromUserName": "oABCD",
"CreateTime": 1533042556,
"MsgType": "event",
"Event": "get_quota",
"BizID": "xyz",
"BizPwd": "xyz123",
"ShopAppID": "wxABCD"
}
# Example of the Returned Data Packet
In XML format
<xml>
<ToUserName><![CDATA[oABCD]]></ToUserName>
<FromUserName><![CDATA[gh_abcdefg]]></FromUserName>
<CreateTime>1533042556</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[get_quota]]></Event>
<BizID><![CDATA[xyz]]></BizID>
<ResultCode>0</ResultCode>
<ResultMsg><![CDATA[success]]></ResultMsg>
<Quota>0</Quota>
</xml>
In JSON format
{
"ToUserName": "oABCD",
"FromUserName": "gh_abcdefg",
"CreateTime": 1533042556,
"MsgType": "event",
"Event": "get_quota",
"BizID": "xyz",
"ResultCode": 0,
"ResultMsg": "success",
"Quota": 0
}