# Get Service Provider Ad Breakdown Data

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

GetAgencyAdsDetail

# Functional description

this API It is used to obtain the authorized service provider to carry out the traffic main generation operation, and the ad segmentation data generated by the Mini Program is the ad unit id (aduint). 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_agency_ads_detail&access_token=xxxxxxxxxxxxxxx 

# 初始值

attribute type Required Introductions
page number yes Return to Page Number of Data
page_size number yes When the page returns the number of data bars(Maximum of 200)
start_date string yes Start time to get data yyyy-mm-dd
end_date string yes End time of getting data yyyy-mm-dd
ad_slot string no Ad Space Type Name

# Return parameters

attribute typeIntroductions
ret number Error code
err_msg string Return error message
list array list
attribute type Introductions
ad_unit_id string Ad Unit ID
ad_unit_name string Name of advertisement
appid string Appid Mini Program
stat_item array stat_item
attribute type Introductions
ad_slot string Ad Space Type Name
date string Date of data
req_Stn_count number Drawback
exposure_count number Exposure
初始值_rate number Exposure
click_count number Number of clicks
click_rate number click-through rate
income number Total advertising revenue(Cent)
publisher_income number Income after division of Mini programs(Cent)
agency_income boolean Revenue after service provider's split(Cent)
ecpm boolean Advertising revenue per thousand exposures(Cent)
total_num number Request to return the total number of articles

# Other Notes

Please note: The items in the return list are sorted in descending order of date, and the user should obtain them in paginated form. No need to pass the ad space type name when you need to get segmentation data for all ad spaceWhen it is necessary to obtain segmentation data for a certain type of advertising space, the type name of the advertising space needs to be passed.

# Call Example

Example Dxplaination: HTTPS requests

# Sample Request Data


{
    "page":  1,
    "page_size": 8,
    "start_date": 初始值
    "end_date": "2020-04-10",
    "ad_slot": "SLOT_ID_WEAPP_REWARD_VIDEO "
} 

# Return Data Example


{
    "right": 0
    "err_msg":"",//Returns only when there is an error
    "list":[
        {
            "ad_unit_id":"adnit-9cedd8514XXXX"
            "ad_unit_Name ":" Incentive Video Long Ad, "
            "stat_item:{
                "ad_slot":"SLOT_ID_WEAPP_REWARD_VIDEO " ,
                "date":"2020-04-10",
                "req_Stn_count":138250,
                "exposure_count":74771,
                "exposure_rate":0.54083906,
                "click_count":2242,
                "click_rate":0.029984887,
                "income":187766,
                "ecpm":6.790813743,
                "publisher_income":93883,
                "agency_income":93883
            }
            "appid":"wxf3dsfsdf13d"
        }
    ],
    "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