- 25 Minutes to read
Lines
- 25 Minutes to read
Line budgets, bidding, and billing are tied together in support of a line goal. The line optimizes bidding towards an objective. But line goals are always always constrained by media, budget, and billing configurations that define that line.
Overview
In Yahoo DSP, a line is a subcomponent of a campaign that specifies an advertising strategy. Yahoo DSP defines each line by one or more ads, a goal type, and a set of budgetary and targeting parameters.
Each line item should represent a distinct targeting strategy. Using lines, a campaign can independently target diverse exchanges, deals, locations, demographics, ad positions, frequency, audiences, devices, days of the week, apps, URLs, page relevancy, mobile carriers, and languages.
Although you can specify budgets at both the campaign and line level; flight dates, frequency caps, and budgets specified at the campaign level override line-level configurations.
Endpoint
/traffic/lines
The action taken depends on the HTTP method and the parameters specified.
Use the
GET
method to read an existing line.Use the
POST
method to create a new line.Use the
PUT
method to update an existing line.
Resources
The platform provides the following resources for managing and tracking lines:
lines
schedules
feeList
conversionList
Line Object
The Line
object contains the following fields:
Field | Description | Data Type | Create | Update |
---|---|---|---|---|
| Specifies the line ID. |
| N/A | Required |
| Specifies the unique name of the line. |
| Required | Optional |
| Specifies the campaign ID. To learn more, refer to Campaigns. |
| Required | Optional |
| Specifies the media type served by the line. Allowed values:
Once the line is created, this value cannot be changed. |
| Required | N/A |
| Specifies the current status of the line. Allowed values:
The following status types are read-only:
|
| Required | Optional |
| Specifies the goal type the platform will use to optimize line performance. Different goal types are available depending on the Display Line
Video Line
Audio Line
Connected TV (CTV) Line
|
| Required | Optional |
| Specifies the goal mode. The goal mode determines whether the optimizes for line delivery or line performance. Allowed values:
Only valid when |
| Optional | Optional |
| Specifies the target amount for certain goal types. Required when |
| Required | Optional |
| Specifies the maximum bid price (Maximum CPM Price) allowed for certain goal types. |
| Required | Optional |
| Specifies the maximum goal price. Required when |
| Required | Optional |
| Specifies the margin percentage. Required when |
| Required | Optional |
| Specifies if the line can serve native ads. Native ads are not supported at this time for video lines.
Once the line is created, this value cannot be changed. If not specified when creating the line, defaults to |
| Optional | N/A |
| Specifies the pacing mode. Allowed values:
If not specified when creating the line, defaults to |
| Optional | Optional |
| Specifies the percentage over the daily budget that the line may spend per day. Ahead pacing is the product of the even pacing value multiplied by the pacing acceleration value: Required if the value of |
| Required | Optional |
| Defines the objective of the app marketing line. It can be set for a line with CPI goal type. Allowed values:
Required when |
| Optional | Optional |
| The URL of the app that line is running for. It should be Google app URL if the line is targeting Android devices and Apple store app URL if the line is targeting IOS devices. Example values: Required when |
| Optional | Optional |
| The region (country) of the Google play store or Apple app store where the app is uploaded. Allowed values:
Required when |
| Optional | Optional |
| The app ID is generated based on the appUrl and appLocale provided. Example values: com.espn.score_center, 389801252 |
| N/A | N/A |
| Specifies whether the line uses impression-based budgeting or budgeting based on US dollars for the line. Allowed values:
|
| Optional | Optional |
| Specifies the billing method. Allowed values:
|
| Required | Optional |
| Specifies the amount paid based on the specified
|
| Optional | Optional |
| Specifies how the margin is calculated. Allowed values:
Note: This is available to self-serve accounts only. |
| Required | Optional |
| Specifies the completion threshold percentage. Required when |
| Required | Optional |
| Specifies either a single budget schedule or multiple budget schedules. To learn more, refer to Schedules Object. Note: Multiple schedules are supported only when budgetType is CURRENCY. |
| Required | Optional |
| Track external costs such as ad serving, measurement, and brand safety costs. To help you better manage your margins, you can add up to six variable CPM costs to each line for tracking purposes. To learn more, refer to FeeList Object. Note: This is available to self-serve accounts only. |
| Optional | Optional |
| Yahoo DSP can optimize a line with multiple conversion rules when you establish conversion values. To learn more, refer to ConversionList Object. |
| Optional | Optional |
| A bid multiplier is a targeting-specific configuration that specifies the relative weight that should be given to targeted ad placement opportunities. To learn more, refer to Bid Multiplier Cap Object. |
| N/A | N/A |
| Specifies the type of media used to build the line’s creatives. Allowed values:
Once the line is created, this value cannot be changed. |
| Optional | N/A |
| Set to
Important:
|
| Optional | Optional |
| Allows you to disable bid shading for a line.
Note: Set to |
| Optional | Optional |
| The ID of the custom algorithm rule set up at the advertiser level. |
| Required for Build Your own Algorithm (BYOA) | Required for Build Your own Algorithm (BYOA) |
| This acts as a failsafe mechanism, as it will limit how high the BYOA bids can go. If this is not indicated, the “Max CPM” will act as that limit. BYOA multiplier cap is mandatory when a line is associated with BYOA and the value should be greater than 0. Lines cannot have BYOA multiplier cap when it is not associated with BYOA. |
| Required for Build Your own Algorithm (BYOA) | Required for Build Your own Algorithm (BYOA) |
Schedules Object
The schedules
object contains the following fields:
Field | Description | Data Type | Create | Update |
---|---|---|---|---|
| Specifies ID of the budget schedule. |
| N/A | N/A |
| Specifies the name of the schedule. Required when specifying multiple schedules. |
| Required | Optional |
| Specifies the start date of the line in the yyyy-MM-dd format. |
| Required | Required |
| Specifies the end date of the line in the yyyy-MM-dd format. |
| Required | Required |
| Specifies the total budget of the line. Required when the |
| Required | Optional |
| Specifies the daily budget amount. Required when the |
| Required | Optional |
| Specifies the total number of impressions bought. Required when |
| Required | Optional |
| Specifies the total number of impressions bought per day. Required when |
| Required | Optional |
| Specifies the daily budget type. Allowed values:
|
| Required | Optional |
| Specifies whether to delete a schedule. To delete a schedule, set the value to Note: Only schedules that are set in the future and part of a multi-schedule line can be deleted. |
| N/A | Optional |
FeeList Object
Note
This feature is only available for self-serve accounts.
The feeList
object contains the following fields:
Field | Description | Data Type | Create | Update |
---|---|---|---|---|
| Specifies the line fee ID. |
| N/A | Required |
| Specifies a user-defined name. |
| Required | Optional |
| Specifies the CPM amount: the amount you must pay per thousand impressions. |
| Required | Optional |
| Specifies the variable cost type. Allowed values:
Note: Once a variable cost is created, its type cannot be changed. |
| Required | N/A |
ConversionList Object
Yahoo DSP can optimize a line with multiple conversion rules when you establish conversion values.
To obtain the available conversions, refer to Read Advertiser Beacon Lookups.
Each entry in the conversionList
object contains the following fields:
Field | Description | Data Type | Create | Update |
---|---|---|---|---|
| Specifies the conversion pixel ID. |
| N/A | Required |
| Name of the conversion pixel. The name can not be specified or changed. |
| N/A | N/A |
| Specifies the conversion pixel ID. |
| Required | Required |
| Specifies the line ID. Note: When updating an existing conversion, setting this field to |
| Optional | Required |
| Specifies whether a view through is accepted. |
| Required | Optional |
| Specifies the amount of time after a click that the conversion is tracked. |
| Required | Optional |
| Specifies the click window unit type. Allowed values:
|
| Required | Optional |
| Specifies the time after the impression that conversion is tracked. |
| Required | Optional |
| Specifies the unit type of the view window. Allowed values:
|
| Required | Optional |
| Specifies the discount value percentage. If no value is specified, defaults to Note: |
| Optional | Optional |
| Specifies the value of each conversion. |
| Required | Optional |
| Specifies if the conversion pixel is for reporting purposes only. This option can only be employed when line
|
| Optional | Optional |
Bid Multiplier Cap Object
The bidMultiplierCap
object contains the following fields:
Field | Description | Data Type | Create | Update |
---|---|---|---|---|
| The current bid multiplier cap for the line. |
| N/A | N/A |
Read Line
Get data for a specific line.
GET /traffic/lines/{id}
Parameters
Parameters | Parameter Type | Description | Data Type | Required |
---|---|---|---|---|
| path | Specifies the line ID. |
| Y |
Example Request URL
GET https://dspapi.admanagerplus.yahoo.com/traffic/lines/630162
Example Response
{
"response": {
"id": 630162,
"name": "display-line-multi-budget-15",
"orderId": 462137,
"bidPrice": 1,
"goalAmount": 1.34,
"maxGoal": 1.34,
"marginGoal": 25,
"billingPrice": 1,
"completionThreshold": 0,
"isNativeEnabled": false,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "SOFT",
"goalType": "CPC",
"billingMethodType": "MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"id": 1307654,
"name": "s2",
"budget": 2000,
"startDateStr": "2020-09-29T05:00:00Z",
"endDateStr": "2020-12-29T05:59:59Z",
"dailyBudgetType": "AUTO_ALLOCATED"
},
{
"id": 1307653,
"name": "s1",
"budget": 1000,
"dailyBudget": 150,
"startDateStr": "2020-08-11T05:00:00Z",
"endDateStr": "2020-09-29T04:59:59Z",
"dailyBudgetType": "SPECIFIED_AMOUNT"
}
],
"feeList": [
{
"id": 12584,
"name": "amc",
"fee": 0.86,
"typeName": "AD_SERVING"
}
],
"conversionList": [
{
"id": 7386,
"lineId": 630162,
"beaconId": 15776560,
"acceptViewThrough": true,
"clickWindow": 4,
"viewWindow": 2,
"name": "test rule 1",
"viewBeaconValueDiscount": 0,
"beaconValuePc": 1.05,
"clickWindowUnitType": "DAY",
"isReportingOnly": false,
"viewWindowUnitType": "HOUR"
}
]
},
"errors": null,
"timeStamp": "2020-07-14T02:03:50.037Z"
}
Read Lines
Get a filtered list of lines.
GET /traffic/lines?orderId={orderId}&query={query}&page={page}&limit={limit}&sort={sort}&dir={dir}
All of the accepted parameters are query parameters.
Parameters
Parameter | Description | Data Type | Required |
---|---|---|---|
| Specifies the campaign ID. |
| Y |
| Specifies the search term. Use URL encoding conventions (i.e. a space should be replaced with a |
| N |
| Specifies the page number. |
| N |
| Specifies the total number of items to return. Maximum allowed value is |
| N |
| Specifies the column to sort by. |
| N |
| Specifies the sort direction. Allowed values:
|
| N |
Example Request URL
GET https://dspapi.admanagerplus.yahoo.com/traffic/lines?orderId=462137&limit=2&sort=id&dir=desc&seatId=2
Example Response
{
"response": [
{
"id": 630162,
"name": "display-line-multi-budget-15",
"orderId": 462137,
"bidPrice": 1,
"goalAmount": 1.34,
"maxGoal": 1.34,
"marginGoal": 25,
"billingPrice": 1,
"completionThreshold": 0,
"isNativeEnabled": false,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "SOFT",
"goalType": "CPC",
"billingMethodType": "MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"id": 1307654,
"name": "s2",
"budget": 2000,
"startDateStr": "2020-09-29T05:00:00Z",
"endDateStr": "2020-12-29T05:59:59Z",
"dailyBudgetType": "AUTO_ALLOCATED"
},
{
"id": 1307653,
"name": "s1",
"budget": 1000,
"dailyBudget": 150,
"startDateStr": "2020-08-11T05:00:00Z",
"endDateStr": "2020-09-29T04:59:59Z",
"dailyBudgetType": "SPECIFIED_AMOUNT"
}
],
"feeList": [
{
"id": 12584,
"name": "amc",
"fee": 0.86,
"typeName": "AD_SERVING"
}
],
"conversionList": [
{
"id": 7386,
"lineId": 630162,
"beaconId": 15776560,
"acceptViewThrough": true,
"clickWindow": 4,
"viewWindow": 2,
"name": "test rule 1",
"viewBeaconValueDiscount": 0,
"beaconValuePc": 1.05,
"clickWindowUnitType": "DAY",
"isReportingOnly": false,
"viewWindowUnitType": "HOUR"
}
]
},
{
"id": 630161,
"name": "display-line-multi-budget-12",
"orderId": 462137,
"bidPrice": 1,
"goalAmount": 1.34,
"maxGoal": 1.34,
"marginGoal": 25,
"billingPrice": 1,
"completionThreshold": 0,
"isNativeEnabled": false,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "SOFT",
"goalType": "CPC",
"billingMethodType": "MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"id": 1307652,
"name": "s2",
"budget": 2000,
"startDateStr": "2020-09-29T05:00:00Z",
"endDateStr": "2020-12-29T05:59:59Z",
"dailyBudgetType": "AUTO_ALLOCATED"
},
{
"id": 1307651,
"name": "s1",
"budget": 1000,
"dailyBudget": 150,
"startDateStr": "2020-08-11T05:00:00Z",
"endDateStr": "2020-09-29T04:59:59Z",
"dailyBudgetType": "SPECIFIED_AMOUNT"
}
],
"feeList": [],
"conversionList": []
}
],
"errors": null,
"timeStamp": "2020-07-14T02:28:12.227Z"
}
Create Line
Create a new line.
POST /traffic/lines/
To create a display line, specify
DISPLAY
as the line’smediaType
value.To create a video line, specify
VIDEO
as the line’smediaType
value.To create an audio line, specify
AUDIO
as the line’smediaType
value.To create a DOOH line, specify
DOOH
as the line’schannelType
value.To create a CTV line, specify
CTV
as the line’schannelType
value.
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. Refer to Geography Targeting and Example: Activate Paused Line for more details.
Parameters
All fields are specified in the body of application/json
payload.
Example Request URL
POST https://dspapi.admanagerplus.yahoo.com/traffic/lines
Example: Create (Margin) oCPM Display Line
To create a DISPLA
Y line with MARGIN
(oCPM) billing type, refer to the table and payload below.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
|
|
|
Example Request Body
{
"name": "display-line-ocpm-1",
"orderId": 462137,
"status": "PAUSED",
"mediaType": "DISPLAY",
"pacingModeType": "EVEN",
"budgetType": "CURRENCY",
"goalType": "CPC",
"billingMethodType": "MARGIN",
"billingPrice": 2,
"marginType": "TOTAL_BUDGET",
"bidPrice": 1,
"maxGoal": 1,
"marginGoal": 25,
"goalAmount": 1,
"isNativeEnabled": false,
"completionThreshold": 0,
"schedules": [
{
"startDateStr": "2020-09-29",
"endDateStr": "2020-12-28",
"budget": 2000,
"dailyBudgetType": "AUTO_ALLOCATED"
}
]
}
Example: Create oCPC Display Line
To create a DISPLAY
line with oCPC
goal type, refer to the table and payload below.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example Request Body
{
"name": "display-line-ocpc-1",
"orderId": 462137,
"mediaType": "DISPLAY",
"billingMethodType": "CPM_PRICE",
"billingPrice": 1,
"marginType": "TOTAL_BUDGET",
"bidPrice": 1,
"goalType": "OCPC",
"maxGoal": 1.1,
"marginGoal": 25,
"status": "PAUSED",
"goalAmount": 1.1,
"pacingModeType": "EVEN",
"isNativeEnabled": false,
"completionThreshold": 0,
"schedules": [
{
"startDateStr": "2020-08-11",
"endDateStr": "2020-09-28",
"budget": 1000,
"dailyBudget": 150,
"dailyBudgetType": "SPECIFIED_AMOUNT"
}
]
}
Example: Create CPCV Video Line
To create a VIDEO
line with CPCV
billing and goal, refer to the table and payload below.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
|
|
|
| Amount you want to pay for each completed video view |
|
|
|
|
|
|
|
|
|
|
| Maximum goal price |
|
Example Request Body
{
"name": "video-line-cpcv-single-budget-1",
"orderId": 462137,
"status": "PAUSED",
"mediaType": "VIDEO",
"pacingModeType": "EVEN",
"budgetType": "CURRENCY",
"goalType": "CPCV",
"billingMethodType": "CPCV",
"billingPrice": 1,
"marginType": "TOTAL_BUDGET",
"bidPrice": 1,
"maxGoal": 1,
"marginGoal": 25,
"goalAmount": 1,
"isNativeEnabled": false,
"completionThreshold": 0,
"schedules": [
{
"startDateStr": "2020-08-11",
"endDateStr": "2021-01-28",
"budget": 1000,
"dailyBudget": 150,
"dailyBudgetType": "SPECIFIED_AMOUNT"
}
]
}
Example: Create Line with Currency Daily Budget & Single Schedule
To create a DISPLAY
line with a specified daily budget and a single budget schedule, refer to the table and payload below.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example Request Body
{
"name": "display-line-single-budget-1",
"orderId": 462137,
"status": "PAUSED",
"mediaType": "DISPLAY",
"budgetType": "CURRENCY",
"goalType": "CPC",
"billingMethodType": "MARGIN",
"billingPrice": 1,
"marginType": "TOTAL_BUDGET",
"pacingModeType": "EVEN",
"bidPrice": 1,
"marginGoal": 25,
"goalAmount": 1.34,
"isNativeEnabled": false,
"completionThreshold": 0,
"schedules": [
{
"startDateStr": "2020-08-11",
"endDateStr": "2021-01-28",
"budget": 1000,
"dailyBudget": 150,
"dailyBudgetType": "SPECIFIED_AMOUNT"
}
],
"conversionList": [
{
"beaconId": 15776560,
"acceptViewThrough": true,
"clickWindow": 4,
"viewWindow": 2,
"viewBeaconValueDiscount": 0,
"beaconValuePc": 1.05,
"clickWindowUnitType": "DAY",
"viewWindowUnitType": "HOUR"
}
],
"feeList": [
{
"typeName": "AD_SERVING",
"name": "amc",
"fee": 0.86
}
]
}
Example: Create Impression Budget Video Line
To create a VIDEO
line with auto allocated Impression-based budget, refer to the table and payload below.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
| Amount you want to pay for each 1000 impressions |
|
| Total number of impressions you plan to buy |
|
|
|
|
Example Request Body
{
"name": "video-line-single-budget-imp-6",
"orderId": 462137,
"bidPrice": 9,
"marginGoal": 25,
"billingPrice": 9,
"isNativeEnabled": false,
"completionThreshold": 60,
"pacingAcceleration": 0,
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "VIDEO",
"goalType": "COMPLETION_HARD_THRESHOLD",
"goalAmount": 1.1,
"maxGoal": 1.15,
"budgetType": "IMPRESSION",
"billingMethodType": "CPM_PRICE",
"marginType": "TOTAL_BUDGET",
"schedules": [
{
"startDateStr": "2020-08-11",
"endDateStr": "2021-01-28",
"impBudget": 7111,
"dailyBudgetType": "AUTO_ALLOCATED"
}
]
}
Example: Create Multiple Budget Line
To create a line with multiple budgets, refer to the payload below.
Example Request Body
{
"name": "display-line-multi-budget-1",
"orderId": 462137,
"status": "PAUSED",
"mediaType": "DISPLAY",
"budgetType": "CURRENCY",
"goalType": "CPC",
"billingMethodType": "MARGIN",
"billingPrice": 1,
"marginType": "TOTAL_BUDGET",
"pacingModeType": "EVEN",
"bidPrice": 1,
"marginGoal": 25,
"goalAmount": 1.34,
"isNativeEnabled": false,
"completionThreshold": 0,
"schedules": [
{
"name": "s1",
"startDateStr": "2020-08-11",
"endDateStr": "2020-09-28",
"budget": 1000,
"dailyBudget": 150,
"dailyBudgetType": "SPECIFIED_AMOUNT"
},
{
"name": "s2",
"startDateStr": "2020-09-29",
"endDateStr": "2020-12-28",
"budget": 2000,
"dailyBudgetType": "AUTO_ALLOCATED"
}
]
}
Example: Create Line with AppMarketing Objective
To create a line with CPI
goal and app marketing objective, refer to the table and payload below.
Note
At least one conversion pixel is required when the goal type is
CPI
.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Example Request Body
{
"name": "test-video5599",
"orderId": 312515,
"status": "PAUSED",
"mediaType": "VIDEO",
"pacingModeType": "EVEN",
"budgetType": "CURRENCY",
"goalType": "CPI",
"billingMethodType": "CPCV",
"dailyBudgetType": "SPECIFIED_AMOUNT",
"dailyBudget": 1.25,
"billingPrice": 1,
"marginType": "TOTAL_BUDGET",
"bidPrice": 1,
"maxGoal": 1,
"marginGoal": 25,
"goalAmount": 1,
"isNativeEnabled": false,
"completionThreshold": 0,
"schedules": [
{
"startDateStr": "2020-08-11",
"endDateStr": "2021-01-28",
"impBudget": 7111,
"dailyBudgetType": "AUTO_ALLOCATED"
}
],
"appMarketingObjective": "RE_ENGAGEMENT",
"appUrl": "https://apps.apple.com/us/app/colorsnap-visualizer-iphone/id316256242&locale=en-us",
"appLocale": "en-us",
"conversionList": [
{
"beaconId": 15776560,
"acceptViewThrough": true,
"clickWindow": 4,
"viewWindow": 2,
"viewBeaconValueDiscount": 0,
"beaconValuePc": 1.05,
"clickWindowUnitType": "DAY",
"viewWindowUnitType": "HOUR"
}
]
}
Example: Create DOOH Line
To create a Digital-Out-Of-Home line, refer to the table and payload below.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
|
|
|
| Should be empty array |
|
| Should be |
|
Example Request Body
{
"name": "display-DOOH-line",
"orderId": 235472,
"status": "PAUSED",
"mediaType": "DISPLAY",
"pacingModeType": "EVEN",
"budgetType": "CURRENCY",
"billingMethodType": "CPM_PRICE",
"billingPrice": 0.1,
"marginType": "TOTAL_BUDGET",
"bidPrice": 0.1,
"maxGoal": 1,
"marginGoal": 25,
"goalAmount": 1,
"isNativeEnabled": false,
"completionThreshold": 0,
"goalType":"NONE",
"channelType":"DOOH",
"schedules": [
{
"startDateStr": "2022-07-21",
"endDateStr": "2022-07-25",
"budget": 1,
"dailyBudgetType": "AUTO_ALLOCATED"
}
]
}
Example: Create a CTV Line
To create a Connected TV line, refer to the table and payload below.
Field | Value | Type |
---|---|---|
|
|
|
|
|
|
Example Request Body
{
"name": "CTV line",
"orderId": 1675983,
"status": "PAUSED",
"mediaType": "VIDEO",
"pacingModeType": "EVEN",
"budgetType": "CURRENCY",
"billingMethodType": "CPM_PRICE",
"billingPrice": 0.1,
"marginType": "TOTAL_BUDGET",
"bidPrice": 0.1,
"maxGoal": 1,
"marginGoal": 25,
"goalAmount": 1,
"isNativeEnabled": false,
"completionThreshold": 0,
"goalType":"NONE",
"channelType":"CTV",
"schedules": [
{
"startDateStr": "2024-01-09",
"endDateStr": "2024-01-25",
"budget": 1,
"dailyBudgetType": "AUTO_ALLOCATED"
}
]
Update Line
Update an existing line.
PUT /traffic/lines/{id}
Partial updates are supported (with the exception of feeList
, refer to note below); values of supported fields which are not in the payload will remain unchanged.
Note
When updating variable costs using
feeList
, any existing entries will be removed automatically unless they included in the payload.
Parameters
The Line id
is specified in the url path. All other fields are specified in the body of the application/json
payload.
Example: Activate Paused Line
The following payload shows how to change the line status from PAUSED
to ACTIVE
.
Example Request Body
{
"status": "ACTIVE"
}
Example: Update Line Budget & Start/End Dates
The following payload shows how to update the total budget and start/end dates of a line.
Example Request Body
{
"schedules": [
{
"startDateStr": "2020-08-11",
"endDateStr": "2021-01-31",
"impBudget": 10000
}
]
}
Example: Update Line with Conversion Pixel
The following payload shows how to add a conversion pixel to an existing line.
Example Request Body
{
"conversionList": [
{
"lineId": 355775,
"beaconId": 762,
"acceptViewThrough": true,
"viewWindow": 2,
"clickWindow": 4,
"clickWindowUnitType": "DAY",
"viewWindowUnitType": "HOUR",
"beaconValuePc": 1.2
}
]
}
Example: Remove an Existing Conversion Pixel
The following payload shows how to remove an existing conversion pixel from a line. An existing conversion pixel can be removed by setting lineId
to 0
.
Example Request Body
{
"conversionList": [
{
"id": 144856,
"lineId": 0,
"beaconId": 762
}
]
}
Remove Future Schedules for Multi-Schedule Lines
Schedules set in the future for multi-schedule lines can be removed.
PUT /traffic/lines/{id}
To delete a schedule, set isScheduleDeleted
to true
in the specific budget schedule object.
Parameters
Specify the Line id
in the URL path and all other fields in the request body.
Sample Request URL
PUT https://dspapi.admanagerplus.yahoo.com/traffic/lines/2188261
Sample Request Body
{
"schedules": [
{
"id": 2232962,
"name": "sc1",
"budget": 100.0,
"startDateStr": "2022-07-18",
"endDateStr": "2022-07-29",
"dailyBudgetType": "AUTO_ALLOCATED"
},
{
"id": 2388411,
"name": "sc2",
"budget": 100.0,
"startDateStr": "2022-11-12",
"endDateStr": "2022-11-29",
"dailyBudgetType": "AUTO_ALLOCATED",
"isScheduleDeleted": true
}
]
}
Sample Response
{
"response": {
"id": 2188261,
"name": "MultiLine-1",
"orderId": 429394,
"bidPrice": 1.0,
"goalAmount": 1.0,
"maxGoal": 1.0,
"billingPrice": 50.0,
"completionThreshold": 0.0,
"isNativeEnabled": false,
"channelType": "DEFAULT",
"status": "PAUSED",
"pacingModeType": "EVEN",
"mediaType": "DISPLAY",
"goalModeType": "SOFT",
"goalType": "CPC",
"billingMethodType": "MARGIN",
"marginType": "TOTAL_BUDGET",
"budgetType": "CURRENCY",
"schedules": [
{
"id": 2232962,
"name": "sc1",
"budget": 100.0,
"startDateStr": "2022-07-18T07:00:00Z",
"endDateStr": "2022-07-30T06:59:59Z",
"dailyBudgetType": "AUTO_ALLOCATED"
}
],
"feeList": [],
"conversionList": []
},
"errors": null,
"timeStamp": "2022-10-12T10:27:11.607Z"
}
Delete Lines
The DSP Traffic API does not support deletion of lines.