Inventory Sets

Prev Next

Inventory sets, also known as inventory groups in the DSP, are groups of deals and/or exchanges that can be targeted on a line. Two types of inventory sets can be targeted:

  • Advertiser-Created Inventory Sets (referred to as Inventory Groups in the DSP) - inventory sets that can be assembled with any combination of deals and exchanges. Note that an inventory set can be blocked but only if it does not contain deals.

    OR

  • Yahoo Curated Inventory Sets (referred to as Yahoo Curated Inventory Groups in the DSP) - inventory sets that contain groups of public deals curated by the DSP and that are readily available to target on a line. Each deal in a Yahoo Curated Inventory Set offers relevant, high-quality inventory at scale, such as premier streaming apps, live sports, sustainability, Made for Advertisement free (MFA), Diverse Equity & Inclusion (DEI) and pharma 60s+. These sets are available to target for any advertiser without needing to register the individual deals within the inventory set.

Endpoint

/traffic/inventorysets

The following HTTP methods can be used:

  • Use the GET method to view an existing inventory set.

  • Use the POST method to create a new inventory set.

  • Use the PUT method to update an existing inventory set.

Resources

Inventory Sets

The inventorysets object contains the following fields:

Parameter

Definition

Data Type

Create

Update

id

The ID of the inventory set.

integer

N/A

Required

parentAccountId

The ID of the advertiser where the inventory set is to be located.

integer

Required

Required

name

The name of the inventory set.

string

Required

Required

status

The current status of the inventory set.

  • ACTIVE: the inventory set is active.

  • INACTIVE: the inventory set is inactive.

string

Required

Optional

dealIds

The ID(s) of the deals to be included in the inventory set.

Note: Deals cannot be blocked for targeting.

array

Required if the inventory set includes deals

Optional

publisherIds

The ID(s) of the exchanges to be included in the inventory set.

array

Required if the inventory set includes exchanges

Optional

advertiserSharingSettings

Specifies options to share an inventory set with one or more advertisers. To learn more, refer to advertiserSharingSettings Object.

object

Optional

Required

count

A response-only field that shows the total deals, exchanges or both included in the inventory set.

integer

N/A

N/A

appliedLineCount

A response-only field that shows the number of lines the inventory set is applied to.

integer

N/A

N/A

appliedActiveLineCount

A response-only field that shows the number of active lines the inventory set is applied to.

integer

N/A

N/A

createdDate

A response-only field that shows the date the inventory set was created.

string

N/A

N/A

lastModifiedDate

A response-only field that shows the date the inventory set was last modified.

string

N/A

N/A

createdBy

A response-only field that shows who created the inventory set.

string

N/A

N/A

lastModifiedBy

A response-only field that shows who last modified the inventory set.

string

N/A

N/A

publishers

A response-only field that provides details on which exchange(s) are included in an advertiser-created inventory set.

array

N/A

N/A

advertiser

A response-only field that shows the specific advertiser where the inventory set is located.

object

N/A

N/A

dealsList

A response-only field that provides details on which deals are included in an advertiser-created inventory set.

array

N/A

N/A

isPlatform

A response-only field that provides details on whether the inventory set is an advertiser-created inventory set or a Yahoo Curated Inventory Set.

  • true - The inventory set is a Yahoo Curated Inventory Set.

  • false - The inventory set is an advertiser-created Inventory Set.

boolean

N/A

N/A

market

A response-only field that provides details on which market or geographic location the Yahoo Curated Inventory Set is targeting.

string

N/A

N/A

platformDeals

A response-only field that provides details on which public deals are associated with a Yahoo Curated Inventory Set.

array

N/A

N/A

advertiserSharingSettings Object

The advertiserSharingSettings object specifies options to share an inventory set with one or more advertisers. The object contains the following fields.

Important

If inventory sets are being used on active lines, they cannot be unshared until they are manually removed from the lines first.

Parameter

Description

Data Type

Create

Update

type

Specifies the way in which an inventory set is shared with a set of advertisers.

  • INCLUDE - the inventory set is shared with only the advertiser(s) specified in the advertisers array.

  • EXCLUDE - the inventory set is shared with all advertiser(s) except for the ones specified in the advertisers array.

  • ALL - the inventory set is shared with all advertisers under a seat.

    Note: If ALL is chosen, then specifying a list of advertisers is not required.

string

Required

Required

advertisers

Specifies an array of advertisers to share an inventory set with.

array

Required unless type=ALL

Required unless type=ALL

id

Specifies the advertiser ID.

integer

Required

Required

name

Specifies the name of the advertiser. This field is optional, as the name of the advertiser will populate by default based on the ID.

