addValue

Add a value for a custom targeting characteristic.

Request format

https://adfox.yandex.com/api/v1
  ? object=userCriteria
  & action=addValue
  & criteriaID=<integer>
  & userID=<string>
  & name=<string>
  & [isOn=<integer>]

criteriaID*

User characteristic ID.

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

userID*

The ID passed to the ad tag.

name*

Object name.

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

isOn

The targeting setting of current campaigns when adding a new characteristic value.

Acceptable values:

  • 0: Don't target by the new value. A new characteristic value is disabled when added to existing campaigns and banners, regardless of previous targeting settings, and won't affect ad impressions.

  • 1: Target by the new value. When added to existing campaigns and banners, a new characteristic value is:

    • Enabled: If all previously added values are included in the targeting of this characteristic (the object isn't targeted). The value will affect ad impressions.
    • Disabled: If there's at least one disabled value in the targeting of this characteristic (the object was targeted). The value won't affect ad impressions.

Default value: 0.

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=userCriteria&action=addValue&criteriaID=1&userID=man&name=man&isOn=0

Response:

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

Other actions with the object

Read about other actions with the userCriteria object:

User characteristic ID.

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

The ID passed to the ad tag.

Object name.

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

Required parameter.

The targeting setting of current campaigns when adding a new characteristic value.

Acceptable values:

  • 0: Don't target by the new value. A new characteristic value is disabled when added to existing campaigns and banners, regardless of previous targeting settings, and won't affect ad impressions.

  • 1: Target by the new value. When added to existing campaigns and banners, a new characteristic value is:

    • Enabled: If all previously added values are included in the targeting of this characteristic (the object isn't targeted). The value will affect ad impressions.
    • Disabled: If there's at least one disabled value in the targeting of this characteristic (the object was targeted). The value won't affect ad impressions.

Default value: 0.