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

id

Specifies the campaign ID.

integer

N/A

Required

name

Specifies the unique campaign name.

string

Required

Optional

status

Specifies the current status of the campaign.

Allowed values:

  • ACTIVE

  • PAUSED

  • INACTIVE

In addition, the resource may return the following read-only status values:

  • STOP_TOTAL_BUDGET: The total budget has been reached.

  • STOP_DAILY_BUDGET: The daily budget has been reached.

  • NOT_STARTED: The campaign has not started.

  • ENDED: The campaign has ended.

  • NO_ADS_ADDED: The campaign has no ads associated with it.

  • ERROR: An error occurred.

string

Required

Optional

goalType

Specifies the campaign KPI. Options include:

  • CTR

  • CPC

  • CPA

  • CPCV

  • VCPM

  • ROAS

  • CPI

Note: If Campaign is Native, only CTR is supported. Other goalTypes can be selected at the Line level.

string

Required

Optional

goalValue

Specifies the target value for the goalType.

Note: If goalType is set to CTR, this value must be a percentage between 0 and 100. If the Campaign is Native, only 0 is supported.

number

Required

Optional

frequencyCapPeriodType

Specifies the frequency capping method. Options include:

  • UNLIMITED: Set frequency capping at the line level for each line.

  • MINUTES: Defines campaign frequency capping to the minute.

  • HOURLY: Defines campaign frequency capping hourly.

  • DAILY: Defines campaign frequency capping daily.

  • WEEKLY: Defines campaign frequency capping weekly.

  • MONTHLY: Defines campaign frequency capping monthly.

Defaults to UNLIMITED if you don’t specify a value.

string

Optional

Optional

frequencyCapValue

Specifies the maximum number of impressions to serve per frequencyCapPeriodType.

Defaults to 0 if you don’t specify a value.

number

Optional

Optional

demoVendor

Specifies Yahoo as the demographic targeting data provider for campaigns.

The Yahoo DSP uses Yahoo data to provide targeting verification for demographic targeting on lines.

string

Optional

Optional

timezone

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: America/New_York, Etc/GMT.

Note: Once a campaign is saved, you cannot update the timezone value.

string

Optional

Optional

currency

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: USD, CAD.

Note: Once a campaign is saved, you cannot update the currency.

string

Optional

Optional

accountId

Specifies the advertiser ID.

To learn more, refer to Advertisers.

integer

Required

Optional

budgetType

Specifies whether the line uses impression-based budgeting or budgeting based on US dollars for the line.

Allowed values:

  • CURRENCY: Budget based on US Dollars.

  • IMPRESSION: Budget based on impressions. Impression-based budgeting enables you to control the number of impressions a campaign delivers, and respects the campaign’s Max CPM price, daily pacing, optimization goals, and targeting options.

string

Optional

Optional

budgetSchedules

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.

array

Required

Optional

orderFrequencyCap

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.

object

Optional

Optional

enableBudgetRollover

Set to true to have any unspent budget at the end of a campaign’s current schedule automatically moved to the budget of its next schedule.

  • true - budget rollover is enabled.

  • false - budget rollover is disabled.

Important:

  • Budget rollover is only supported for multi-schedule campaigns.

  • If a schedule has no spend, rollover will not occur for that schedule.

  • The rollover will occur within 6 hours of the current schedule ending.

  • Any schedules that ended for a campaign before enabling budget rollover will not have their unspent budgets moved.

  • Any unspent budget will continue to move from schedule to schedule until enableBudgetRollover is disabled. The field can be enabled or disabled at any time.

  • Any over delivery for a campaign’s schedule will not be moved into the next schedule.

boolean

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

id

Specifies the budget schedule ID.

integer

N/A

Required

scheduleName

Specifies a unique name for the budget schedule.

string

Required for multi schedule

Optional

startDate

Specifies the beginning of the budget schedule in yyyy-MM-dd format.

string

Required

Required

endDate

Specifies the ending of the budget schedule in yyyy-MM-dd format.

