- 7 Minutes to read
Inventory Sets
- 7 Minutes to read
Multiple exchanges, deals or a combination of both can be assembled as inventory sets to target or block across multiple lines. Use inventory sets for line targeting to avoid having to manually target the same deals or exchanges one at a time across multiple lines.
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 |
---|---|---|---|---|
| The ID of the inventory set. |
| N/A | Required |
| The ID of the advertiser where the inventory set is to be located. |
| Required | Required |
| The name of the inventory set. |
| Required | Required |
| The current status of the inventory set.
|
| Required | Optional |
| The ID(s) of the deals to be included in the inventory set. Note: Deals cannot be blocked for targeting. |
| Required if the inventory set includes deals | Optional |
| The ID(s) of the exchanges to be included in the inventory set. |
| Required if the inventory set includes exchanges | Optional |
| Specifies options to share an inventory set with one or more advertisers. To learn more, refer to advertiserSharingSettings Object. |
| Optional | Required |
| A response-only field that shows the total deals, exchanges or both included in the inventory set. |
| N/A | N/A |
| A response-only field that shows the number of lines the inventory set is applied to. |
| N/A | N/A |
| A response-only field that shows the number of active lines the inventory set is applied to. |
| N/A | N/A |
| A response-only field that shows the date the inventory set was created. |
| N/A | N/A |
| A response-only field that shows the date the inventory set was last modified. |
| N/A | N/A |
| A response-only field that shows who created the inventory set. |
| N/A | N/A |
| A response-only field that shows who last modified the inventory set. |
| N/A | N/A |
| A response-only field that shows the exchange(s) included in the inventory set. |
| N/A | N/A |
| A response-only field that shows the specific advertiser where the inventory set is located. |
| N/A | N/A |
| A response-only field that shows the deals included in the inventory set. |
| 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 |
---|---|---|---|---|
| Specifies the way in which an inventory set is shared with a set of advertisers.
|
| Required | Required |
| Specifies an array of advertisers to share an inventory set with. |
| Required unless type=ALL | Required unless type=ALL |
| Specifies the advertiser ID. |
| Required | Required |
| Specifies the name of the advertiser. This field is optional, as the name of the advertiser will populate by default based on the ID. |
| 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 |
---|---|---|---|---|
| path | The ID of the inventory set. |
| Y |
Sample Request URL
GET /traffic/inventorysets/398
Sample Response
{
"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": "Vukašin Djuketi?",
"lastModifiedBy": "Vukašin Djuketi?",
"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"
}
Read a Filtered List of Inventory Sets
Get data for a filtered list of inventory sets.
GET /traffic/inventorysets?accountId={accountId}&includeChildren={includeChildren}&limit={limit}&query={query}
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 |
---|---|---|---|
| The ID of the advertiser where the inventory set is located. |
| Y |
| Specifies whether the response returns the deals or exchanges associated with the inventory set(s).
|
| N |
| Specifies the limit to the number of inventory sets that can be returned. |
| N |
| Specifies the search term. |
| N |
| Specifies the page number |
| N |
| Specifies the column to sort by. |
| N |
| Specifies the sort direction.
|
| N |
Sample Request URL
GET /traffic/inventorysets?accountId=12035
Sample Response
{
"response": [
{
"id": 98,
"name": "Test IG's 1",
"count": 5,
"appliedLineCount": 1,
"appliedActiveLineCount": 1,
"createdDate": "2021-12-23T00:01:31Z",
"lastModifiedDate": "2022-07-04T15:52:37Z",
"createdBy": "ఫణి Gudimetla",
"lastModifiedBy": "Amit Jaiswal",
"advertiser": {
"id": 12035,
"name": "DetailedAdvertiser."
},
"status": "ACTIVE",
"dealsList": [],
"advertiserSharingSettings": {
"type": "INCLUDE",
"advertisers": [
{
"id": 2132953,
"name": "Zoltar Team Advertiser"
}
]
}
}
],
"errors": null,
"timeStamp": "2023-06-21T08:49:50.623Z"
}
Create Inventory Sets
Create a new inventory set.
POST /traffic/inventorysets
Note
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,
"appliedLineCount": 0,
"appliedActiveLineCount": 0,
"createdDate": "2023-06-21T10:23:41Z",
"lastModifiedDate": "2023-06-21T10:23:41Z",
"createdBy": "Vukašin Djuketi?",
"lastModifiedBy": "Vukašin Djuketi?",
"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 Inventory Sets
Update an existing 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.
PUT /traffic/inventorysets/{id}
Parameters
Parameter | Parameter Type | Definition | Data Type | Required |
---|---|---|---|---|
| path | The ID of the inventory set. |
| 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,
"appliedLineCount":0,
"appliedActiveLineCount":0,
"createdDate":"2023-06-21T10:23:41Z",
"lastModifiedDate":"2023-06-21T10:31:30Z",
"createdBy":"Vukašin Djuketi?",
"lastModifiedBy":"Vukašin Djuketi?",
"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"
}