Ads

Overview

An ad is a creative that is linked to a line item and ready to serve on a web page.

Endpoint

https://dspapi.admanagerplus.yahoo.com/traffic/ads

Fields

The Ad object contains the following fields:

Name Description Type Add Update
id ID of the ad. integer N/A Required
name (Read-Only) Name of the ad. This value is inherited from the linked creative and should not be changed via this API. text N/A N/A
lineId Line ID. Refer to Lines. integer Required Optional
creativeId Creative ID. Refer to Creatives. integer Required Optional
status

Current status of the ad.

  • ACTIVE
  • INACTIVE

Following status type is read-only:

  • UNKNOWN
text Required Optional
mediaTypeId

(Read-Only) Ad type.

  • DISPLAY.
  • VIDEO
  • NATIVE
integer N/A N/A
updatedAt (Read-Only) Last updated timestamp. datetime N/A N/A

Read Ad (Single)

To retrieve data for a specific Ad, make a GET call with the id parameter.

GET https://dspapi.admanagerplus.yahoo.com/traffic/ads/{id}
Name Description Type Required?
id Ad ID integer Y

The response will be the Ad associated with the given ID.

Example Request

GET https://dspapi.admanagerplus.yahoo.com/traffic/ads/152630

Example Response

{
  "response": {
    "status": "ACTIVE",
    "mediaType": "DISPLAY",
    "id": 152630,
    "name": "ad-display-2x2",
    "lineId": 361734,
    "creativeId": 358605,
    "updatedAt": "2017-11-03T00:23:25Z"
  },
  "errors": null,
  "timeStamp": "2017-11-03T00:23:25Z"
}

Read Ads (Filtered)

To retrieve a filtered list of Ads assigned to a Line, make a GET call with the supported query parameters.

GET https://dspapi.admanagerplus.yahoo.com/traffic/ads?lineId={lineId}&page={page}&limit={limit}&sort={sort}&dir={dir}&query={query}
Name Description Type Required?
lineId Line ID integer Y
page Page number integer N
limit Total number of items to return. Maximum allowed value is 100. integer N
sort Column to sort by text N
dir Sort direction. Valid values: asc, desc text N
query Search term. Use url encoding conventions (i.e. a space should be replaced with a + or %20). text N

The response will be a list of matching Ads.

Example Request

GET https://dspapi.admanagerplus.yahoo.com/traffic/ads?lineId=361734&page=1&limit=20

Example Response

{
  "response": [
    {
      "status": "ACTIVE",
      "mediaType": "DISPLAY",
      "id": 148458,
      "name": "ad-display-2x2",
      "lineId": 361734,
      "creativeId": 358605,
      "updatedAt": "2017-11-02T21:42:20Z"
    },
    {
      "status": "ACTIVE",
      "mediaType": "DISPLAY",
      "id": 152630,
      "name": "ad-display-2x2",
      "lineId": 361734,
      "creativeId": 358605,
      "updatedAt": "2017-11-03T00:23:25Z"
    }
  ],
  "errors": null,
  "timeStamp": "2017-11-03T00:25:35Z"
}

Update Ad

To update an existing Ad, make a PUT call with an Ad object payload and id parameter. The response will be the updated Ad.

PUT https://dspapi.admanagerplus.yahoo.com/traffic/ads/{id}
Name Description Type Required?
id Ad ID integer Y

Example Request

PUT https://dspapi.admanagerplus.yahoo.com/traffic/ads/152630

Example Payload

{
  "status": "INACTIVE"
}

Example Response

{
  "response": {
    "status": "INACTIVE",
    "mediaType": "DISPLAY",
    "id": 152630,
    "name": "ad-display-2x2",
    "lineId": 361734,
    "creativeId": 358605,
    "updatedAt": "2017-11-03T00:43:55Z"
  },
  "errors": null,
  "timeStamp": "2017-11-03T00:43:55Z"
}

Create Ad

To create a new Ad, make a POST call with a payload body. The response will be the newly created Ad.

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

Example Request

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

Example Payload

{
  "lineId": 361734,
  "creativeId": 358605,
  "status": "ACTIVE"
}

Example Response

{
  "response": {
    "status": "ACTIVE",
    "mediaType": "DISPLAY",
    "id": 152630,
    "name": "ad-display-2x2",
    "lineId": 361734,
    "creativeId": 358605,
    "updatedAt": "2017-11-03T00:23:25Z"
  },
  "errors": null,
  "timeStamp": "2017-11-03T00:23:25Z"
}

Delete Ad

Ad deletion is not supported by the API.