string

Required for multi schedule

Required

scheduleBudgetType

Specifies the method used to allocate spending in the budget schedule. Options include:

  • TOTAL_BUDGET: The entire campaign budget is available.

  • SPECIFIED_AMOUNT: You can define a daily spending cap in the scheduleDailyBudget parameter.

  • AUTO_ALLOCATED: Yahoo DSP automatically allocates the remaining budget at a regular rate for the rest of the budget schedule.

string

Required

Required

scheduleBudget

Specifies the total budget for the budget schedule. Omit or set to null to create an unlimited budget campaign.

string

Required for multi schedule

Optional

scheduleDailyBudget

Specifies the daily budget for the budget schedule.

Required if the scheduleBudgetType is SPECIFIED_AMOUNT.

string

Optional

Optional

impBudget

Specifies the total number of impressions bought.

integer

Required [1]

Optional [1]

impDailyBudget

Specifies the total number of impressions bought per day.

number

Required [2]

Optional [2]

isScheduleDeleted

Specifies whether to delete a schedule. To delete a schedule, set the value to true.

Note: Only schedules that are set in the future and part of a multi-schedule campaign can be deleted.

Boolean

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

orderFrequencyCapId

Specifies the order frequency cap ID.

integer

N/A

Required

orderId

Specifies the order ID.

integer

Required

Required

frequencyCapValueMinute

Specifies the maximum number of impressions to serve per minute.

integer

Optional

Optional

frequencyCapValueHour

Specifies the maximum number of impressions to serve per hour.

integer

Optional

Optional

frequencyCapPeriodMultiHour

Specifies the campaign frequency capping period. Currently, supports 6 hours and 12 hours.

integer

Optional

Optional

frequencyCapPeriodMultiHour

Specifies the maximum number of impressions to serve per 6 or 12 hour. This is mandatory when frequencyCapPeriodMultiHour is specified.

integer

Optional

Optional

frequencyCapValueDay

Specifies the maximum number of impressions to serve per day.

integer

Optional

Optional

frequencyCapValueWeek

Specifies the maximum number of impressions to serve per week.

integer

Optional

Optional

frequencyCapValueMonth

Specifies the maximum number of impressions to serve per month.

integer

Optional

Optional

frequencyCapPacingType

Specifies the frequency cap pacing type. Currently, supports EVEN pacing type.

string

Required

Required

Read Campaign

Read a specific campaign.

GET /traffic/campaigns/{id}

Parameters

Parameter

Parameter Type

Description

Data Type

Required

id

path

Specifies the campaign ID.

integer

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": "YAHOO",
    "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

accountId

Specifies the advertiser ID.

integer

Y

query

Specifies the search term to use for filtering an advertiser’s campaigns.

Use URL encoding conventions (i.e. replace spaces with a + or %20).

string

N

page

Specifies the page number.

integer

N

limit

Specifies the total number of items to return. Maximum allowed value is 100.

integer

N

sort

Specifies the column to sort by.

string

N

dir

Specifies the sort direction. Allowed values:

  • ASC: data is sorted in ascending order.

  • DESC: data is sorted in descending order.

string

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": "YAHOO",
      "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": "YAHOO",
      "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": "YAHOO"
}

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": "YAHOO",
    "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": "YAHOO"
}

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": "YAHOO",
    "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": "YAHOO"
}

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": "YAHOO",
    "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": "YAHOO",
 "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": "YAHOO",
    "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": "YAHOO",
    "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": "YAHOO",
    "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"
}

Remove Future Schedules for Multi-Schedule Campaigns

Schedules set in the future for multi-schedule campaigns can be removed.

PUT /traffic/campaigns/{id}

To delete a schedule, set the isScheduleDeleted field to true in the specific budget schedule object.

Parameters

Specify the Campaign id in the URL path and all other fields in the request body.

Sample Request URL

PUT https://dspapi.admanagerplus.yahoo.com/traffic/campaigns/468268

Sample 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
        }
    ]
}

Sample 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.