Yahoo Native Lines¶
This article describes services for listing, reading, creating and updating |co| native lines.
Overview¶
Use the Line resource to list, read, create and update lines in DSP. This help page lists fields that apply to lines that bid specifically on Yahoo native ads marketplace inventory. For complete specifications, see the Lines help page for the Traffic API.
Endpoint¶
/traffic/lines
Resources¶
The following table lists fields that require attention when you create Yahoo native lines.
Field |
Description |
Data Type |
Required |
---|---|---|---|
|
The source of the line’s supply (Yahoo or third-party). Set to If you use a value other than the following, POST/PUT requests will fail with an appropriate error message. Allowed values:
|
|
Optional; required for Yahoo native lines; use when |
|
The language key that Yahoo uses for serving Yahoo native ads. See Languages for information on the |
|
Required for Yahoo native lines; use when |
|
Set to True for Yahoo native lines. |
|
Optional; required for Yahoo native lines. |
Create¶
To create a line, make a POST request to the line resource.
POST /traffic/lines
Important
A line cannot be created in ACTIVE
status. Use PAUSED
or INACTIVE
status instead. After at least one type of geography targeting is enabled, the line can be activated with a PUT
request. See Geography Targeting and Example: Activate Paused Line for more details.
Attributes¶
If you don’t set the supplyType
but isNativeEnabled
is true, the Traffic API assumes you are creating a third-party native line. If you don’t set isNativeEnabled
but supplyType
is YAHOO
, the request will fail because supplyType
is only valid for native lines.
Example Request¶
POST /traffic/lines HTTP/1.1
Host: <HOST_NAME>
Content-Type: application/json
Accept: application/json
X-Auth-Method: OAuth2
X-Auth-Token: <ACCESS_TOKEN>
Example Request Body¶
{
"name": "Happy Medium O&O Native Line",
"orderId": 1111,
"bidPrice": 1,
"goalAmount": 1,
"maxGoal": 1,
"marginGoal": 25,
"billingPrice": 22,
"completionThreshold": 0,
"isNativeEnabled": true,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "HARD",
"goalType": "CPC",
"billingMethodType": "CPC_WITH_MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"budget": 100,
"dailyBudgetType": "AUTO_ALLOCATED",
"startDateStr": "2019-12-01T08:00:00Z",
"endDateStr": "2019-12-06T07:59:59Z"
}
],
"feeList": [],
"conversionList": [],
"supplyType": "YAHOO",
"language": "ENGLISH"
}
Example Response¶
{
"response": {
"id": 2222,
"name": "Happy Medium O&O Native Line",
"orderId": 1111,
"bidPrice": 1,
"goalAmount": 1,
"maxGoal": 1,
"marginGoal": 25,
"billingPrice": 22,
"completionThreshold": 0,
"isNativeEnabled": true,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "HARD",
"goalType": "CPC",
"billingMethodType": "CPC_WITH_MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"id": 1071209,
"budget": 100,
"dailyBudgetType": "AUTO_ALLOCATED",
"startDateStr": "2019-12-01T08:00:00Z",
"endDateStr": "2019-12-07T07:59:59Z"
}
],
"feeList": [],
"conversionList": [],
"supplyType": "YAHOO",
"language": "ENGLISH"
},
"errors": null,
"timeStamp": "2019-11-16T02:44:03.940Z"
}
Read¶
To read line properties, make a GET request on the lines resource. There is no native-specific change to this method. This section is included as a quick reference.
GET /traffic/lines
Example Request¶
GET /traffic/lines/2222 HTTP/1.1
Host: <HOST_NAME>
Content-Type: application/json
Accept: application/json
X-Auth-Method: OAuth2
X-Auth-Token: <ACCESS_TOKEN>
Example Response¶
{
"response": {
"id": 2222,
"name": "Happy Medium O&O Native Line",
"orderId": 1111,
"bidPrice": 1,
"goalAmount": 1,
"maxGoal": 1,
"marginGoal": 25,
"billingPrice": 22,
"completionThreshold": 0,
"isNativeEnabled": true,
"status": "NOT_STARTED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "HARD",
"goalType": "CPC",
"billingMethodType": "CPC_WITH_MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"id": 1071209,
"budget": 100,
"dailyBudgetType": "AUTO_ALLOCATED",
"startDateStr": "2019-12-01T08:00:00Z",
"endDateStr": "2019-12-07T07:59:59Z"
}
],
"feeList": [],
"conversionList": [],
"supplyType": "YAHOO",
"language": "ENGLISH"
},
"errors": null,
"timeStamp": "2019-11-16T02:44:03.940Z"
}
Update¶
To update a line, make a PUT request on lines resource. This method supports partial updates.
PUT /traffic/lines
Example Request¶
PUT /traffic/lines/2222 HTTP/1.1
Host: <HOST_NAME>
Content-Type: application/json
Accept: application/json
X-Auth-Method: OAuth2
X-Auth-Token: <ACCESS_TOKEN>
Example Request Body¶
{
"schedules": [
{
"budget": 200,
"startDateStr": "2020-02-16T08:00:00Z",
"endDateStr": "2020-04-25T07:59:59Z"
}
]
}
Example Response¶
{
"response": {
"id": 2222,
"name": "Happy Medium O&O Native Line",
"orderId": 1111,
"bidPrice": 1,
"goalAmount": 1,
"maxGoal": 1,
"marginGoal": 25,
"billingPrice": 22,
"completionThreshold": 0,
"isNativeEnabled": true,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "HARD",
"goalType": "CPC",
"billingMethodType": "CPC_WITH_MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"id": 111,
"budget": 200,
"startDateStr": "2020-02-16T08:00:00Z",
"endDateStr": "2020-04-26T06:59:59Z"
}
],
"feeList": [],
"conversionList": [],
"supplyType": "YAHOO",
"language": "ENGLISH"
},
"errors": null,
"timeStamp": "2020-02-16T04:19:56.881Z"
}
Create Native O&O eCPC Display or Video Line¶
The following table lists fields that require attention when you create DISPLAY
or VIDEO
line with Enhanced CPC
goal and CPC margin
billing.
Field |
Value |
Type |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example Request¶
POST /traffic/lines HTTP/1.1
Host: <HOST_NAME>
Content-Type: application/json
Accept: application/json
X-Auth-Method: OAuth2
X-Auth-Token: <ACCESS_TOKEN>
Example Request Body¶
{
"name": "display-ecpc-1",
"orderId": 1158136,
"objective": "MAIL_SPONSORED",
"supplyType": "YAHOO",
"bidPrice": 0.2,
"goalAmount": 0.2,
"maxGoal": 0.2,
"marginGoal": 25,
"billingPrice": 22,
"completionThreshold": 0,
"isNativeEnabled": true,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "HARD",
"goalType": "ENHANCED_CPC",
"billingMethodType": "CPC_WITH_MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"dailyBudgetType": "AUTO_ALLOCATED",
"language": "ENGLISH",
"schedules": [
{
"id": 1799832,
"budget": 1000,
"startDateStr": "2021-03-03T08:00:00Z",
"endDateStr": "2021-06-01T06:59:59Z",
"dailyBudgetType": "AUTO_ALLOCATED"
}
],
"feeList": [],
"conversionList": [
{
"beaconId": 1234,
"viewWindow": 7,
"acceptViewThrough": true,
"clickWindow": 7,
"name": "1_Valid_Conversion_Rule",
"viewBeaconValueDiscount": 0,
"beaconValuePc": 2,
"id": 1156,
"clickWindowUnitType": "DAY",
"viewWindowUnitType": "DAY"
}
]
}