Exchange Targeting

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

Overview

A line can target one or more publishers or available private marketplace deals (but not both).

  • Publisher. To learn more, see Deals.
  • Deal. To learn more, see Exchanges.

The Oath Ad Platforms DSP supports EXCHANGES targeting for lines serving display and video ads.

Endpoints

/traffic/lines/{id}/targeting
  • A GET request enables you to view exchanges targeted by the specified line.
  • A POST request enables you to target exchanges 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 EXCHANGES target type.

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

Field Description Data Type
publishers

Specifies the exchanges to target. The publishers payload object enables you to add or update the publishers targeted by a line.

To learn more, see publishers-object.

array
deals

Specifies private marketplace deals to target. The deals payload object enables you to add or remove the publishers targeted by a line.

To learn more, see Deals Payload Object.

object
dealsIncluded A read-only array that returns the private marketplace deals targeted for the line.. array

Note

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

Deals Payload Object

The deals payload object enables you to add or update the deals targeted by a line. The object contains the following fields:

Name Description Data Type
added

Specifies an array of deals to target. Deals are identified by dealId.

To retrieve a list of deals for targeting, use the Read Target Deals resource.

array
removed Deal IDs to be removed from targeting. array
clearAll

Indicates if all existing targeted deals should be removed. By default, false.

  • If true, remove all targeted deals. This will disable EXCHANGES targeting.
  • If false, do not remove any targeted deals.
boolean

Read Target Publishers

Retrieves a list of publishers that may be targeted for the specified line.

GET /traffic/targeting/publishers?lineId={lineId}&query={query}

Parameters

The API request requires two parameters:

Table 142 Read Target Publishers
Parameter Parameter Type Description Data Type Required?
lineId query Specifies the line ID. integer Y
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. integer Y

The response returns a list of matching deals.

Read Target Deals

Retrieves a list of deals that may be targeted for the specified line.

GET /traffic/targeting/deals?lineId={lineId}&query={query}

Parameters

The request requires two parameters:

Table 143 Read Target Deals :header-rows: 1
Parameter Parameter Type Description Data Type Required?
lineId query Specifies the line ID. integer Y
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. integer Y

The response returns a list of matching deals.

Example Request

GET https://dspapi.admanagerplus.yahoo.com/traffic/targeting/deals?lineId=365277&query=spot

Example Response

{
  "response": [
    {
      "status": "ACTIVE",
      "id": 102,
      "name": "nospotbuy",
      "exchangeId": 3,
      "exchangeDealId": "nospotbuy",
      "description": "nospotbuy",
      "reservePrice": 0,
      "spotbuy": false,
      "accountIsExcluded": false
    },
    {
      "status": "ACTIVE",
      "id": 89,
      "name": "spotbuydeal",
      "exchangeId": 9,
      "exchangeDealId": "1233",
      "description": "spotbuy",
      "reservePrice": 1,
      "spotbuy": false,
      "accountIsExcluded": false
    }
  ],
  "errors": null,
  "timeStamp": "2017-07-13T04:19:40Z"
}

Add/Updates Deal Targets

Adds or updates the deals targeted by 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.

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

Specifies an array of targeting types to target. To target deals, EXCHANGES targeting type must be specified.

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.

{
  "deals": {
    "removed": [],
    "clearAll": false,
    "added": [
      2264423
    ]
  },
  "types": [
    {
      "name": "EXCHANGES",
      "isTargeted": true
    }
  ]
}

Add/Remove Publisher Targets

Specifies publishers to target.

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
publishers body Specifies an array of publishers to target. array Y
types body

Specifies an array of targeting types to target. To target deals, EXCHANGES targeting type must be specified.

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.

{
  "publishers": [
    3,
    4
  ],
  "types": [
    {
      "name": "EXCHANGES",
      "isTargeted": true
    }
  ]
}