string

Optional

Optional

Read an Inventory Set

Get data for a specific inventory set.

GET /traffic/inventorysets/{id}

Parameters

Parameter

Parameter Type

Definition

Data Type

Required

id

path

The ID of the inventory set.

integer

Y

Sample Request URL for an Advertiser-Created Inventory Set

GET /traffic/inventorysets/398

Sample Response for an Advertiser-Created Inventory Set

{
 "response": {
     "id": 398,
     "name": "vdjuketic-with-deal",
     "count": 1,
     "appliedLineCount": 1,
     "appliedActiveLineCount": 1,
     "createdDate": "2023-01-30T09:36:17Z",
     "lastModifiedDate": "2023-01-30T09:36:17Z",
     "createdBy": "John Smith",
     "lastModifiedBy": "John Smith",
     "advertiser": {
         "id": 3229241,
         "name": "vdjuketic-test-advertiser"
     },
     "status": "ACTIVE",
     "dealsList": [
         {
             "id": 19460,
             "name": "AdeDeal1",
             "exchangeDealId": "12",
             "exchangeId": 12,
             "accounts": [
                 12035
             ],
             "accountGroups": [],
             "programmaticGuaranteed": false,
             "status": "ACTIVE",
             "restricted": true
         }
     ],
     "advertiserSharingSettings": {
         "type": "NONE",
         "advertisers": []
     }
 },
 "errors": null,
 "timeStamp": "2023-06-21T08:28:27.627Z"
}

Sample Request URL for a Yahoo Curated Inventory Set

GET /traffic/inventorysets/612

Sample Response for a Yahoo Curated Inventory Set

{
    "response": {
        "id": 612,
        "name": "Platform Inventory Set Example",
        "isPlatform": true,
        "count": 2,
        "appliedLineCount": 0,
        "appliedActiveLineCount": 0,
        "createdDate": "2024-09-10T15:05:56Z",
        "lastModifiedDate": "2024-09-10T15:05:56Z",
        "market": "USA",
        "createdBy": "John Smith",
        "lastModifiedBy": "John Smith",
        "platformDeals": [
            {
                "id": 33965,
                "name": "PD-Verizon Media DSP-One Video-Back to School 2019-US-Standard",
                "exchangeId": 12,
                "exchangeDealId": "P4455",
                "floorCpm": "15.000",
                "bidRequests": null,
                "fillRate": null,
                "registeredDealId": null
            },
            {
                "id": 33967,
                "name": "PD-Verizon Media DSP-One Video-All Supply-Summer SL-US-25-Standard",
                "exchangeId": 12,
                "exchangeDealId": "P4253",
                "floorCpm": "25.000",
                "bidRequests": null,
                "fillRate": null,
                "registeredDealId": null
            }
        ],
        "status": "ACTIVE",
        "dealsList": []
    },
    "errors": null,
    "timeStamp": "2024-09-10T15:06:21.425Z"
}

Read a Filtered List of Inventory Sets

Get data for a filtered list of inventory sets.

GET /traffic/inventorysets?accountId={accountId}&page={page}&limit={limit}&includeChildren={includeChildren}&sort={sort}&dir={dir}

To get a filtered list of inventory sets, use any of the following query parameters in the URL path.

Parameters

Parameter

Definition

Data Type

Required

accountId

The ID of the advertiser where the inventory set is located.

integer

Y

includeChildren

Specifies whether the response returns the (platform) deals or exchanges associated with the inventory set(s).

  • True - returns the associated deals or exchanges with the inventory set(s)

  • False - does not return the associated deals or exchanges with the inventory set(s).

boolean

N

limit

Specifies the limit to the number of inventory sets that can be returned.

integer

N

page

Specifies the page number

integer

N

sort

Specifies the column to sort by.

string

N

dir

Specifies the sort direction.

  • ASC: data is sorted in ascending order.

  • DESC: data is sorted in descending order.

string

N

Sample Request URL

GET /traffic/inventorysets?accountId=3229191&page=1&limit=2&includeChildren=false&sort=id&dir=desc

Sample Response

