targetingTime
Target a banner by time.
You can use targeting by time to limit campaign impressions to certain days of the week or times of the day, including taking into account the user's time zone.
Request format
https://adfox.yandex.com/api/v1
? object=banner
& action=target
& actionObject=targetingTime
& objectID=<integer>
& isRedefined=<integer>
& [mode=<integer>]
& [hourNdayM=<integer>]
& [dayN=<integer>]
|
ID of the object that the action is performed on. |
|
Redefine targeting. Acceptable values:
|
|
Targeting options: by day of the week or by day of the month. Acceptable values:
Default value: |
|
Enable targeting by day of the week or by hour, where:
Acceptable values:
|
|
Enable targeting by day of the month, where N is the number of the day of the month, for example: Acceptable values:
|
* 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=banner&action=target&actionObject=targetingTime&objectID=474205&isRedefined=1
Response:
<response> <status> <code>0</code> </status> </response>
Other actions with the object
See more actions with the banner
object:
- Get a list of banners.
- Add a banner.
- Edit a banner.
- Get summary information on targeting at the banner level.
- Get information on banner placement.
- Get statistics on campaigns/banners/placements for the day.
- Target a banner by geography.
- Target a banner by keywords.
- Target a banner by URL.
- Target a banner by gender, age, or income.
- Target a banner by user characteristics.
- Target a banner by frequency.
Enable targeting by day of the month, where N is the number of the day of the month, for example: 1
is the first day of the month, 2
is the second day of the month.
Acceptable values:
-
0
: Disable. -
1
: Enable.
Required
ID of the object that the action is performed on.
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.
Targeting options: by day of the week or by day of the month.
Acceptable values:
-
0
: by day of the week. -
1
: by day of the month.
Default value: 0
.
Enable targeting by day of the week or by hour, where:
-
N
: An hour from 0 to 23. For example:0
— from 00:00 to 00:59,1
— from 01:00 to 01:59. -
M
: A day of the week from 1 to 7. For example:1
— Monday,2
— Tuesday,3
— Wednesday.
Acceptable values:
-
0
: Disable. -
1
: Enable.