targetingAge
Target a campaign by age.
Request format
https://adfox.yandex.com/api/v1
? object=campaign
& action=target
& actionObject=targetingAge
& objectID=<integer>
& age=<integer>
& ageValues=<integer>
|
ID of the object that the action is performed on. |
|
Enable targeting by age. Acceptable values:
|
|
Select the age value. The parameter is required if Acceptable values:
You can pass multiple values separated with a vertical line |
* Required
Response format
<response>
<status>
<code>{integer}</code>
</status>
</response>
Response parameters
|
Request processing status. For the key, see Error handling. |
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=campaign&action=target&actionObject=targetingAge&objectID=2783648&age=1&ageValues=1
Response:
<response> <status> <code>0</code> </status> </response>
Other actions with the object
See more actions with the campaign
object:
- Add a campaign.
- Get a list of campaigns.
- Delete a campaign.
- Edit a campaign.
- Get a list of campaign banners.
- Place a campaign on a site, a site section, or a placement.
ID of the object that the action is performed on.
Enable targeting by age.
Acceptable values:
-
0
: Disabled. -
1
: Enabled.
Select the age value.
The parameter is required if age=1
.
Acceptable values:
-
1
: Under 18. -
2
: From 18 to 24. -
3
: From 25 to 34. -
4
: From 35 to 44. -
5
: Over 45 (the value is deprecated, it includes values 6 and 7 automatically). -
6
: From 45 to 54. -
7
: Over 55.
You can pass multiple values separated with a vertical line |
without spaces.
Required