updateDefaultBanner
Add a backup ad at the banner type level.
The default banner is the banner code that's served if no banner from commercial campaigns can be served now.
You can set default banners at the placement and/or banner type level.
If the backup ad isn't set for the placement, the backup ad set for the banner type is served. If a backup ad isn't set for the banner type, either, the server returns a placeholder that doesn't affect placement display on the site.
Request format
https://adfox.yandex.com/api/v1
? object=bannerType
& action=updateDefaultBanner
& objectID=<integer>
& mode=<integer>
& [defaultImageURL=<string>]
& [defaultHitURL=<string>]
& [defaultWidth=<integer>]
& [defaultHeight=<integer>]
& [defaultCode=<string>]
& [defaultCodeType=<integer>]
|
|
ID of the object that the action is performed on. |
|
|
Mode for using the backup ad. Acceptable values:
Default value: |
|
|
Default banner image URL. Only for If |
|
|
Specify the URL to go to from the default banner. Only for |
|
|
Image width in pixels. Only for |
|
|
Image height in pixels. Only for |
|
|
Backup ad. Only for |
|
|
Onle for Ad tag type. Acceptable values:
Default value: |
Response format
<response>
<status>
<code>{integer}</code>
</status>
</response>
Response parameters
|
|
Request processing status. If the value is |
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=bannerType&action=updateDefaultBanner&objectID=234&mode=0Response:
<response> <status> <code>0</code> </status> </response>
Other actions with the object
See more actions with the bannerType object:
- Add a banner type.
- Get a list of banner types.
- Delete a banner type.
- Edit a banner type.
- Get a list of templates.
ID of the object that the action is performed on.
Mode for using the backup ad.
Acceptable values:
0: File (only for standard and nondimensional banner types).1: Code.
Default value: 0.
Default banner image URL.
Only for mode=0 and the Standard and Nondimensional banner types.
If defaultImageURL is specified, the defaultHitURL parameter is required.
Specify the URL to go to from the default banner.
Only for mode=0 and the Standard and Nondimensional banner types.
Image width in pixels.
Only for mode=0 and Nondimensional banner type.
Image height in pixels.
Only for mode=0 and Nondimensional banner type.
Backup ad.
Only for mode=1 and Nondimensional banner type.
Onle for mode=1.
Ad tag type.
Acceptable values:
0— HTML;1— JavaScript.
Default value: 0.
Required parameter.