targetingGeobase

Target campaign placement in the site section by geography.

Request format

https://adfox.yandex.com/api/v1
  ? object=campaign
  & action=targetZone
  & actionObject=targetingGeobase
  & objectID=<integer>
  & zoneID=<integer>
  & isRedefined=<integer>
  & geo=<integer>
  & [global=<integer>]
  & [regions=<string>]

objectID*

ID of the object that the action is performed on.

zoneID*

Site section ID.

isRedefined*

Redefine targeting.

Acceptable values:

  • 0: Inherit targeting settings from a higher level. Level hierarchy from top to bottom:

    • Campaign.
    • Campaign on the site.
    • Campaign in the site section.
    • Campaign on the placement.
    • Banner.
  • 1: Cancel targeting settings at higher levels and use the settings of the current level.

geo*

Enable targeting by geography.

Acceptable values:

  • 0: Disable.
  • 1: Enable.

global

Setting up the Whole world option, which you can use to specify the targeting logic:

  • Allow everything except: If there are fewer objects to exclude, enable the Whole world option and exclude certain objects from the list.

  • Prohibit everything except: If you want to enable impressions only for certain objects, disable the Whole world option and include the necessary objects in the list.

Acceptable values:

  • 0: Reset. Inherited from the parent element.
  • 1: Allowed.
  • 2: Forbidden.

regions

Specify the targeting status for regions.

Entry format: {"Region ID":value,"Region ID":value}.

Acceptable values:

  • 0: Reset. Inherited from the parent element.
  • 1: Allowed.
  • 2: Forbidden.

For example, regions={"225":1} allows impressions in Russia.

You can also configure the Whole world option using the regions parameter with ID=10000. This setting takes priority over the value that's passed in the global parameter.

* Required

Response format

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

Response parameters

code

Request processing status. For the key, see Error handling.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=campaign&action=targetZone&actionObject=targetingGeobase&objectID=474205

Response:

<response>
<status>
  <code>0</code>
</status>
</response>

Other actions with the object

See more actions with the campaign object: