# Set Custom Split Scale
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
SetCustomShareRatio
# Functional description
this API For the service provider to set the proportion of personalized advertising revenue for a single Mini Program. If you encounter problems during use, you canOpen Platform Service Provider Zone Exchange Zone | WeChat Open CommunityPosting exchanges.
# Note
1, where access_Token forcomponent_access_Token
2, the service provider through the interface settings/Change of the sub-account proportion, does not take effect on behalf of the proportionIt needs to be confirmed by the merchant in the authorization process of the permission set before it is considered to be in effect.
3, the specific authorization initiation process can refer to the link:Renewal authorization
4, the actual effective proportion of the merchant's sub-account, can beQuery Split Scale InterfaceMake a query
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/wxa/setdefaultamsinfo?action=agency_set_custom_share_ratio&access_token=xxxxxxxxxxxxxxx
# Request parameters
attribute | type | Required | Introductions |
---|---|---|---|
share_ratio | number | yes | Service provider custom split the proportion. When signing a contract, the default priority is to use the custom sub-account ratio, if it does not exist, then the default sub-account ratio is used. As share_The ratio is 40, which represents 40% of the revenue of the service provider and 60% of the revenue of the Mini Program merchant. |
appid | string | yes | For the Mini Program APPID set custom split account ratio. |
# Return parameters
attribute | type | Introductions |
---|---|---|
ret | number | Error code |
err_msg | string | Error message |
# Call Example
Example Dxplaination: HTTPS requests
# Sample Request Data
{
"appid": "wxf3dsfsfsdf478",
"share_ratio" : 50
}
# Return Data Example
{
"ret": 0,
"err_msg":""
}
# Error code
Error code | Error code | Solutions |
---|---|---|
0 | ok | ok |
-202 | Internal error | Can be retried after some time |
1700 | Parameter error | Verify that the input parameters conform to the documentation |
1701 | Parameter error | Verify that the input parameters conform to the documentation |
1737 | Operating too fast | Wait a minute and reoperate |
2056 | The service provider does not open an account in the cash area | Launch services in the monetization area of the third-party platform page |