zone

Add a site section.

Request format

https://adfox.yandex.com/api/v1
  ? object=account
  & action=add
  & actionObject=zone
  & name=<string>
  & siteID=<integer>
  & [categoryID=<integer>]
  & [isAutoReferer=<integer>]
  & [templateTypeID=<integer>]
  & [template=<string>]
  & [templateExcluded=<string>]

name*

Object name. An entry can contain Russian and Latin letters, numbers, and any special characters.

siteID*

ID of the site where the section is created.

See also:

categoryID

Category ID.

See also:

isAutoReferer

Dynamic definition of a site section by referer.

Each banner request contains information about the page address (referer) that the request comes from.

If you enable this option, you can use the ad tag from the site level. The system will use the "referer" field in the request to automatically determine the site section that the request applies to.

If you disable this option, you must use ad tags from the placement level.

Acceptable values:

  • 1: Enabled.
  • 0: Disabled. Default value: 1.

templateTypeID

Page template type. To learn more about template types, see Referer templates.

Acceptable values:

  • 0: Standard.
  • 1: POSIX.2.

Default value: 0.

template

Specify the page templates to be used to check the received address in the banner request.

Sample entry:

  • For the standard template:
    ٭site.com/index.php
    
  • For POSIX.2:
    homer-simpson-tv\.blog4ever\.com|forum\.rojadirecta\.org|^hidan\.eklablog\.com.٭|^aniworld\.spb\.ru\/.٭\/adfox\/.٭s$
    

An entry can contain Russian and Latin letters, numbers, and any special characters.

templateExcluded

Page templates that must not belong to this site section.

Sample entry:

  • For the standard template:

    http://٭website.com
    

    Addresses that use this template: http://website.com, http://example.website.com.

  • For POSIX.2:

    homer-simpson-tv\.blog4ever\.com|forum\.rojadirecta\.org|^hidan\.eklablog\.com.٭|^aniworld\.spb\.ru\/.٭\/adfox\/.٭s$
    

    Addresses that use this template:

    • homer-simpson-tv.blog4ever.com
    • http://homer-simpson-tv.blog4ever.com/?a=1212
    • forum.rojadirecta.org
    • https://www.forum.rojadirecta.org/?b=123
    • hidan.eklablog.com/?b=123
    • aniworld.spb.ru/123/adfox/s

An entry can contain Russian and Latin letters, numbers, and any special characters.

* Required

Response format

<response>
<status>
  <code>{integer}</code>
  <ID>{integer}</ID>
</status>
</response>

Response parameters

code

Request processing status. If the value is 0, the request was completed successfully. For the key, see Error handling.

ID

Object ID.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=account&action=add&actionObject=zone&name=news&siteID=39939&isAutoReferer=1&templateTypeID=0&template=http://site.com&templateExcluded=http://*site.com/*

Response:

<response>
<status>
  <code>0</code>
  <ID>84438</ID>
</status>
</response>

Request:

https://adfox.yandex.com/api/v1?object=account&action=add&actionObject=zone&name=news&siteID=39939

Response:

<response>
<status>
  <code>0</code>
  <ID>84438</ID>
</status>
</response>

Other actions with the object

See more actions with the zone object:

Page templates that must not belong to this site section.

Sample entry:

  • For the standard template:

    http://٭website.com
    

    Addresses that use this template: http://website.com, http://example.website.com.

  • For POSIX.2:

    homer-simpson-tv\.blog4ever\.com|forum\.rojadirecta\.org|^hidan\.eklablog\.com.٭|^aniworld\.spb\.ru\/.٭\/adfox\/.٭s$
    

    Addresses that use this template:

    • homer-simpson-tv.blog4ever.com
    • http://homer-simpson-tv.blog4ever.com/?a=1212
    • forum.rojadirecta.org
    • https://www.forum.rojadirecta.org/?b=123
    • hidan.eklablog.com/?b=123
    • aniworld.spb.ru/123/adfox/s

An entry can contain Russian and Latin letters, numbers, and any special characters.

Required

Object name. An entry can contain Russian and Latin letters, numbers, and any special characters.

ID of the site where the section is created.

See also:

Category ID.

See also:

Dynamic definition of a site section by referer.

Each banner request contains information about the page address (referer) that the request comes from.

If you enable this option, you can use the ad tag from the site level. The system will use the "referer" field in the request to automatically determine the site section that the request applies to.

If you disable this option, you must use ad tags from the placement level.

Acceptable values:

  • 1: Enabled.

  • 0: Disabled.

Default value: 1.

Page template type. To learn more about template types, see Referer templates.

Acceptable values:

  • 0: Standard.

  • 1: POSIX.2.

Default value: 0.

Specify the page templates to be used to check the received address in the banner request.

Sample entry:

  • For the standard template:

    ٭site.com/index.php
    
  • For POSIX.2:

    homer-simpson-tv\.blog4ever\.com|forum\.rojadirecta\.org|^hidan\.eklablog\.com.٭|^aniworld\.spb\.ru\/.٭\/adfox\/.٭s$
    

An entry can contain Russian and Latin letters, numbers, and any special characters.

Previous