# Query the proportion of sub-accounts

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

GetShareRatio

# Functional description

this API Used to query the proportion of advertising revenue between service providers and Mini programs. If you encounter problems during use, you canOpen Platform Service Provider Zone Exchange Zone | WeChat Open CommunityPosting exchanges.

# Note

Where access_Token forcomponent_access_Token

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/wxa/getdefaultamsinfo?action=get_share_ratio&access_token=xxxxxxxxxxxxxxx 

# Request parameters

attribute type Required Introductions
appid string yes Query the proportion of the split account that the APPID takes effect. 1. If it is the APPID of the service provider, it returns the default split ratio that the service provider takes effect at this time(2) If it is the APPID of the Mini Program, the return is the proportion of the Mini Program in effect at this time, and the proportion of the account is the proportion of the service provider's account, that is, the proportion of the service provider's advertising revenue in the Mini Program.

# Return parameters

attribute type Introductions
ret number Error code
err_msg string Error message
share_ratio number Percentage of service providers

# Other Notes

Suppose Mini Program (appid is wxf3dsfsfsdf478) and authorized service provider (appid is wxf3dsfsfsdf13d) account for 40 per cent of authorized service provider revenue. At this point, the default split for the vendor (appid is wxf3dsfsfsdf13d) is 50%. //query { "helps" : "wxf3dsfsfsdf13d" } { "ret": 0, "err_msg":"", "share_ratio": 50 } //query { "helps" : "wxf3dsfsfsdf478" } { "ret": 0, "err_msg":"", "share_ratio": 40 }

# Call Example

Example Dxplaination: HTTPS requests

# Sample Request Data


{
    "helps" : "wxf3dsfsfsdf13d"
} 

# Return Data Example


{
    "ret": 0,
    "err_msg":"",
    "share_ratio": 50
} 

# 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
1735 The merchant has not completed the agreement signing process Complete the signing operation
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