# Set the default split ratio

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

SetShareRatio

# Functional description

For a detailed introduction of the main generation operation of the Mini Program traffic, as well as the use of steps, frequently asked questions, etc., please seeIntroduction of Small Program Flow Main Generation OperationThis article is the interface document for Mini Program traffic master operation function

this API For service providers to set the proportion of all Mini Program advertising revenue. 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=set_share_ratio&access_token=xxxxxxxxxxxxxxx 

# Request parameters

attribute type Required Introductions
share_ratio number yes The service provider default split proportion. 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.

# Return parameters

attribute type Introductions
ret number Error code
err_msg string Error message

# Call Example

Example Dxplaination: HTTPS requests

# Sample Request Data


{
    "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