Packages
  • 22 Minutes to read

    Packages


      Article summary

      Abstract

      Describes Yahoo DSP packages, specifying how to create, read and update packages with standard HTTP POST, GET and PUT calls, with example request URLs, Body and Response JSON.

      Overview

      In Yahoo Yahoo DSP, a package is an optional subcomponent of a campaign that specifies an advertising strategy. Using packages, you can group multiple lines based on common attributes, including a budget, flight dates, and goals.

      This grouping provides an additional level of hierarchy between the campaign and line level, enabling you to manage multiple lines at once.

      When you create packages under a campaign, you can test your strategy by comparing the performance of packages. You can then deactivate underperforming packages and keep high-performing packages active. Lines that are grouped under a package work a bit differently than lines that are not part of a package. Some of the differences are Permanence, Budgets, Start & End dates, and Targeting.

      Important

      Lines will not serve if a package is deactivated.

      Read Campaign with package enabled

      To read campaigns with package enabled, make a GET call to this endpoint:

      GET traffic/campaigns{id}

      Note

      Packages can only be created under campaigns that allow packages.

      Parameter

      Parameter Type

      Description

      Data Type

      Required

      id

      path

      Specifies the campaign ID

      integer

      Yes

      Example Request URL

      GET https://dspapi.admanagerplus.yahoo.com/traffic/campaigns/701134

      Example Response

      {
        "response": {
          "id": 701134,
          "name": "TrafficAPI Single Campaign",
          "createdAt": "2020-08-20T07:52:59Z",
          "updatedAt": "2020-08-20T07:52:59Z",
          "packageEnabled": true,
          "goalValue": 5,
          "accountId": 12034,
          "status": "ACTIVE",
          "goalType": "CTR",
          "timezone": "America/Chicago",
          "currency": "CAD",
          "budgetSchedules": [
            {
              "id": 709476,
              "startDate": "2020-08-22T05:00:00Z",
              "endDate": "2020-08-30T05:00:00Z",
              "scheduleBudget": 444.5,
              "scheduleDailyBudget": 18,
              "scheduleBudgetType": "SPECIFIED_AMOUNT"
            }
          ],
        "errors": null,
        "timeStamp": "2020-08-20T07:56:38.729Z"
      }

      Create a new campaign with package enabled

      To create a new campaign with a package enabled, make a POST request like this:

      POST traffic/campaigns

      Note

      Once campaigns are created, you can’t update the packageEnabledattribute.

      Parameters

      All fields are specified in the body of the application/json payload.

      Example Request URL

      POST https://dspapi.admanagerplus.yahoo.com/traffic/campaigns

      Example Request Body (Package enabled)

      {
        "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",
        "timezone": "America/Chicago",
        "currency": "USD",
        "demoVendor": "YAHOO",
        "packageEnabled": true
      }

      Example 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",
           "packageEnabled": true
          "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"
            }
          ]
        },
        "errors": null,
        "timeStamp": "2020-09-11T03:07:05.730Z"
      }

      Packages

      Endpoint

      /traffic/packages

      The action that you take depends on the HTTP method and the parameters you specify. For example:

      • Use the GET method to read an existing package.

      • Use the POST method to create a new package.

      • Use the PUT method to update an existing package.

      Resources

      The platform provides these resources for managing and tracking packages:

      • packages

      • schedules

      Package Object

      The package object contains the following fields:

      Field

      Description

      Data Type

      Create

      Update

      id

      Specifies the package ID

      integer

      N/A

      Required

      name

      Specifies the unique name of the package.

      string

      Required

      Optional

      orderId

      Specifies the campaign ID.

      integer

      Required

      Optional

      status

      Specifies the current status of the package.

      Allowed values:

      • ACTIVE: Active/running

      • PAUSED: Just ended

      • INACTIVE: Inactive/ended

      The following status types are read-only:

      • STOP_TOTAL_BUDGET: Total budget reached

      • STOP_DAILY_BUDGET: Daily budget reached

      • NOT_STARTED: Not started yet

      • ENDED: Ended

      • ERROR: Error

      string

      Required

      Optional

      budgetType

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

      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 package delivers.

      string

      Optional

      Optional

      supplyType

      The source of the package’s supply (Yahoo or third-party). Set to YAHOO to create Yahoo Preferred Network native packages. If you use a value other than the following, POST/PUT requests will fail with an appropriate error message.

      Allowed values:

      • YAHOO (only valid for Native packages)

      • THIRD_PARTY

      string

      Required

      Optional

      schedules

      Specifies either a single budget schedule or multiple budget schedules.

      To learn more, see Schedules Object. Note that multiple schedules are supported only when budgetType is CURRENCY.

      object

      Required

      Optional

      budgetDistributorEnabled

      Specifies package budget distributor.

      • true: enable package budget distributor support.

      • false: disable package budget distributor support.

      boolean

      Optional

      Optional

      mediaType

      Specifies the media type served by the package.

      Allowed values:

      • DISPLAY: To run an image ad, create a display package item within a campaign.

      • VIDEO: To run a video ad, create a video package item within a campaign.

      1: Once the package is created, this value cannot be changed

      string

      Optional

      N/A 1

      goalType

      Specifies the goal type the platform will use to optimize package performance.

      Different goal types are available depending on the mediaType specified.

      Display Package

      • NONE: This is the default option. With this goal type, DSP does not factor in a goal when it bids on impressions.

      • CPI: Establish a cost per installation goal by specifying the target CPI (goalAmount), Max CPM (bidPrice) amounts and at least one conversion rule.

      • CPC: Establish a cost per click goal by specifying the target CPC (goalAmount) and Max CPM (bidPrice) amounts.

      • CPA: Establish a cost per action goal by specifying the Target CPA (goalAmount) and Max CPM (bidPrice) amounts and at least one conversion rule.

      • VCPM: Establish a viewable CPM goal by specifying the target VCPM (goalAmount) and Max CPM (bidPrice) amounts.

      • ROAS: Establish a return on ad spend goal by specifying the Max ROAS (maxGoal) and Max CPM (bidPrice) amounts and at least one conversion rule.

      • MAXINVIEWRATE: Maximize Viewability: Establish a soft goal to maximize viewability by specifying the Max CPM (bidPrice) amount.

        Note: Do not use MAXINVIEWRATE for display package items when the campaign object yahooBlueprintPerformance is set to true, refer to Campaigns.

      • OCPC: (Fixed CPM billing only, i.e., when billingMethodType is CPM_PRICE) Establish an optimized CPC goal by specifying the target CPC (goalAmount) and profit margin percentage (marginGoal).

        Note: Do not use OCPC for display packages items when the campaign object yahooBlueprintPerformance is set to true, refer to Campaigns.

      • CUSTOMER_VALUE_OPTIMIZATION: Establish a soft goal to maximize overall customer value by specifying the Max CPM (bidPrice) amount.

        Note: Only for display package items when the campaign object yahooBlueprintPerformance is set to true, refer to Campaigns.

      Video package

      • NONE: This is the default option. With this goal type, DSP does not factor in a goal when it bids on impressions.

      • CPI: Establish a cost per installation goal by specifying the target CPI (goalAmount), Max CPM (bidPrice) amounts and at least one conversion rule.

      • CPC: Establish a cost per click goal by specifying the target CPC (goalAmount) and Max CPM (bidPrice) amounts.

      • CPCV: Establish a cost per single completed view goal by specifying the Target CPCV (goalAmount), Max CPM (bidPrice) amounts. When billingMethodType is CPM_PRICE, additionally specify Max CPCV (maxGoal) amount.

      • VCPM: Establish a viewable CPM goal for oCPM and Fixed CPM-billed packages by specifying the target VCPM (goalAmount) and Max CPM (bidPrice) amounts.

      • MAXCOMPLETIONRATE: Maximize Completion Rate: This is a soft optimization feature that helps improve the video completion rate over time without sacrificing impression delivery. For this goal type, specify the CPM (bidPrice) amount.

        Note: Do not use MAXCOMPLETIONRATE for video package items when the campaign object yahooBlueprintPerformance is set to true, refer to Campaigns.

      • MAXCTR: Maximize CTR: This is a soft optimization feature that helps improve the click-through rate (CTR) over time without sacrificing impression delivery. For this goal type, specify the CPM (bidPrice) amount.

      • MAXINVIEWRATE: Maximize Viewability: This is a soft optimization feature that helps improve video viewability.

        A viewable video impression requires that 50% of video ad pixels are active and in the viewable portion of the viewer’s browser for two consecutive seconds. For this goal type, specify the CPM (bidPrice) amount.

        Note: Do not use MAXINVIEWRATE for video package items when the campaign object yahooBlueprintPerformance is set to true, refer to Campaigns.

      • COMPLETION_HARD_THRESHOLD: Specify Max CPM (bidPrice) amount and the completionThreshold percentage. (This goal type requires a special role).

        Note: Do not use COMPLETION_HARD_THRESHOLD for video package items when the campaign object yahooBlueprintPerformance is set to true, refer to Campaigns.

      • CUSTOMER_VALUE_OPTIMIZATION: Establish a soft goal to maximize overall customer value by specifying the Max CPM (bidPrice) amount.

        Note: Only for video package items when the campaign object yahooBlueprintPerformance is set to true, refer to Campaigns.

      string

      Optional

      Optional

      goalModeType

      Specifies the goal mode. The goal mode determines whether the optimizes for package delivery or package performance.

      Allowed values:

      • SOFT: maximizes package performance while meeting package delivery objectives (spending the package’s total budget).

      • HARD: optimizes package delivery while matching or exceeding the specified target CPC goal.

      • 2: Only valid when billingMethodType is MARGIN and when goalType is any of the following: CPC, CPA, VCPM, CPI. When not specified, defaults to SOFT for goal types CPC, VCPM and CPA or HARD for goal type CPI.

      string

      Optional 2

      Optional

      billingMethodType

      Specifies the billing method.

      Allowed values:

      • MARGIN: (oCPM) With oCPM billing, DSP predicts the probability that events (such as clicks, conversions, video completions, or impressions) will occur.

        Note: Only MARGIN is compatible with Yahoo Blueprint Performance, refer to Campaigns.

      string

      Optional

      Optional

      marginType

      Specifies how the margin is calculated.

      Allowed values:

      • TOTAL_BUDGET: Margin is calculated as a percentage of advertiser spend, which includes all costs (inventory, Yahoo fees, and variable costs).

      • BUYER_COST: Margin is calculated as a percentage of the buyer cost where buyer cost = inventory cost + Yahoo fees. This option excludes all variable costs.

      Note that this is available to self-serve accounts only.

      string

      Required

      Optional

      pacingModeType

      Specifies the pacing mode.

      Allowed values:

      • EVEN: Spread the package budget evenly. If your daily budget is Auto Allocated, DSP spreads the total budget evenly over the line’s flight dates. If your daily budget is a Specified Amount, DSP spreads the specified daily budget evenly throughout the day.

      • ASAP: Bid on every impression opportunity that meets the package’s targeting criteria. If your daily budget is Auto Allocated, DSP delivers ASAP until all remaining budget is consumed. If your daily budget is a Specified Amount, DSP delivers ASAP until the specified amount is consumed.

      • PACE_AHEAD: Provides greater control over how package budgets are allocated during a flight by enabling you to over-pace daily budgets. If the daily budget is user-specified, the line will over-pace the daily budget every day until the total budget is consumed. The amount of over-spent is determined by the pacingAcceleration specified. If the line’s daily budget is auto-allocated, the line’s spend rate is dynamically determined based on the line’s remaining total budget, the remaining days in the flight, and the line’s pacingAcceleration.

      • 3: If not specified when creating the line, defaults to EVEN.

      string

      Optional

      Optional 3

      userFrequencyCap

      Specifies multi-layer frequency cap for the package.

      With multi-layer frequency capping, you can set up to 2 layers of frequency capping. To learn more, see User Frequency Cap Object.

      object

      Optional

      Optional

      objective

      Specifies objective of the package.

      string

      Optional

      Optional

      enableBudgetRollover

      Set to true to have any unspent budget at the end of a package’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 packages.

      • 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 package 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 package’s schedule will not be moved into the next schedule.

      boolean

      Optional

      Schedules Object

      The schedules object contains the following fields:

      Field

      Description

      Data Type

      Create

      Update

      id

      Specifies the ID of the budget schedule.

      integer

      N/A

      N/A

      name

      Specifies the name of the schedule.

      4: Required when specifying multiple schedules.

      string

      Required 4

      Required

      startDate

      Specifies the start date of the package in the yyyy-MM-dd format.

      string

      Required

      Required

      endDate

      Specifies the end date of the package in the yyyy-MM-dd format.

      string

      Required

      Required

      budget

      Specifies the total budget of the package.

      5: Required when the budgetType is CURRENCY.

      number

      Required 5

      Optional

      dailyBudget

      Specifies the daily budget amount.

      6: Required when the budgetType is CURRENCY and dailyBudgetType is SPECIFIED_AMOUNT.

      number

      Required 6

      Optional

      impBudget

      Specifies the total number of impressions bought.

      7: Required when budgetType is IMPRESSION.

      integer

      Required 7

      Optional

      impDailyBudget

      Specifies the total number of impressions bought per day.

      8: Required when budgetType is IMPRESSION.

      number

      Required 8

      Optional

      dailyBudgetType

      Specifies the daily budget type.

      Allowed values:

      • SPECIFIED_AMOUNT: Specify a daily spend cap for the package during the schedule period.

      • AUTO_ALLOCATED: Allocation based on the overall budget and the number of days left in the schedule.

      string

      Required

      Optional

      language

      Specifies the language. If not specified, defaults to ENGLISH.

      string

      Optional. Required in NATIVE seats.

      Optional. Required in NATIVE seats.

      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 package can be deleted.

      Boolean

      N/A

      Optional

      User Frequency Cap Object

      A User Frequency Cap object defines multi-layer frequency capping for the package.

      The userFrequencyCap can be used to set up to 2 layers of frequency capping.

      Field

      Description

      Data Type

      Create

      Update

      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

      Note

      Only frequencyCapValueDay or frequencyCapValueWeek can be set for YPN packages using the userFrequencyCap object. But Third-Party packages support all multi-level cap.

      Read Package

      To get data for a specific package, make a GET call:

      GET /traffic/packages{id}

      Parameters

      Parameter Type

      Description

      Data Type

      Required

      id

      path

      Specifies the package ID

      integer

      Yes

      Example Request URL

      GET https://dspapi.admanagerplus.yahoo.com/traffic/packages/10286

      Example Response

      {
      "response": {
          "id": 10286,
          "orderId": 1405781,
          "name": "package-impression-2",
          "flightingEnabled": true,
          "budgetType": "IMPRESSION",
          "supplyType": "THIRD_PARTY",
          "status": "ACTIVE",
          "budgetSchedules": [
              {
                  "id": 10520,
                  "name": "s1",
                  "impBudget": 1001,
                  "impDailyBudget": 11,
                  "dailyBudgetType": "SPECIFIED_AMOUNT",
                  "startDate": "2021-08-22T07:00:00Z",
                  "endDate": "2022-12-31T08:00:00Z"
              },
              {
                  "id": 10526,
                  "name": "s2",
                  "impBudget": 100,
                  "impDailyBudget": 1,
                  "dailyBudgetType": "SPECIFIED_AMOUNT",
                  "startDate": "2021-08-20T07:00:00Z",
                  "endDate": "2021-08-21T07:00:00Z"
              }
          ]
      },
      "errors": null,
      "timeStamp": "2021-08-27T18:11:30.090Z"
      }

      Read Packages

      To get a filtered list of packages, make a GET call:

      /traffic/packages?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

      orderId

      Specifies the campaign ID.

      integer

      Yes

      query

      Specifies the search term.

      Use URL encoding conventions (i.e. a space should be replaced with a + or %20).

      string

      No

      page

      Specifies the page number.

      integer

      No

      limit

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

      integer

      No

      sort

      Specifies the column to sort by.

      string

      No

      dir

      Specifies the sort direction.

      Allowed values:

      • ASC: data is sorted in ascending order.

      • DESC: data is sorted in descending order

      string

      No

      Example Request URL

      GET https://dspapi.admanagerplus.yahoo.com/traffic/packages?orderId=1405781&limit=2&sort=id&dir=desc

      Example Response

      {
      "response": [
          {
              "id": 10286,
              "orderId": 1405781,
              "name": "package-impression-2",
              "flightingEnabled": true,
              "budgetType": "IMPRESSION",
              "supplyType": "THIRD_PARTY",
              "status": "ACTIVE",
              "budgetSchedules": [
                  {
                      "id": 10520,
                      "name": "s1",
                      "impBudget": 1001,
                      "impDailyBudget": 11,
                      "dailyBudgetType": "SPECIFIED_AMOUNT",
                      "startDate": "2021-08-22T07:00:00Z",
                      "endDate": "2022-12-31T08:00:00Z"
                  },
                  {
                      "id": 10526,
                      "name": "s2",
                      "impBudget": 100,
                      "impDailyBudget": 1,
                      "dailyBudgetType": "SPECIFIED_AMOUNT",
                      "startDate": "2021-08-20T07:00:00Z",
                      "endDate": "2021-08-21T07:00:00Z"
                  }
              ]
          },
          {
              "id": 6776,
              "orderId": 1405781,
              "name": "package-impression-1",
              "flightingEnabled": false,
              "budgetType": "IMPRESSION",
              "supplyType": "THIRD_PARTY",
              "status": "ACTIVE",
              "budgetSchedules": [
                  {
                      "id": 7004,
                      "impBudget": 8888,
                      "impDailyBudget": 88,
                      "dailyBudgetType": "SPECIFIED_AMOUNT",
                      "startDate": "2021-06-23T07:00:00Z",
                      "endDate": "2022-12-31T08:00:00Z"
                  }
              ]
          }
      ],
      "errors": null,
      "timeStamp": "2021-08-27T18:18:34.757Z"
      }

      Create Package

      To create packages, make a POST call:

      POST /traffic/packages/

      Parameters

      All fields are specified in the body of :mimetype: application/json payload.

      Example Request URL

      POST https://dspapi.admanagerplus.yahoo.com/traffic/packages

      Example Response Body

      {
          "name": "package-usd-1.5",
          "orderId": 1386505,
          "budgetType": "CURRENCY",
          "supplyType": "YAHOO",
          "status": "ACTIVE",
          "budgetSchedules": [
              {
                  "budget": 999,
                  "name": "S1",
                  "dailyBudgetType": "AUTO_ALLOCATED",
                  "startDate": "2021-12-10T08:00:00Z",
                  "endDate": "2021-12-11T08:00:00Z"
              }
          ]
      }

      Example: Create (Margin) oCPM Display Package with Budget distributor on

      To create a DISPLAY line with MARGIN (oCPM) billing type, refer to the table and payload below.

      Field

      Value

      Type

      budgetDistributorEnabled

      true

      boolean

      mediaType

      DISPLAY

      string

      goalModeType

      HARD

      string

      goalType

      CPA

      string

      billingMethodType

      MARGIN

      string

      billingPrice

      Desired % profit margin

      number

      Example Response Body

      {
        "name": "TRAFFIC_API_PACKAGE_eEYx70Ap",
        "orderId": "61",
        "bidPrice": "1.5",
        "goalAmount": "1.5",
        "billingPrice": "2.0",
        "completionThreshold": 0,
        "flightingEnabled": false,
        "budgetType": "CURRENCY",
        "status": "ACTIVE",
        "supplyType": "THIRD_PARTY",
        "budgetDistributorEnabled": true,
        "budgetSchedules": [
          {
            "budget": 100,
            "dailyBudget": 20,
            "dailyBudgetType": "SPECIFIED_AMOUNT",
            "startDate": "2021-12-02",
            "endDate": "2021-12-07"
          }
        ],
        "pacingModeType": "EVEN",
        "mediaType": "DISPLAY",
        "goalModeType": "HARD",
        "goalType": "CPA",
        "billingMethodType": "MARGIN",
        "marginType": "TOTAL_BUDGET"
      }

      Example: Create Native Display Package with Budget distributor on and User Frequency Cap

      To create a DISPLAY package with User Frequency Cap, refer to the table and payload below.

      Field

      Value

      Type

      budgetDistributorEnabled

      true

      boolean

      userFrequencyCap

      frequencyCapValueDay:10

      boolean

      mediaType

      DISPLAY

      string

      goalModeType

      HARD

      string

      goalType

      CPA

      string

      billingMethodType

      MARGIN

      string

      billingPrice

      Desired % profit margin

      number

      Example Response Body

      {
        "orderId": 61,
        "name": "TRAFFIC_TEST_PACKAGE_5OAivCTW",
        "bidPrice": 0.5,
        "goalAmount": 0.5,
        "billingPrice": 0,
        "budgetType": "CURRENCY",
        "channelType": "Native",
        "supplyType": "YAHOO",
        "objective": "VISIT_WEB",
        "status": "ACTIVE",
        "budgetSchedules": [
          {
            "budget": 100,
            "name": "CQdgy",
            "dailyBudgetType": "AUTO_ALLOCATED",
            "startDate": "2021-12-03",
            "endDate": "2021-12-05"
          }
        ],
        "mediaType": "DISPLAY",
        "goalType": "CPA",
        "billingMethodType": "MARGIN",
        "budgetDistributorEnabled": true,
        "goalModeType": "HARD",
        "marginType": "TOTAL_BUDGET",
        "pacingModeType": "EVEN",
        "userFrequencyCap": {
          "frequencyCapValueDay": 10
        }
      }

      Example: Create Native Display Package with Budget distributor on and Dynamic Product Ads Objective

      To create a DISPLAY line with Budget distributor on and Objective DYNAMIC_PRODUCT_ADS, refer to the table and payload below.

      Field

      Value

      Type

      budgetDistributorEnabled

      true

      boolean

      mediaType

      DISPLAY

      string

      goalModeType

      HARD

      string

      goalType

      ENHANCED_CPC

      string

      billingMethodType

      CPC_WITH_MARGIN

      string

      objective

      DYNAMIC_PRODUCT_ADS

      string

      Example Response Body

      {
        "orderId": 61,
        "name": "TRAFFIC_TEST_PACKAGE_Ert8aOyR",
        "bidPrice": 0.0,
        "goalAmount": 0.0,
        "billingPrice": 0.0,
        "budgetType": "CURRENCY",
        "channelType": "Native",
        "supplyType": "YAHOO",
        "objective": "DYNAMIC_PRODUCT_ADS",
        "status": "ACTIVE",
        "budgetSchedules": [
          {
            "budget": 100.0,
            "name": "lduaC",
            "dailyBudgetType": "AUTO_ALLOCATED",
            "startDate": "2021-12-03",
            "endDate": "2021-12-05"
          }
        ],
        "mediaType": "DISPLAY",
        "goalType": "ENHANCED_CPC",
        "billingMethodType": "CPC_WITH_MARGIN",
        "budgetDistributorEnabled": true,
        "goalModeType": "HARD",
        "marginType": "TOTAL_BUDGET",
        "pacingModeType": "EVEN"
      }

      Update Package

      To update a package, make a PUT request:

      PUT /traffic/packages{id}

      Partial updates are supported values of supported fields which are not in the payload will remain unchanged.

      Parameters

      The Package id is specified in the url path. All other fields are specified in the body of the application/json payload.

      Example Request URL

      PUT https://dspapi.admanagerplus.yahoo.com/traffic/packages/6776

      Example: Activate Paused Package

      The following payload shows how to change the package status from PAUSED to ACTIVE.

      Example Request Body

      {
        "status": "ACTIVE"
      }

      Example: Update Package Budget & Start/End Dates

      The following payload shows how to update the total budget and start/end dates of a package.

      Example Response Body

      {
        "budgetSchedules": [
          {
            "id": 10966,
            "name": "S1",
            "startDateStr": "2021-08-30",
            "endDateStr": "2021-10-31",
            "impBudget": 10000
          }
        ]
      }

      Remove Future Schedules for Multi-Schedule Packages

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

      PUT /traffic/packages{id}

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

      Parameters

      Specify the Package id in the url path and all other fields in the request body.

      Sample Request URL

      PUT https://dspapi.admanagerplus.yahoo.com/traffic/packages/15886

      Sample Request Body

      {
          "budgetSchedules": [
              {
                  "id": 16192,
                  "budget": 10.0,
                  "name": "sc1",
                  "dailyBudgetType": "AUTO_ALLOCATED",
                  "startDate": "2022-03-29",
                  "endDate": "2022-04-29"
              },
              {
                  "id": 17202,
                  "budget": 10.0,
                  "name": "sc2",
                  "dailyBudgetType": "AUTO_ALLOCATED",
                  "startDate": "2022-10-17",
                  "endDate": "2022-10-28",
                  "isScheduleDeleted": true
              }
          ]
      }

      Sample Response

      {
          "response": {
              "id": 15886,
              "orderId": 1667745,
              "name": "Package-test",
              "bidPrice": 1.0,
              "goalAmount": 1.0,
              "billingPrice": 0.0,
              "completionThreshold": 0.0,
              "flightingEnabled": true,
              "budgetType": "CURRENCY",
              "channelType": "DEFAULT",
              "supplyType": "UNKNOWN",
              "status": "INACTIVE",
              "budgetSchedules": [
                  {
                      "id": 16192,
                      "budget": 10.0,
                      "name": "sc1",
                      "dailyBudgetType": "AUTO_ALLOCATED",
                      "startDate": "2022-03-29T07:00:00Z",
                      "endDate": "2022-04-29T07:00:00Z"
                  }
              ],
              "mediaType": "DISPLAY",
              "goalType": "CPA",
              "billingMethodType": "MARGIN",
              "goalModeType": "HARD",
              "marginType": "TOTAL_BUDGET",
              "pacingModeType": "EVEN",
              "userFrequencyCap": {
                  "frequencyCapValueMinute": 0,
                  "frequencyCapValueHour": 0,
                  "frequencyCapValueDay": 0,
                  "frequencyCapValueWeek": 0,
                  "frequencyCapValueMonth": 0,
                  "frequencyCapPeriodMultiHour": 0,
                  "frequencyCapValueMultiHour": 0
              },
              "language": "ENGLISH"
          },
          "errors": null,
          "timeStamp": "2022-10-11T08:49:11.724Z"
      }

      Delete Packages

      The Yahoo DSP Traffic API does not support deletion of packages.

      Create a Line under a Package

      POST /traffic/lines

      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 a line under a package

      To create a line under a PACKAGE, refer to the table and payload below.

      Field

      Value

      Type

      packageId

      Package Id

      integer

      Example Request Body

      {
        "name": "display-line-under-package-1",
        "orderId": 1405783,
        "packageId": 9103,
        "bidPrice": 1,
        "goalAmount": 1,
        "maxGoal": 1,
        "billingPrice": 22,
        "isNativeEnabled": true,
        "objective": "MAIL_SPONSORED",
        "status": "ACTIVE",
        "pacingModeType": "EVEN",
        "mediaType": "DISPLAY",
        "goalModeType": "HARD",
        "goalType": "ENHANCED_CPC",
        "billingMethodType": "CPC_WITH_MARGIN",
        "marginType": "TOTAL_BUDGET",
        "budgetType": "CURRENCY",
        "schedules": [
          {
            "budget": 100,
            "startDateStr": "2021-09-05T07:00:00Z",
            "endDateStr": "2022-02-01T07:59:59Z",
            "dailyBudgetType": "AUTO_ALLOCATED"
          }
        ],
        "supplyType": "YAHOO",
        "language": "ENGLISH"
      }

      Read Lines under a package

      To get a filtered list of lines under a package, make a GET request:

      GET /traffic/lines?packageId={packageId}&query={query}&page={page}&limit={limit}&sort={sort}&dir={dir}

      All of the accepted parameters are query parameters.

      Parameters

      Parameter

      Description

      Data Type

      Required

      packageId

      Specifies the package ID.

      integer

      Yes

      query

      Specifies the search term.

      Use URL encoding conventions (i.e., a space should be replaced with a + or %20).

      string

      No

      page

      Specifies the page number.

      integer

      No

      limit

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

      integer

      No

      sort

      Specifies the column to sort by.

      string

      No

      dir

      Specifies the sort direction.

      Allowed values:

      • ASC: data is sorted in ascending order.

      • DESC: data is sorted in descending order

      string

      No

      Example Request URL

      GET https://dspapi.admanagerplus.yahoo.com/traffic/lines?packageId=15311&limit=1

      Example Response

      {
      "response": [
          {
              "id": 1887077,
              "name": "line 1",
              "orderId": 1176518,
              "bidPrice": 1.0,
              "goalAmount": 1.0,
              "billingPrice": 0.0,
              "completionThreshold": 0.0,
              "isNativeEnabled": true,
              "packageId": 15311,
              "objective": "PROMOTE_BRAND",
              "status": "ACTIVE",
              "pacingModeType": "EVEN",
              "mediaType": "DISPLAY",
              "goalModeType": "HARD",
              "goalType": "VCPM",
              "billingMethodType": "MARGIN",
              "marginType": "TOTAL_BUDGET",
              "budgetType": "CURRENCY",
              "schedules": [
                  {
                      "id": 2324122,
                      "budget": 100.0,
                      "startDateStr": "2022-01-11T08:00:00Z",
                      "endDateStr": "2022-02-01T07:59:59Z",
                      "dailyBudgetType": "AUTO_ALLOCATED"
                  }
              ],
              "feeList": [],
              "conversionList": [],
              "supplyType": "YAHOO",
              "language": "ENGLISH"
          }
      ],
      "errors": null,
      "timeStamp": "2022-01-12T00:18:15.300Z"
      }


      Was this article helpful?

      What's Next