{
    "response": [
        {
            "id": 631,
            "name": "Platform Inventory Group",
            "isPlatform": true,
            "count": 3,
            "appliedLineCount": 0,
            "appliedActiveLineCount": 0,
            "createdDate": "2024-12-10T11:48:09Z",
            "lastModifiedDate": "2024-12-10T11:48:09Z",
            "market": "USA",
            "createdBy": "Yahoo DSP",
            "lastModifiedBy": "Yahoo DSP",
            "status": "ACTIVE",
            "dealsList": []
        },
        {
            "id": 630,
            "name": "Standard Inventory Group",
            "isPlatform": false,
            "count": 5,
            "appliedLineCount": 0,
            "appliedActiveLineCount": 0,
            "createdDate": "2024-12-10T11:45:40Z",
            "lastModifiedDate": "2024-12-10T11:45:40Z",
            "createdBy": "John Smith",
            "lastModifiedBy": "John Smith",
            "status": "ACTIVE",
            "dealsList": []
        }
    ],
    "errors": null,
    "timeStamp": "2024-12-10T12:42:32.826Z"
}

Create Advertiser-Created Inventory Sets

Create a new advertiser-created inventory set.

POST /traffic/inventorysets

Note

  • Yahoo Curated Inventory Sets, also known as Yahoo Curated Inventory Groups, cannot be created by the Traffic API.

  • Deals cannot be blocked for targeting.

Parameters

All fields are specified in the request body.

Sample Request URL

POST /traffic/inventorysets

Sample Request Body

The following request shows an example of creating an inventory set that includes one exchange and one deal, as well as sharing it with all advertisers under the Seat.

{
 "parentAccountId":12035,
 "name":"Traffic inventory set",
 "status":"ACTIVE",
 "dealIds":[
    6
 ],
 "publisherIds":[
    1
 ],
 "advertiserSharingSettings":{
    "type":"ALL",
    "advertisers":[

    ]
 }
}

Sample Response

{
  "response": {
      "id": 428,
      "name": "Traffic inventory set",
      "count": 2,
      "isPlatform" : false
      "appliedLineCount": 0,
      "appliedActiveLineCount": 0,
      "createdDate": "2023-06-21T10:23:41Z",
      "lastModifiedDate": "2023-06-21T10:23:41Z",
      "createdBy": "John Smith",
      "lastModifiedBy": "John Smith",
      "publishers": [
          {
              "id": 1,
              "name": "MoPub"
          }
      ],
      "advertiser": {
          "id": 12035,
          "name": "DetailedAdvertiser."
      },
      "status": "ACTIVE",
      "dealsList": [
          {
              "id": 6,
              "name": "test",
              "exchangeDealId": "123123",
              "exchangeId": 3,
              "accounts": [],
              "accountGroups": [],
              "programmaticGuaranteed": true,
              "status": "ACTIVE",
              "restricted": false
          }
      ],
      "advertiserSharingSettings": {
          "type": "ALL",
          "advertisers": []
      }
  },
  "errors": null,
  "timeStamp": "2023-06-21T10:24:13.614Z"
}

Update Advertiser-Created Inventory Sets

Update an existing advertiser-created inventory set.

Important

If an inventory set’s properties need to be updated, the updates can only be made in the advertiser it was created under. It cannot be updated within the advertisers it is shared with.

Note

Yahoo Curated Inventory Sets cannot be updated by the traffic API.

PUT /traffic/inventorysets/{id}

Parameters

Parameter

Parameter Type

Definition

Data Type

Required

id

path

The ID of the inventory set.

integer

Y

Sample Request URL

PUT /traffic/inventorysets/428

Sample Request Body

{
 "parentAccountId":12035,
 "name":"Traffic inventory set test",
 "status":"ACTIVE",
 "dealIds":[
    6
 ],
 "publisherIds":[
    1
 ],
 "advertiserSharingSettings":{
    "type":"ALL",
    "advertisers":[

    ]
 }
}

Sample Response

{
 "response":{
    "id":428,
    "name":"Traffic inventory set test",
    "count":2,
    "isPlatform" : false
    "appliedLineCount":0,
    "appliedActiveLineCount":0,
    "createdDate":"2023-06-21T10:23:41Z",
    "lastModifiedDate":"2023-06-21T10:31:30Z",
    "createdBy":"John Smith",
    "lastModifiedBy":"John Smith",
    "publishers":[
       {
          "id":1,
          "name":"MoPub"
       }
    ],
    "advertiser":{
       "id":12035,
       "name":"DetailedAdvertiser."
    },
    "status":"ACTIVE",
    "dealsList":[
       {
          "id":6,
          "name":"test",
          "exchangeDealId":"123123",
          "exchangeId":3,
          "accounts":[

          ],
          "accountGroups":[

          ],
          "programmaticGuaranteed":true,
          "status":"ACTIVE",
          "restricted":false
       }
    ],
    "advertiserSharingSettings":{
       "type":"ALL",
       "advertisers":[

       ]
    }
 },
 "errors":null,
 "timeStamp":"2023-06-21T10:31:40.543Z"
}