Campaigns¶
This article describes services you can use to view, add, and update campaigns.
Overview¶
A campaign is an advertising goal that defines a strategy for delivering ads within a set time period. You set up a campaign by defining its flight dates, budgets, frequency caps, demographic targeting data provider, and campaign goals.
Every campaign belongs to a specific advertiser and inherits default settings (time zone, currency, etc.) from the advertiser-level settings. Campaign flight dates, frequency caps, and budget settings constrain line-level settings.
You can set one of the following campaign budget types:
A single budget that applies to all lines in the campaign as defined by the
budgetSchedules
array with a single object.Multiple budget schedules apply to the lines under the campaign as defined in the
budgetSchedules
array with multiple objects.
Hierarchy¶
A Campaign
is an advertiser-level object.
Endpoint¶
/traffic/campaigns
Use the following HTTP methods:
Use the
GET
method to view a campaign.Use the
POST
method to create a new campaign.Use the
PUT
method to update an existing campaign.
Resources¶
Campaign¶
The Campaign
object contains the following fields:
Field |
Description |
Data Type |
Create |
Update |
---|---|---|---|---|
|
Specifies the campaign ID. |
|
N/A |
Required |
|
Specifies the unique campaign name. |
|
Required |
Optional |
|
Specifies the current status of the campaign. Allowed values:
In addition, the resource may return the following read-only status values:
|
|
Required |
Optional |
|
Specifies the campaign KPI. Options include:
Note: If Campaign is Native, only CTR is supported. Other goalTypes can be selected at the Line level. |
|
Required |
Optional |
|
Specifies the target value for the Note: If |
|
Required |
Optional |
|
Specifies the frequency capping method. Options include:
Defaults to |
|
Optional |
Optional |
|
Specifies the maximum number of impressions to serve per Defaults to |
|
Optional |
Optional |
|
Specifies the demographic targeting data provider for video campaigns. The Yahoo DSP uses Yahoo and third-party data verification vendors to provide targeting verification when you set up demographic targeting for video ads. Options include:
Important: You cannot change this value on an active campaign. Defaults to |
|
Optional |
Optional |
|
Specifies the campaign time zone. Uses the advertiser’s time zone if you do not specify a value. To learn more, refer to Timezones. Some example values: Note: Once a campaign is saved, you cannot update the |
|
Optional |
Optional |
|
Specifies the campaign currency. Uses the advertiser’s currency if you do not specify a value. To learn more, refer to Currency Types. Some example values: Note: Once a campaign is saved, you cannot update the |
|
Optional |
Optional |
|
Specifies the advertiser ID. To learn more, refer to Advertisers. |
|
Required |
Optional |
|
Specifies whether the line uses impression-based budgeting or budgeting based on US dollars for the line. Allowed values:
|
|
Optional |
Optional |
|
Specifies an array of Budget Schedule objects. A Budget Schedule defines a budget you can use when you set up lines under the campaign. To learn more, refer to Budget Schedule Object. Note: Once you set up budget schedules, you cannot remove them from a campaign. Budget schedule date ranges cannot overlap. |
|
Required |
Optional |
|
Specifies multi-layer frequency cap for the order. With multi-layer frequency capping, you can set up to 3 layers of frequency capping. To learn more, refer to Order Frequency Cap Object. |
|
Optional |
Optional |
Budget Schedule Object¶
A Budget Schedule defines a campaign-level budget.
The budgetSchedules
array defines one or more Budget Schedule objects. The number of items in the array controls the type of budget schedule. If there is only a single item, the campaign will have a single budget schedule. If there is more than one item, the campaign will have multiple budget schedules. Set up a multi-schedule campaign to manage “evergreen” campaigns that have a single strategy and multiple flight dates and budgets.
Important
Once you specify budget schedules, you cannot remove them from a campaign. Budget schedule date ranges cannot overlap.
Field |
Description |
Data Type |
Create |
Update |
---|---|---|---|---|
|
Specifies the budget schedule ID. |
|
N/A |
Required |
|
Specifies a unique name for the budget schedule. |
|
Required for multi schedule |
Optional |
|
Specifies the beginning of the budget schedule in |
|
Required |
Required |
|
Specifies the ending of the budget schedule in |
|
Required for multi schedule |
Required |
|
Specifies the method used to allocate spending in the budget schedule. Options include:
|
|
Required |
Required |
|
Specifies the total budget for the budget schedule. Omit or set to null to create an unlimited budget campaign. |
|
Required for multi schedule |
Optional |
|
Specifies the daily budget for the budget schedule. Required if the |
|
Optional |
Optional |
|
Specifies the total number of impressions bought. |
|
Required [1] |
Optional [1] |
|
Specifies the total number of impressions bought per day. Required when |
|
Required [2] |
Optional [2] |
|
Allows a schedule to be deleted if the value is set |
|
N/A |
Optional |
Order Frequency Cap Object¶
A Order Frequency Cap object defines multi-layer frequency capping for the campaign.
The orderFrequencyCap
can be used to set up to 3 layers of frequency capping.
Field |
Description |
Data Type |
Create |
Update |
---|---|---|---|---|
|
Specifies the order frequency cap ID. |
|
N/A |
Required |
|
Specifies the order ID. |
|
Required |
Required |
|
Specifies the maximum number of impressions to serve per minute. |
|
Optional |
Optional |
|
Specifies the maximum number of impressions to serve per hour. |
|
Optional |
Optional |
|
Specifies the campaign frequency capping period. Currently, supports 6 hours and 12 hours. |
|
Optional |
Optional |
|
Specifies the maximum number of impressions to serve per 6 or 12 hour. This is mandatory when |
|
Optional |
Optional |
|
Specifies the maximum number of impressions to serve per day. |
|
Optional |
Optional |
|
Specifies the maximum number of impressions to serve per week. |
|
Optional |
Optional |
|
Specifies the maximum number of impressions to serve per month. |
|
Optional |
Optional |
|
Specifies the frequency cap pacing type. Currently, supports EVEN pacing type. |
|
Required |
Required |
Read Campaign¶
Read a specific campaign.
GET /traffic/campaigns/{id}
Parameters¶
Parameter |
Parameter Type |
Description |
Data Type |
Required |
---|---|---|---|---|
|
path |
Specifies the campaign ID. |
|
Y |
Sample Request URL¶
GET https://dspapi.admanagerplus.yahoo.com/traffic/campaigns/701134
Sample Response¶
{
"response": {
"id": 701134,
"name": "TrafficAPI Single Campaign",
"createdAt": "2020-08-20T07:52:59Z",
"updatedAt": "2020-08-20T07:52:59Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 12034,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "CAD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 709476,
"startDate": "2020-08-22T05:00:00Z",
"endDate": "2020-08-30T05:00:00Z",
"scheduleBudget": 444.5,
"scheduleDailyBudget": 18,
"scheduleBudgetType": "SPECIFIED_AMOUNT"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 101,
"orderId": 701134,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
"errors": null,
"timeStamp": "2020-08-20T07:56:38.729Z"
}
Read Campaigns¶
Read a filtered list of campaigns.
GET /traffic/campaigns?accountId={accountId}&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 advertiser ID. |
|
Y |
|
Specifies the search term to use for filtering an advertiser’s campaigns. Use URL encoding conventions (i.e. replace spaces 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 |
Sample Request URL¶
GET https://dspapi.admanagerplus.yahoo.com/traffic/campaigns?accountId=2034341&query=traffic+test&page=1&limit=2
Sample Response¶
{
"response": [
{
"id": 735837,
"name": "traffic test budget 22",
"createdAt": "2020-09-11T03:01:15Z",
"updatedAt": "2020-09-11T03:01:15Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 2034341,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "CAD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 745083,
"startDate": "2020-10-27T05:00:00Z",
"endDate": "2020-10-29T05:00:00Z",
"scheduleBudget": 22.02,
"scheduleBudgetType": "TOTAL_BUDGET",
"scheduleName": "schedule2"
},
{
"id": 745081,
"startDate": "2020-10-22T05:00:00Z",
"endDate": "2020-10-26T05:00:00Z",
"scheduleBudget": 100.01,
"scheduleDailyBudget": 6.12,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleName": "schedule1"
},
{
"id": 745082,
"startDate": "2020-10-30T05:00:00Z",
"endDate": "2020-11-03T06:00:00Z",
"scheduleBudget": 140,
"scheduleBudgetType": "AUTO_ALLOCATED",
"scheduleName": "schedule3"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 102,
"orderId": 735837,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
{
"id": 735838,
"name": "traffic test budget - unlimited",
"createdAt": "2020-09-11T03:03:05Z",
"updatedAt": "2020-09-11T03:03:05Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 2034341,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 745084,
"startDate": "2020-08-20T05:00:00Z",
"endDate": "2020-09-30T05:00:00Z",
"scheduleDailyBudget": 0,
"scheduleBudgetType": "TOTAL_BUDGET"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 103,
"orderId": 735838,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
}
],
"errors": null,
"timeStamp": "2020-09-11T03:04:15.399Z"
}
Create Campaign¶
Create a new campaign.
POST /traffic/campaigns
Parameters¶
All fields are specified in the body of the application/json payload.
Sample Request URL¶
POST https://dspapi.admanagerplus.yahoo.com/traffic/campaigns
Sample Request Body (Single Schedule)¶
{
"name": "traffic test budget - 24",
"budgetSchedules": [
{
"scheduleBudget": 444.5,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleDailyBudget": 18,
"startDate": "2020-08-20",
"endDate": "2020-09-30"
}
],
"goalType": "CTR",
"goalValue": 5,
"accountId": 2034341,
"status": "ACTIVE",
"frequencyCapValue": 10,
"frequencyCapPeriodType": "DAILY",
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE"
}
Sample Response¶
{
"response": {
"id": 735839,
"name": "traffic test budget - 24",
"createdAt": "2020-09-11T03:06:53Z",
"updatedAt": "2020-09-11T03:06:53Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 2034341,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 745085,
"startDate": "2020-08-20T05:00:00Z",
"endDate": "2020-09-30T05:00:00Z",
"scheduleBudget": 444.5,
"scheduleDailyBudget": 18,
"scheduleBudgetType": "SPECIFIED_AMOUNT"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 104,
"orderId": 735839,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
"errors": null,
"timeStamp": "2020-09-11T03:07:05.730Z"
}
Create Unlimited Budget Campaign¶
To create a campaign with unlimited budget, omit scheduleBudget
or alternatively set it to null
in the budgetSchedules
object.
POST /traffic/campaigns
Parameters¶
All fields are specified in the body of the application/json payload.
Sample Request URL¶
POST https://dspapi.admanagerplus.yahoo.com/traffic/campaigns
Sample Request Body (scheduleBudget
field NULL)¶
{
"name": "Test Campaign UNLIMITED",
"budgetSchedules": [
{
"scheduleBudget": null,
"scheduleBudgetType": "TOTAL_BUDGET",
"startDate": "2020-08-20",
"endDate": "2020-08-30"
}
],
"goalType": "CTR",
"goalValue": 5,
"accountId": 2034341,
"status": "ACTIVE",
"frequencyCapValue": 10,
"frequencyCapPeriodType": "DAILY",
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE"
}
Sample Response¶
{
"response": {
"id": 700866,
"name": "Test Campaign UNLIMITED",
"createdAt": "2020-08-19T11:42:55Z",
"updatedAt": "2020-08-19T11:42:55Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 2034341,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 709200,
"startDate": "2020-08-20T05:00:00Z",
"endDate": "2020-08-30T05:00:00Z",
"scheduleDailyBudget": 0,
"scheduleBudgetType": "TOTAL_BUDGET"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 105,
"orderId": 700866,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
"errors": null,
"timeStamp": "2020-08-19T11:43:16.007Z"
}
Create a multi schedule budget campaign¶
To create a multi schedule budget campaign, add multiple flight periods in budgetSchedules
object.
Sample Request Body (Multi Schedule)¶
{
"name": "traffic test budget 22",
"budgetSchedules": [
{
"scheduleBudget": 100.01,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleDailyBudget": 6.12,
"startDate": "2020-10-22",
"endDate": "2020-10-26",
"scheduleName": "schedule1"
},
{
"scheduleBudget": 22.02,
"scheduleBudgetType": "TOTAL_BUDGET",
"startDate": "2020-10-27",
"endDate": "2020-10-29",
"scheduleName": "schedule2"
},
{
"scheduleBudget": 140,
"scheduleBudgetType": "AUTO_ALLOCATED",
"startDate": "2020-10-30",
"endDate": "2020-11-03",
"scheduleName": "schedule3"
}
],
"goalType": "CTR",
"goalValue": 5,
"accountId": 2034341,
"status": "ACTIVE",
"frequencyCapValue": 0,
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": null,
"orderId": null,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
"timezone": "America/Chicago",
"currency": "CAD",
"demoVendor": "COMSCORE"
}
Sample Response¶
{
"response": {
"id": 735837,
"name": "traffic test budget 22",
"createdAt": "2020-09-11T03:01:15Z",
"updatedAt": "2020-09-11T03:01:15Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 2034341,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "CAD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 745083,
"startDate": "2020-10-27T05:00:00Z",
"endDate": "2020-10-29T05:00:00Z",
"scheduleBudget": 22.02,
"scheduleBudgetType": "TOTAL_BUDGET",
"scheduleName": "schedule2"
},
{
"id": 745081,
"startDate": "2020-10-22T05:00:00Z",
"endDate": "2020-10-26T05:00:00Z",
"scheduleBudget": 100.01,
"scheduleDailyBudget": 6.12,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleName": "schedule1"
},
{
"id": 745082,
"startDate": "2020-10-30T05:00:00Z",
"endDate": "2020-11-03T06:00:00Z",
"scheduleBudget": 140,
"scheduleBudgetType": "AUTO_ALLOCATED",
"scheduleName": "schedule3"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 106,
"orderId": 735837,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
"errors": null,
"timeStamp": "2020-09-11T03:01:29.441Z"
}
Create Impression Budget Campaign¶
To create a campaign with an impression budget, set “budgetType” to IMPRESSION
and set impBudget and impDailyBudget fields appropriately in the “budgetSchedules” object, while omitting the “scheduleBudget” and “scheduleDailyBudget” fields.
POST /traffic/campaigns
Parameters¶
All fields are specified in the body of the application/json payload.
Sample Request URL¶
POST https://dspapi.admanagerplus.yahoo.com/traffic/campaigns
Sample Request Body (Impression Budget)¶
{
"name": "Test Impression Campaign",
"budgetSchedules": [
{
"impBudget": 500000,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"impDailyBudget": 50000,
"startDate": "2020-08-20",
"endDate": "2020-09-30"
}
],
"goalType": "CTR",
"goalValue": 5,
"accountId": 2034341,
"status": "ACTIVE",
"frequencyCapValue": 0,
"frequencyCapPeriodType": null,
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE",
"budgetType": "IMPRESSION"
}
Sample Response¶
{
"response": {
"id": 700866,
"name": "Test Impression Campaign",
"createdAt": "2020-08-19T11:42:55Z",
"updatedAt": "2020-08-19T11:42:55Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 2034341,
"budgetType": "IMPRESSION",
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 709200,
"startDate": "2020-08-20T05:00:00Z",
"endDate": "2020-08-30T05:00:00Z",
"impBudget": 500000,
"impDailyBudget": 50000,
"scheduleBudgetType": "SPECIFIED_AMOUNT"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 105,
"orderId": 700866,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
"errors": null,
"timeStamp": "2020-08-19T11:43:16.007Z"
}
Update Campaign¶
Update an existing campaign.
PUT /traffic/campaigns/{id}
Partial updates are supported; values of supported fields that are not in the payload remain unchanged.
Parameters¶
Specify the Campaign id in the url path. Specify all other fields in the body of the application/json payload.
Sample Request URL¶
PUT https://dspapi.admanagerplus.yahoo.com/traffic/campaigns/745085
Sample Request Body (Single Schedule)¶
{
"budgetSchedules": [
{
"id": 745085,
"scheduleBudget": 500,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleDailyBudget": 18,
"startDate": "2020-08-20",
"endDate": "2020-08-30"
}
]
}
Sample Request Body (Multi Schedule)¶
{
"budgetSchedules": [
{
"scheduleBudget": 140.01,
"scheduleDailyBudget": 6.55,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleName": "schedule1-updated",
"startDate": "2020-12-22",
"endDate": "2020-12-27",
"id": 745083
}
]
}
Sample Response¶
{
"response": {
"id": 735837,
"name": "traffic test budget 22",
"createdAt": "2020-09-11T03:01:15Z",
"updatedAt": "2020-09-11T03:20:33Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 2034341,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "CAD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 745083,
"startDate": "2020-10-27T05:00:00Z",
"endDate": "2020-10-29T05:00:00Z",
"scheduleBudget": 22.02,
"scheduleBudgetType": "TOTAL_BUDGET",
"scheduleName": "schedule2"
},
{
"id": 745081,
"startDate": "2020-10-22T05:00:00Z",
"endDate": "2020-10-26T05:00:00Z",
"scheduleBudget": 100.01,
"scheduleDailyBudget": 6.12,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleName": "schedule1"
},
{
"id": 745082,
"startDate": "2020-10-30T05:00:00Z",
"endDate": "2020-11-03T06:00:00Z",
"scheduleBudget": 140,
"scheduleBudgetType": "AUTO_ALLOCATED",
"scheduleName": "schedule3"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 102,
"orderId": 735837,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
"errors": null,
"timeStamp": "2020-09-11T03:21:07.610Z"
}
Switch Single To Multi Schedule Campaign¶
It is possible to switch an existing single budget schedule to a multiple budget schedule. The existing schedule is needed in the “budgetSchedules” array since the “scheduleName” field is mandatory for multiple schedules. Although more than one schedule may be specified, at least one additional schedule is required for the switch.
PUT /traffic/campaigns/{id}
Partial updates are supported; values of supported fields that are not in the payload remain unchanged.
Parameters¶
Specify the Campaign id
in the url path. Specify all other fields in the body of the application/json payload.
Sample Request URL¶
PUT https://dspapi.admanagerplus.yahoo.com/traffic/campaigns/733216
Sample Request Body¶
{
"budgetSchedules": [
{
"id": 742400,
"scheduleBudget": 444.5,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleDailyBudget": 18,
"startDate": "2020-08-20",
"endDate": "2020-09-30",
"scheduleName": "schedule1"
},
{
"scheduleBudget": 22.02,
"scheduleBudgetType": "TOTAL_BUDGET",
"startDate": "2020-10-27",
"endDate": "2020-10-29",
"scheduleName": "schedule2"
},
{
"scheduleBudget": 140,
"scheduleBudgetType": "AUTO_ALLOCATED",
"startDate": "2020-10-30",
"endDate": "2020-11-03",
"scheduleName": "schedule3"
}
]
}
Sample Response¶
{
"response": {
"id": 733216,
"name": "test budget 7001",
"createdAt": "2020-09-10T15:57:07Z",
"updatedAt": "2020-09-11T03:38:51Z",
"goalValue": 5,
"frequencyCapValue": 0,
"accountId": 1,
"status": "ACTIVE",
"goalType": "CTR",
"timezone": "America/Chicago",
"currency": "USD",
"demoVendor": "COMSCORE",
"budgetSchedules": [
{
"id": 745087,
"startDate": "2020-10-27T05:00:00Z",
"endDate": "2020-10-29T05:00:00Z",
"scheduleBudget": 22.02,
"scheduleBudgetType": "TOTAL_BUDGET",
"scheduleName": "schedule2"
},
{
"id": 745086,
"startDate": "2020-10-30T05:00:00Z",
"endDate": "2020-11-03T06:00:00Z",
"scheduleBudget": 140,
"scheduleBudgetType": "AUTO_ALLOCATED",
"scheduleName": "schedule3"
},
{
"id": 742400,
"startDate": "2020-08-20T05:00:00Z",
"endDate": "2020-09-30T05:00:00Z",
"scheduleBudget": 444.5,
"scheduleDailyBudget": 18,
"scheduleBudgetType": "SPECIFIED_AMOUNT",
"scheduleName": "schedule1"
}
],
"frequencyCapPeriodType": null,
"orderFrequencyCap": {
"orderFrequencyCapId": 107,
"orderId": 733216,
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapPeriodMultiHour": 6,
"frequencyCapValueMultiHour": 2,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 10,
"frequencyCapValueMonth": 20,
"frequencyCapPacingType": "EVEN"
}
},
"errors": null,
"timeStamp": "2020-09-11T03:39:24.850Z"
}
Multiple Schedules - Allow removal of future schedules¶
It is possible for a multiple budget schedule campaign to remove schedules that have Start Dates and End Dates in the future.
PUT /traffic/campaigns/{id}
In order to delete a schedule, set isScheduleDeleted
to true
.
Parameters¶
Specify the Campaign id
in the url path. Specify all other fields in the body of the application/json payload.
Example Request URL¶
PUT https://dspapi.admanagerplus.yahoo.com/traffic/campaigns/468268
Example Request Body¶
{
"budgetSchedules": [
{
"id": 562664,
"startDate": "2022-10-12T07:00:00Z",
"endDate": "2022-10-26T07:00:00Z",
"scheduleBudget": 10.0,
"scheduleBudgetType": "TOTAL_BUDGET",
"scheduleName": "sc1"
},
{
"id": 562665,
"startDate": "2022-12-12T08:00:00Z",
"endDate": "2022-12-16T08:00:00Z",
"scheduleBudget": 30.0,
"scheduleBudgetType": "TOTAL_BUDGET",
"scheduleName": "sc2",
"isScheduleDeleted": true
}
]
}
Example Response¶
{
"response": {
"id": 468268,
"name": "Test-Camp-Multi",
"status": "INACTIVE",
"goalType": "CTR",
"goalValue": 0.0,
"frequencyCapPeriodType": "UNLIMITED",
"frequencyCapValue": 0,
"demoVendor": "YAHOO",
"timezone": "America/Los_Angeles",
"currency": "USD",
"accountId": 64479,
"budgetType": "CURRENCY",
"budgetSchedules": [
{
"id": 562664,
"startDate": "2022-10-12T07:00:00Z",
"endDate": "2022-10-26T07:00:00Z",
"scheduleBudget": 10.0,
"scheduleBudgetType": "TOTAL_BUDGET",
"scheduleName": "sc1"
}
],
"orderFrequencyCap": {
"frequencyCapValueMinute": 0,
"frequencyCapValueHour": 0,
"frequencyCapValueDay": 0,
"frequencyCapValueWeek": 0,
"frequencyCapValueMonth": 0,
"frequencyCapPeriodMultiHour": 0,
"frequencyCapValueMultiHour": 0,
"orderId": 468268,
"frequencyCapPacingType": "EVEN"
},
"createdAt": "2022-10-12T07:23:12Z",
"updatedAt": "2022-10-12T07:25:54Z",
"packageEnabled": false
},
"errors": null,
"timeStamp": "2022-10-12T07:25:54.032Z"
}
Delete Campaign¶
The DSP Traffic API does not support the deletion of campaigns.