# To obtain information about the ad space (except the cover ad space) or the designated ad unit
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
GetAdunitList
# Functional description
this API Used to query the advertising space (except the cover advertising space) or the information of the designated advertising unit. If you encounter problems during use, you canOpen Platform Service Provider Zone Exchange Zone | WeChat Open CommunityPosting exchanges.
# Note
Where access_Token forauthorizer_access_Token
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/wxa/operationams?action=agency_get_adunit_list&access_token=xxxxxxxxxxxxxxx
# Request parameters
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 |
ad_slot | string | no | Ad Space Type Name |
ad_unit_id | string | no | Ad Unit ID |
# Return parameters
attribute | type | Introductions | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ret | number | Error code | |||||||||||||||||||||||||||||||||||||||||
err_msg | string | Error message | |||||||||||||||||||||||||||||||||||||||||
ad_unit | array | ad_unit | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
total_num | number | Total Ad Unit Data Volume |
# Other Notes
(1) The list of returned advertising units is in reverse order according to the creation time, and the user is requested to obtain it in the form of pagination. When you need to get a list of all advertising bits, you do not need to pass the advertising bit type name and ad unit IDWhen you need to get a list of a certain type of ad space, just pass the ad space type nameWhen you need an advertisement. id Only the ad unit ID needs to be passed.
# Advertisement Type Name Dxplaination
Name of type ad_slot/type) | Type of advertising space |
---|---|
SLOT_ID_WEAPP_BANNER | Mini Program banner |
SLOT_ID_WEAPP_REWARD_VIDEO | Mini Program Motivational Video |
SLOT_ID_WEAPP_INTERSTITIAL | Mini Program Screen Advertising |
SLOT_ID_WEAPP_VIDEO_FEEDS | Mini Program Video Ads |
SLOT_ID_WEAPP_VIDEO_BEGIN | Mini Program video patch ads |
SLOT_ID_WEAPP_COVER | Mini Program Cover Ads |
SLOT_ID_WEAPP_TEMPLATE | Mini Program template advertisement |
# Call Example
Example Dxplaination: HTTPS requests
# Sample Request Data
{
"page": 1,
"page_size": 8,
"ad_unit_id": "adnit-44e668410cxxxx"
"ad_slot": "SLOT_初始值_WEAPP_REWARD_VIDEO "
}
# Return Data Example
{
"base_Responsive:
"err_msg":"OK"
"right": 0
},
"ad_unit":[
{
"ad_slot":"SLOT_ID_WEAPP_REWARD_VIDEO " ,
"ad_unit_id":"adunit-e9418ee19XXXXX",
"ad_unit_name":"rewaXXXX",
"ad_unit_size":[
{
"height":166,
"width":582
}
],
"ad_unit_status:
"ad_unit_type":"AD_UNIT_TYPE_REWARED_VIDEO " ,
"appid":"wx0afc78670fXXXX"
" video_duration_max":30,
" video_duration_min:6
}
],
"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 |
1735 | The merchant has not completed the agreement signing process | Complete the signing operation |
1737 | Operating too fast | Wait a minute and reoperate |
1807 | Invalid Flow Master | Turn on the traffic master for this appid through the turn on traffic master interface |
2009 | Invalid Flow Master | Turn on the traffic master for this appid through the turn on traffic master interface |
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 |