Weather Temperature Targeting
  • 1 Minute to read

    Weather Temperature Targeting


      Article summary

      This article describes resources that enable you to read and define weather temperature targeting.

      Overview

      The Yahoo DSP supports WEATHER targeting for lines serving display and video ads.

      Endpoint

      /traffic/lines/{id}/targeting
      • A GET request enables you to view weather temperature targeted by the specified line.

      • A POST request enables you to target weather temperature with the specified line.

      Resources

      The targeting resource is the standard Yahoo DSP resource for targeting consumers based on their profiles, behaviors, and ad content.

      The targeting resource is defined by the following WEATHER targeting type-specific fields:

      Parameter

      Parameter Type

      Definition

      Data Type

      Required

      id

      path

      Specifies the line lD.

      integer

      Y

      weatherTemperatures

      body

      Weather targeting is powered by the Yahoo Weather API. You can use weather targeting to target audiences based on the real-time or forecasted weather temperature of the user’s location.

      • minTemp: Lowest allowed value is -40 F or -40 C.

      • maxTemp: Highest allowed value is 136 F or 58 C.

      • isFahrenheit: If true, use Fahrenheit units, Celsius otherwise.

      • allTemperatures: If true, all temperatures range is considered.

      object

      Y

      types

      body

      Specifies an array of targeting types to update, enable, or disable.

      WEATHER targeting type must be specified to apply the changes.

      To learn more, refer to Targeting Types.

      array

      Y

      Note

      For a complete list of targeting resource fields, refer to Targeting Object.

      Add/Update Weather Targeting

      Add or update weather targets for the specified line.

      POST /traffic/lines/{id}/targeting/

      Parameters

      The line ID is specified in the path of the URL. All other parameters are specified in the body of the application/json payload.

      Example Request URL

      POST https://dspapi.admanagerplus.yahoo.com/traffic/lines/365277/targeting/

      Example Request Body

      {
        "id": 365277,
        "weatherTemperatures": {
          "minTemp": 10,
          "maxTemp": 50,
          "isFahrenheit": true,
          "allTemperatures": false
        },
        "types": [
          {
            "name": "WEATHER",
            "isTargeted": true
          }
        ]
      }

      Example Response

      {
        "response": {
          "types": [
            {
              "name": "WEATHER",
              "isTargeted": true
            }
          ],
          "weatherTemperatures": {
            "minTemp": 10,
            "maxTemp": 50,
            "isFahrenheit": true,
            "allTemperatures": false
          },
          "errors": null,
          "timeStamp": "2020-10-26T01:57:40Z"
        }
      }

      Additional Resources

      About Targeting


      Was this article helpful?