targetingTime
Target a campaign on the placement by time.
Request format
https://adfox.yandex.com/api/v1
? object=campaign
& action=targetPlace
& actionObject=targetingTime
& objectID=<integer>
& placeID=<integer>
& isRedefined=<integer>
& [impressionsPerN=<integer>]
& [impressionsPerNPerHour=<integer>]
& [isClientTime=<integer>]
& [mode=<integer>]
& [hourNdayM=<integer>]
& [dayN=<integer>]
|
ID of the object that the action is performed on. |
|
Placement ID. |
|
Redefine targeting. Acceptable values:
|
|
The total number of impressions per day, where N is the number of the day:
The parameter value is the number of impressions from 1 to 2,147,483,647. For example, 10 impressions on Tuesday: |
|
The total number of impressions per hour, where N is the number of the day:
The parameter value is the number of impressions from 1 to 2,147,483,647. For example, 10 impressions per hour on Tuesdays: |
|
Use the website user's time. Targeting is applied by the user's time zone. All statistics are displayed using the GMT+3:00 time zone. 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=campaign&action=targetPlace&actionObject=targetingTime&objectID=474205&placeID=345&isRedefined=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.
Placement ID.
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.
The total number of impressions per day, where N is the number of the day:
-
1
: Monday. -
2
: Tuesday. -
3
: Wednesday. -
4
: Thursday. -
5
: Friday. -
6
: Saturday. -
7
: Sunday.
The parameter value is the number of impressions from 1 to 2,147,483,647.
For example, 10 impressions on Tuesday: impressionsPer2=10
.
The total number of impressions per hour, where N is the number of the day:
-
1
: Monday. -
2
: Tuesday. -
3
: Wednesday. -
4
: Thursday. -
5
: Friday. -
6
: Saturday. -
7
: Sunday.
The parameter value is the number of impressions from 1 to 2,147,483,647.
For example, 10 impressions per hour on Tuesdays: impressionsPer2PerHour=10
.
Use the website user's time. Targeting is applied by the user's time zone. All statistics are displayed using the GMT+3:00 time zone.
Acceptable values:
-
0
: Use GMT+3:00. -
1
: Use the website visitor's time.
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.
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