targetingUser

Target a campaign by user characteristics.

All values are enabled by default. For this reason, you need to disable v0 — which represents the unknown, not set value — to ensure that your targeting works correctly. To do this, specify v0=0 in your request.

Request format

https://adfox.yandex.com/api/v1
  ? object=campaign
  & action=target
  & actionObject=targetingUser
  & objectID=<integer>
  & criteriaId=<integer>
  & vN=<integer>

objectID*

ID of the object that the action is performed on.

criteriaId*

Characteristic ID.

Acceptable values:

  • 1≤N≤63, where N is the characteristic number from 1 to 63 inclusive.

vN*

Where N in the parameter name is the ID of a characteristic value.

Acceptable values:

  • 0: Disable.
  • 1: Enable.

All values are enabled by default. For this reason, you need to disable the unknown, not set value to ensure that your targeting works correctly:

  • v0: the unknown, not set value.
  • v0=0 disables the unknown, not set value.

* Required parameter

Response format

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

Response parameters

code

Request processing status. A value of 0 means the request was completed successfully. For the key, see Error handling.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=campaign&action=target&actionObject=targetingUser&objectID=474205&criteriaId=1&v0=0&v5345=1

Response:

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

Other actions with the object

Read also about other actions with the campaign object:

The ID of the object that the action is performed on.

The ID of a characteristic.

Acceptable values: 1≤N≤63, where N is the characteristic number from 1 to 63 inclusive.

Where N in the parameter name is the ID of a characteristic value.

Acceptable values:

  • 0: Disable.

  • 1: Enable.

Required parameter.