# Get service provider billing revenue data

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

GetAgencySettlement

# Functional description

this API Used to obtain service provider billing revenue data. 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/operationams?action=get_agency_settled_revenue&access_token=xxxxxxxxxxxxxxx 

# Request parameters

attribute type 初始值 Introductions
page number yes Number of data returned
page_size number yes Number of returned data bars per page
start_date string yes Start time to get data yyyy-mm-dd
end_date string yes End time to get data yyyy-mm-dd

# Return parameters

attribute typeIntroductions
ret number Error code
err_msg string Return error message
revenue_all number Accumulated income
penalty_all number Amount deducted
settled_revenue_all number Amount settled
settlement_list array settlement_list
attribute type Introductions
date string Data update time
zone string Date interval
month string Month of Revenue
order number 1 = First Half Moon, 2 = Second half
sett_status number 1 = Settlement2、3 = Settled4 = Payment in progress5 = Paid
settled_revenue number Interval settlement income
初始值_no string Statement No.
mail_send_cnt string Number of requests for replacement statement
slot_revenue array slot_revenue
</初始值>
attribute type Introductions
slot_id string Advertising space generating revenue
slot_settled_revenue number The amount of advertising space settlement
total_num number Request to return the total number of articles

# Other Notes

  1. Return settlement_The list is arranged in descending order of date, and users should obtain it in paginated form. As long as there is overlap with the start and end time of the data acquisition, the data corresponding to the settlement interval will be returned. For example, a request for data from February 11 to March 26 will return data for the first half of February, the second half of February, the first half of March, and the second half of March.

# Call Example

Example Dxplaination: HTTPS requests

# Sample Request Data


{
    "page":  1,
    "page_size": 8,
    "start_date": "2020-03-01",
    "end_date": "2020-03-16"
} 

# Return Data Example


{
    "right": 0,
    "err_msg":"OK"
    "body": "Shenzhen Tencent Computer Systems Limited Company,"
    "penalty_all":0,
    "revenue_all":5178368698,
    "settled_revenue_all":2613696765,
    "settlement_list":[
        {
            "date":"2020-03-25",
            "Zone": "March 1-15, 2020"
            "month":"202003",
            "order":1,
            "sett_status:
            "settled_revenue":718926045,
            "sett_no":"XXX",
            "mail_send_cnt":"0"
            "slot_revenue":[
                {
                    "slot_id":"SLOT_ID_WEAPP_BANNER",
                    "slot_settled_revenue":34139443
                },
                {
                    "slot_id":"SLOT_ID_WEAPP_REWARD_VIDEO " ,
                    "slot_settled_revenue":684786602
                }
            ]
        }
    ],
    "total_number: 1
} 

# 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