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 Oath Ad Platforms DSP supports SITE_LISTS targeting for lines serving display and video ads.

To learn more, see /traffic/sitelists.

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 Oath Ad Platforms 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:

Field Description Data Type
id Specifies the line ID. integer
siteListsIncluded Targeted site / app lists which are marked as Included. array
siteListsExcluded Targeted site / app lists which are marked as Excluded. array
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
edit

Specifies a targeted siteList to be updated. An array of objects that contains the following required fields:

  • entityId - Specifies the ID of the beacon 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

Note

For a complete list of targeting resource fields, see 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}

Parameters

The resource takes the following parameters:

Parameter Parameter Type Description Data Type Required?
lineId query Specifies the line ID. integer Y
page query Specifies the page number. integer N
limit query Specifies the total number of items to return. Maximum allowed value is 100. integer N
sort query Specifies the column to sort by. string N
dir query

Specifies the sort direction. Valid values:

  • asc
  • desc
string N
query 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

The response will be a list of matching Site / App Lists.

Example Request

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

Example Response

{
  "response": [
    {
      "typeName": "APP_LIST",
      "id": 56919,
      "name": "Test Mobile 11/28",
      "createdAt": "2016-11-29T01:00:47Z"
    },
    {
      "typeName": "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 Targets

Add or updates a siteList that enables the line to target consumers based the sites they have visited or the apps they have used.

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.

Parameter Parameter Type Definition Data Type Required
id path Specifies the line lD. integer Y
siteLists body Specifies a payload object that defines the site lists to be added, removed, or cleared. object Y
types body

Specifies an array of targeting types to target. To target site lists, the SITE_LISTS targeting type must be enabled.

To learn more, see Targeting Types.

array Y

Example Request

The line ID is specified in the path of the resource endpoint:

POST traffic/lines/365277/targeting/

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

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