- 2 Minutes to read
Day Parting Targeting
- 2 Minutes to read
This article describes resources that enable you to read and define day parting targeting.
Overview
Day parting enables you to target ad placement opportunities during specific days of the week and hours of the day.
The days of the week and hours of the day targeted are specified in the dayParting
object.
The Yahoo DSP supports ENHANCED_DAY_PARTING
targeting for lines serving display and video ads. Day parting is not supported for lines serving native ads.
Endpoint
/traffic/lines/{id}/targeting
A
GET
request enables you to view day parting schedules targeted by the specified line.A
POST
request enables you to target day parting schedules with the specified line.
Resources
Parameter | Parameter Type | Description | Data Type | Required |
---|---|---|---|---|
| path | Specifies the line ID. |
| Y |
| body | Specifies a The |
| Y |
| body | Specifies an array of targeting types to update, enable, or disable.
To learn more, refer to Targeting Types. |
| Y |
Day Parting Object
The dayParting
object defines the days of the week and hours of the day that are targeted by a specific line.
The dayParting
object consists of array objects that represent the days of the week: sunday
, monday
, tuesday
, wednesday
, thursday
, friday
, saturday
. Each day-of-the-week array specifies the hours of the day targeted. Valid values are integers between 0 and 23 with 0
representing 12 a.m. and 23
representing 11 p.m.
If a day-of-the-week array is an empty array or contains all possible values (0-23), the entire day is targeted.
Field | Description | Data Type |
---|---|---|
| An array of integers that specify the hours of the day targeted. Valid values: [0-23]. |
|
| An array of integers that specify the hours of the day targeted. Valid values: [0-23]. |
|
| An array of integers that specify the hours of the day targeted. Valid values: [0-23]. |
|
| An array of integers that specify the hours of the day targeted. Valid values: [0-23]. |
|
| An array of integers that specify the hours of the day targeted. Valid values: [0-23]. |
|
| An array of integers that specify the hours of the day targeted. Valid values: [0-23]. |
|
| An array of integers that specify the hours of the day targeted. Valid values: [0-23]. |
|
Note
For a complete list of targeting resource fields, refer to Targeting Object.
Add/Update Day Parting Targeting
Adds or updates dayParting
targets for the specified line.
POST traffic/lines/{id}/targeting/
The dayParting
object defines the days of the week and hours of the day that are targeted by a specific line. To learn more, see Day Parting Object.
Parameters
The line ID is specified in the path of the URL. All other parameters are specified in the body of the application/json
payload.
Example Request URL
POST https://dspapi.admanagerplus.yahoo.com/lines/365277/targeting/
Example Request Body
{
"dayParting": {
"sunday": [],
"monday": [
3
],
"tuesday": [
4,
5,
7
]
},
"types": [
{
"name": "ENHANCED_DAY_PARTING",
"isTargeted": true
}
]
}
Example Response
{
"response": {
"types": [
{
"name": "ENHANCED_DAY_PARTING",
"isTargeted": true
}
],
"dayParting": {
"monday": [
3
],
"tuesday": [
4,
5,
7
]
},
"errors": null,
"timeStamp": "2018-01-12T01:57:40Z"
}
}