Site List Targeting

This article describes resources that enable you to read and define site list and app list targeting rules.

Overview

If you have set app lists and/or site lists to include and/or exclude apps and URLs, you can target those app lists and/or site lists.

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

To learn more, refer to App & Site Lists.

Endpoint

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

  • A POST request enables you to target site lists 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.

This resource comprises multiple fields that enable you to specify line targeting across many types of targets including the SITE_LISTS target type.

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

Parameter

Parameter Type

Definition

Data Type

Required

id

path

Specifies the line ID.

integer

Y

siteLists

body

Specifies a payload object that defines the site lists to be added, removed, or cleared. Refer to SiteLists Object.

array

Y

siteListsIncluded

body

A read-only array that shows the site / app lists which are marked as Included.

For detailed field reference, refer to Site List.

array

N/A

siteListsExcluded

body

A read-only array that shows the site / app lists which are marked as Excluded.

For detailed field reference, refer to Site List.

array

N/A

SiteLists Object

Field

Description

Data Type

added

Specifies a siteList for targeting. An array of objects that contains the following required fields:

  • entityId - Specifies the ID of the site list to be targeted.

  • excluded - Indicates if the added IDs are to be excluded or included.

    • If true, exclude from targeting.

    • If false, include in targeting.

array

removed

Specifies an array of site lists to be removed. An array of IDs.

array

clearAll

Indicates if all existing site lists should be removed.

boolean

types

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

SITE_LISTS targeting type must be specified to apply the changes.

To learn more, refer to Targeting Types.

array

Note

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

Read Site List Targets

Retrieves a list of site lists or app sites that may be targeted.

GET https://api.admanagerplus.yahoo.com/traffic/targeting/sitelists?lineId={lineId}&page={page}&limit={limit}&sort={sort}&dir={dir}&query={query}

All of the accepted parameters are query parameters.

Parameters

Parameter

Description

Data Type

Required

lineId

Specifies the line ID.

integer

Y

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. Valid values:

  • asc

  • desc

string

N

query

Specifies the Search term.

Use URL encoding conventions (i.e. a space should be replaced with a + or %20). Provide a partial search string or leave it empty to get all results.

string

Y

Example Request URL

GET https://dspapi.admanagerplus.yahoo.com/traffic/targeting/sitelists?limit=2&lineId=365277&query=test

Example Response

{
  "response": [
    {
      "type": "APP_LIST",
      "id": 56919,
      "name": "Test Mobile 11/28",
      "createdAt": "2016-11-29T01:00:47Z"
    },
    {
      "type": "SITE_LIST",
      "id": 62187,
      "name": "test site list",
      "createdAt": "2017-05-31T22:35:59Z"
    }
  ],
  "errors": null,
  "timeStamp": "2017-08-03T05:18:34Z"
}

Add/Update Site Lists Targeting

Add or update site lists targeting 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

{
  "siteLists": {
    "removed": [],
    "clearAll": false,
    "added": [
      {
        "excluded": false,
        "entityId": 62187
      },
      {
        "excluded": true,
        "entityId": 90950
      }
    ]
  },
  "types": [
    {
      "name": "SITE_LISTS",
      "isTargeted": true
    }
  ]
}

Example Response

{
  "response": {
    "types": [
      {
        "name": "SITE_LISTS",
        "isTargeted": true
      }
    ],
    "siteListsIncluded": [
      {
        "id": 62187,
        "name": "test site list",
        "accountName": "Test_video_karim",
        "createdAt": "2017-05-31T22:35:59Z",
        "updatedAt": "2017-05-31T23:35:01Z",
        "totalSites": 8,
        "type": "SITE_LIST"
      }
    ],
    "siteListsExcluded": [
      {
        "id": 90950,
        "name": "test222",
        "accountName": "Traffic API ADV",
        "createdAt": "2018-11-13T00:50:23Z",
        "updatedAt": "2018-11-13T00:52:11Z",
        "totalSites": 3,
        "type": "APP_LIST"
      }
    ],
    "errors": null,
    "timeStamp": "2018-01-12T01:57:40Z"
  }
}

Additional Resources