targetingFrequency

Target a campaign on the placement by frequency.

Request format

https://adfox.yandex.com/api/v1
  ? object=campaign
  & action=targetPlace
  & actionObject=targetingFrequency
  & objectID=<integer>
  & placeID=<integer>
  & isRedefined=<integer>
  & [maxUniqueImpressions=<integer>]
  & [maxUniqueClicks=<integer>]
  & [datePeriod=<YYYY-MM-DD>]
  & [frequencyTypeImpressions=<integer>]
  & [uniquePeriodImpressions=<HH:mm>]
  & [impressionsPerPeriod=<integer>]
  & [minimalPeriodImpressions=<HH:mm:ss>]
  & [frequencyTypeClicks=<integer>]
  & [uniquePeriodClicks=<HH:mm>]
  & [clicksPerPeriod=<integer>]
  & [minimalPeriodClicks=<HH:mm:ss>]

objectID*

ID of the object that the action is performed on.

placeID*

Placement 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.

maxUniqueImpressions

Frequency of the user's contact with the campaign. Maximum number of impressions per user.

Acceptable values: an integer from 1 to 2,147,483,647.

maxUniqueClicks

Frequency of the user's contact with the campaign. Maximum number of clicks per user after which ad display is limited.

Acceptable values: an integer from 1 to 2,147,483,647.

datePeriod

Frequency of the user's contact with the campaign. Start date of the period when the set limit of impressions or clicks is in effect.

Date format: YYYY-MM-DD.

frequencyTypeImpressions

Frequency of the user's contact with the campaign. Impression frequency period.

Acceptable values:

  • 0: Not set.
  • 1: An hour.
  • 2: Four hours.
  • 3: Six hours.
  • 4: 12 hours.
  • 5: 24 hours.
  • 6: A week.
  • 7: A month.
  • 8: Other period.
  • 9: 14 days.

Default value: 0.

uniquePeriodImpressions

Frequency of the user's contact with the campaign.

If you set impression frequency to other period (frequencyTypeImpressions=8), specify your own period for serving banners to a unique user in hours and minutes.

Time format: HH:mm.

impressionsPerPeriod

Frequency of the user's contact with the campaign. Number of impressions per period.

minimalPeriodImpressions

Frequency of the user's contact with the campaign. Minimum period between banner impressions for a unique user (hours:minutes:seconds).

Time format with seconds: HH:mm:ss.

frequencyTypeClicks

Frequency of the user's contact with the campaign. Click frequency period.

Acceptable values:

  • 0: Not set.
  • 1: An hour.
  • 2: Four hours.
  • 3: Six hours.
  • 4: 12 hours.
  • 5: 24 hours.
  • 6: A week.
  • 7: A month.
  • 8: Other period.
  • 9: 14 days.

Default value: 0.

uniquePeriodClicks

Frequency of the user's contact with the campaign.

If you set click frequency to other period (frequencyTypeClicks=8), specify your own period. If the user clicks the banner the maximum allowed number of times during the period, the banner impressions for this user are limited until the end of the period.

Time format: HH:mm.

clicksPerPeriod

Frequency of the user's contact with the campaign. Number of clicks per period.

Acceptable values: an integer from 1 to 2,147,483,647.

minimalPeriodClicks

Frequency of the user's contact with the campaign. Minimum period between clicks (hours:minutes:seconds).

Time format with seconds: HH:mm:ss.

* 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=targetPlace&actionObject=targetingFrequency&objectID=474205&placeID=321&isRedefined=1&maxUniqueImpressions=2

Response:

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

Other actions with the object

See more actions with the campaign object: