Inventory API
Overview
IQM's advanced algorithm determines the most relevant ads to display to a user based on their activity and the content of a given page. Inventories provide Advertisers a way to organize collections or groups based on criteria such as ad format, placement type, targeting options, and other properties. The Inventory API also allows you to create and manage advertising deals. These are the main entitites:
- Private Marketplace (PMP) Deals are a type of programmatic advertising arrangement that allows Advertisers to purchase ad Inventory through a private, invitation-only auction.
- Programmatic Guarantee (PG) Deals are a direct negotiation between one publisher and one Advertiser that offer budget predictability and avoid auction volatility by ensuring a fixed amount of ad Inventory at a pre-negotiated price.
- Inventory Groups are a collection or grouping of Inventory sources categorized by specific criteria such as ad format, placement type, targeting options, or other properties. There are three types of Inventory group: Open Exchange, PMP Deals, and Contextual Inventory.
This page will cover common methods and endpoints associated with the Inventory API.
Learn more about Inventories with our Help Center articles.
Authentication
Use the following header parameters for all requests:
Headers | |
---|---|
Authentication string required | Authentication bearer token See Authentication Guide |
X-IAA-OW-ID integer required | Organization Worskpace ID Header |
Get Inventory Details
Inventories are collections of all Inventory sources.
Use the following endpoints to get details for various aspects of Inventories, filtered by query parameters:
Query Parameters
keywords string | Keywords to search Inventory list |
countries string | Filter by country |
categories string | Filter by category |
inventoryTypes string | Filter by Inventory type |
creativeSizes string | Filter by Creative size |
creativeTypes string | Filter by Creative type |
creativeDurations string | Filter by Creative duration |
trafficTypes string | Filter by traffic type |
deviceTypes string | Filter by device type |
exchanges string | Filter by exchange |
videoPlayerSizes string | Filter by video player size |
noOfEntries integer | Maximum number of entries per page |
pageNo integer | Number of pages for retrieved data |
groupId integer | Group ID |
Get List of Inventories
GET /api/v3/inv/inventories/listGet a list of Inventories available to user.
See Supported Query Parameters.
Response Properties
inventoryDataList object | Inventory data details list | |||||||||||||||||
|
id integer | Inventory ID |
name string | Inventory name |
publisher string | Publisher |
appId string | The bundle ID (for app request) or domain (for web request) |
inventoryType string | Inventory type |
impressions integer | Impressions count |
reach integer | The number of unique individuals reached by an Inventory, does not count repeat views |
videoPercentage integer | Percentage of total ad impressions that are video-based |
- JSON
- TypeScript
{
"success": true,
"data": {
"inventoryDataList": [
{
"id": 3510,
"name": "Test Inv 1234",
"publisher": "UNKNOWN",
"appId": "INVENTORY",
"inventoryType": "Other App",
"impressions": 7397885,
"reach": 5257,
"videoPercentage": 100,
"displayPercentage": 0
},
{
"id": 4746,
"name": "Test Old TV 345",
"publisher": "UNKNOWN",
"appId": "INVENTORY",
"inventoryType": "Other App",
"impressions": 428882,
"reach": 31291,
"videoPercentage": 100,
"displayPercentage": 0
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
name: string;
publisher: string;
appId: string;
inventoryType: string;
impressions: number;
reach: number;
videoPercentage: number;
displayPercentage: number;
}[];
};
};
};
}
function getInventoriesDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3//inv/inventories/list',
params: {
query?: {
keywords?: `string`,
countries?: `string`,
categories?: `string`,
inventoryTypes?: `string`,
creativeSizes?: `string`,
creativeTypes?: `string`,
creativeDurations?: `string`,
trafficTypes?: `string`,
deviceTypes?: `string`,
exchanges?: `string`,
videoPlayerSizes?: `string`,
noOfEntries?: `number`,
pageNo?: `number`,
groupId?: `number`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Inventory Distribution
GET /api/v3/inv/inventories/distributionsGet distributions of Inventory available for user across country and other parameters.
See Supported Query Parameters.
Response Properties
countries object | List of countries and distribution values | |||||
trafficTypes object | List of traffic types and distribution values | |||||
creativeTypes object | List of Creative types and distribution values | |||||
deviceTypes object | List of device types and distribution values | |||||
object properties
|
- JSON
- TypeScript
{
"success": true,
"data": {
"countries": [
{
"label": "United States",
"value": 90.58
},
{
"label": "Brazil",
"value": 1.23
},
{
"label": "Germany",
"value": 0.79
},
{
"label": "France",
"value": 0.75
},
{
"label": "United Kingdom",
"value": 0.62
}
],
"trafficTypes": [
{
"label": "App",
"value": 62.85
},
{
"label": "Web",
"value": 37.15
}
],
"creativeTypes": [
{
"label": "Video",
"value": 47.47
},
{
"label": "Banner",
"value": 40.96
},
{
"label": "Native",
"value": 6.38
},
{
"label": "Audio",
"value": 5.19
}
],
"deviceTypes": [
{
"label": "Mobile",
"value": 43.53
},
{
"label": "Connected TV",
"value": 37.69
},
{
"label": "Desktop",
"value": 15.08
},
{
"label": "Tablet",
"value": 3.57
},
{
"label": "Unknown",
"value": 0.13
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
countries: {
label: string;
value: number;
}[];
trafficTypes: {
label: string;
value: number;
}[];
creativeTypes: {
label: string;
value: number;
}[];
deviceTypes: {
label: string;
value: number;
}
};
};
};
};
}
function getInventoriesDistributionDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3//inv/inventories/distributions',
params: {
query?: {
keywords?: `string`,
countries?: `string`,
categories?: `string`,
inventoryTypes?: `string`,
creativeSizes?: `string`,
creativeTypes?: `string`,
creativeDurations?: `string`,
trafficTypes?: `string`,
deviceTypes?: `string`,
exchanges?: `string`,
videoPlayerSizes?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Inventories Count
GET /api/v3/inv/inventories/countGet count of unique Inventories, unique publishers, total number of impressions, and total reach of all Inventories.
See Supported Query Parameters.
Response Properties
reach integer | The number of unique individuals reached by an Inventory, does not count repeat views |
publishers integer | Publishers count |
impressions object | Impressions count |
inventories object | Inventories count |
- JSON
- TypeScript
{
"success": true,
"data": {
"reach": 7983863253,
"publishers": 2010,
"impressions": 119273056646,
"inventories": 1387184
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided Inventory group."
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
reach: number;
publishers: number;
impressions: number;
Inventories: number;
};
};
};
};
}
function getInventoriesCountDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3//inv/inventories/count',
params: {
query?: {
keywords?: `string`,
countries?: `string`,
categories?: `string`,
inventoryTypes?: `string`,
creativeSizes?: `string`,
creativeTypes?: `string`,
creativeDurations?: `string`,
trafficTypes?: `string`,
deviceTypes?: `string`,
exchanges?: `string`,
videoPlayerSizes?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Inventory Group Types
GET /api/v3/inv/inventory-group-typesGet list of Inventory group types.
Response Properties
inventoryGroupTypeList integer | Inventory group type list details | |||||||
|
name string | Inventory group name |
id integer | Inventory group ID |
order integer | Order |
- JSON
- TypeScript
{
"success": true,
"data": {
"inventoryGroupTypeList": [
{
"name": "Open Exchange",
"id": 1,
"order": 1
},
{
"name": "PMP Deals",
"id": 1,
"order": 1
},
{
"name": "Contextual Inventory",
"id": 2,
"order": 2
}
],
"totalRecords": 3,
"filteredRecords": 3
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
inventoryGroupTypeList: {
name: string;
id: number;
order: number;
}[];
totalRecords: number;
filteredRecords: number;
};
};
};
};
}
function getInventoryGroupTypes(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3//inv/inventory-group-types',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Blocked Inventories
GET api/v3/inv/blocked-inventoriesBlocklisted Inventories refer to digital media placements or websites that are deemed inappropriate (adult content, hate speech, misleading information) or of low quality (low engagement, poor user experience).
Query Parameters | |
---|---|
searchField string | Search result by keyword |
inventoryIds string | Filter Inventories by Inventory ID |
noOfEntries integer | Maximum number of entries per page, default: 200 |
pageNo integer | Number of pages for retrieved data, default: 1 |
Response Properties
globalBlockedInventoryData object | Global blocked inventory data details | |||||||||||||||||
|
id integer | Inventory ID |
name string | Inventory name |
publisher string | Publisher |
appId string | The bundle ID (for app request) or domain (for web request) |
inventoryType string | Inventory type |
impressions integer | Impressions count |
reach integer | The number of unique individuals reached by an Inventory, does not count repeat views |
videoPercentage integer | Percentage of total ad impressions that are video-based |
globalBlockedInventoryIds
integer
- JSON
- TypeScript
{
"success": true,
"data": {
"globalBlockedInventoryData": [
{
"id": 35109,
"name": "Pluto TV - It's Free TV",
"publisher": "UNKNOWN",
"appId": "74519",
"inventoryType": "Other App",
"comment": "This is the comment for this Inventory",
"impressions": 0,
"uniques": 0,
"videoPercentage": 0,
"displayPercentage": 0
}
]
},
"globalBlockedInventoryIds": 1,
"filteredRecords": 13
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
globalBlockedInventoryData: {
id: number;
name: string;
publisher: string;
inventoryType: string;
comment: string;
impressions: number;
uniques: number;
videoPercentage: number;
displayPercentage: number;
}[];
globalBlockedInventoryIds: number;
filteredRecords: number;
};
};
};
};
}
function getBlockedInventories(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3//inv/blocked-inventories',
params: {
query: {
searchField: `string`,
inventoryIds: `string`,
noOfEntries: `number`,
pageNo: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Inventory Management
Optimize Inventories for specific Campaigns, download detailed Inventory files, or block Inventories.
Campaign Inventory Targeting
POST /api/v2/inv/inventories/includeExcludeInclude or exclude Inventories for Campaign targeting.
Request Schema | |
---|---|
campaignId integer | Campaign ID to target for optimization |
ids string | Comma separated strings of Inventory IDs to include in or exclude from specified Campaign |
isExcluded integer | Include in Campaign: 0 Exclude from Campaign: 1 |
Response Properties
message string | Success message |
- JSON
- TypeScript
{
"campaignId": 168622,
"ids": "1,2,3,4",
"isExcluded": 0
}
{
"statusCode": 200,
"responseObject": {
"message": "Inventories Included."
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
statusCode: number;
responseObject: {
message: string;
};
};
};
};
}
function Inventory-AddInclude/Exclude(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v2/inv/inventories/includeExclude',
requestBody: {
content: {
"application/json": {
campaignId: `number`,
ids: `string`,
isExcluded: `number`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Block Inventories
POST /api/v3/inv/inventories/blockInventories can be blocked at the account level by ID or search field.
Request Schema | |
---|---|
inventoryIds array of integers | Inventory IDs to block |
searchField string | Block Inventories by searched keyword |
Response Properties
data string | Success message |
- JSON
- TypeScript
{
"inventoryIds": [
0,
1,
5
]
}
{
"success": true,
"data": "Inventories blocked successfully."
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
statusCode: number;
responseObject: {
message: string;
};
};
};
};
}
function addInventoriesToBlockedList(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/inventories/block',
requestBody: {
content: {
"application/json": {
inventoryIds: `number`,
searchField: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Download CSV Inventory List
POST api/v3/inv/inventories/open-exchange/downloadGet a CSV Inventory list based on desired filters.
Query Parameters | |
---|---|
keywords string | Filters by list of keywords |
countries string | Filters by list of countries |
categories string | Filters by categories |
inventoryTypes string | Filters by Inventory type |
creativeSizes string | Filters by Creative sizes |
creativeDurations string | Filters by Creative durations |
trafficTypes string | Filters by traffic type |
deviceTypes string | Filters by device type |
exchanges string | Filters by exchanges |
videoPlayerSizes string | Filters by video player size |
isCsvSearch boolean | true if CSV file uploaded for query, otherwise false |
fileType string | File type to download: csv or xlsx |
Response Properties
data string | Download URL |
- JSON
- TypeScript
{
"multipartFile": "string"
}
{
"success": true,
"data": "https://iqm-ephemeral-2aca615e13f8-stage.s3.amazonaws.com/inventory/download/csv/Yash%20org%202_1720435555550.csv?response-expires-Amz-Credential"
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: string;
};
};
};
}
function downloadOpenExchangeInventoryDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/inventories/open-exchange/download',
params: {
query: {
keywords?: `string`,
countries?: `string`,
categories?: `string`,
inventoryTypes?: `string`,
creativeSizes?: `string`,
creativeTypes?: `string`,
creativeDurations?: `string`,
trafficTypes?: `string`,
deviceTypes?: `string`,
exchanges?: `string`,
videoPlayerSizes?: `string`,
isCsvSearch: `boolean`,
fileType: `string`,
}
},
requestBody: {
content: {
"application/json": {
multipartFile?: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Inventory Based on CSV File
POST api/v3/inv/inventories/csv/listGet paginated list of Inventory based on provided CSV file.
Response Properties
matchedInventories object | Matched inventories list | |||||||||||||||||
|
id integer | Inventory ID |
name string | Inventory name |
publisher string | Publisher |
appId string | The bundle ID (for app request) or domain (for web request) |
inventoryType string | Inventory type |
impressions integer | Impressions count |
reach integer | The number of unique individuals reached by an Inventory, does not count repeat views |
videoPercentage integer | Percentage of total ad impressions that are video-based |
- JSON
- TypeScript
{
"domainsFile": "string"
}
{
"success": true,
"data": {
"matchedInventories": [
{
"id": 3510,
"name": "Test Inv 1234",
"publisher": "UNKNOWN",
"appId": "INVENTORY",
"inventoryType": "Other App",
"impressions": 7397885,
"reach": 5257,
"videoPercentage": 100,
"displayPercentage": 0
},
{
"id": 4746,
"name": "Test Old TV 345",
"publisher": "UNKNOWN",
"appId": "INVENTORY",
"inventoryType": "Other App",
"impressions": 428882,
"reach": 31291,
"videoPercentage": 100,
"displayPercentage": 0
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
matchedInventories: {
id: number;
name: string;
publisher: string;
appId: string;
inventoryType: string;
impressions: number;
reach: number;
videoPercentage: number;
displayPercentage: number;
}[];
}
};
};
};
}
function getInventoriesByCSV(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/inventories/csv/list',
requestBody: {
content: {
"application/json": {
domainsFile?: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Distribution of Inventory Based on CSV File
POST api/v3/inv/inventories/csv/distributionsGet distribution of Inventory available to user across countries, Creative types, device types, traffic types, based on provided CSV file.
Response Properties
countries object | List of countries and distribution values | |||||
trafficTypes object | List of traffic types and distribution values | |||||
creativeTypes object | List of Creative types and distribution values | |||||
deviceTypes object | List of device types and distribution values | |||||
object properties
|
- JSON
- TypeScript
{
"domainsFile": "string"
}
{
"success": true,
"data": {
"countries": [
{
"label": "United States",
"value": 90.58
},
{
"label": "Brazil",
"value": 1.23
},
{
"label": "Germany",
"value": 0.79
},
{
"label": "France",
"value": 0.75
},
{
"label": "United Kingdom",
"value": 0.62
}
],
"trafficTypes": [
{
"label": "App",
"value": 62.85
},
{
"label": "Web",
"value": 37.15
}
],
"creativeTypes": [
{
"label": "Video",
"value": 47.47
},
{
"label": "Banner",
"value": 40.96
},
{
"label": "Native",
"value": 6.38
},
{
"label": "Audio",
"value": 5.19
}
],
"deviceTypes": [
{
"label": "Mobile",
"value": 43.53
},
{
"label": "Connected TV",
"value": 37.69
},
{
"label": "Desktop",
"value": 15.08
},
{
"label": "Tablet",
"value": 3.57
},
{
"label": "Unknown",
"value": 0.13
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
countries: {
label: string;
value: number;
}[];
trafficTypes: {
label: string;
value: number;
}[];
creativeTypes: {
label: string;
value: number;
}[];
deviceTypes: {
label: string;
value: number;
}[];
}
};
};
};
}
function getInventoriesDistributionsByCSV(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/inventories/csv/distributions',
requestBody: {
content: {
"application/json": {
domainsFile?: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Inventory Count Based on CSV File
POST api/v3/inv/inventories/csv/countGet Inventory count based on provided CSV file.
Response Properties
reach integer | The number of unique individuals reached by an Inventory, does not count repeat views |
publishers integer | Publishers count |
impressions object | Impressions count |
inventories object | Inventories count |
- JSON
- TypeScript
{
"domainsFile": "string"
}
{
"success": true,
"data": {
"reach": 7983863253,
"publishers": 2010,
"impressions": 119273056646,
"inventories": 1387184
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
reach: number;
publishers: number;
impressions: number;
Inventories: number;
}
};
};
};
}
function getInventoriesCountByCSV(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/inventories/csv/count',
requestBody: {
content: {
"application/json": {
domainsFile?: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Inventory Groups
Get List of Inventory Groups
GET /api/v3/inv/groups/listGet a list of Inventory groups based on various filters and parameters.
Query Parameters | |
---|---|
groupFilterId integer | Filters groups list. Supported values: All Groups [default]: 0 Share by Admin: 1 Own Groups: 2 |
groupTypeIds string | Filters groups list. Supported values: Open Exchange: 1 PMP: 2 Contextual: 3 |
ids string | Comma separated IDs |
provideAccountLevelExcludedGroup boolean | Flag to indicate whether to include account-level excluded group in response or not, default: false |
includeStatistics boolean | Flag to indicate whether to include statistics in response or not, default: true |
excludeEmptyGroups boolean | Flag to indicate whether to include empty groups in response or not, default: false |
searchField string | Searches by name |
pageSize integer | Maximum number of entries per page |
pageNo integer | Number of pages for retrieved data |
owId integer | Organization Workspace ID |
sortBy string | Sort entries by ascending (+) or descending (-) |
Response Properties
inventoryGroupList integer | Inventory group type list details | |||||||||||||||||||||||||||||||||||
|
groupTypeId integer | Inventory Group Type ID |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
owID integer | Organization Workspace ID |
impressions integer | Impressions count |
isAccountLevelExcluded boolean | Indicates that account-level excluded group is included |
whiteListedCampaignIds array of integers | Campaign IDs where this Inventory group is whitelisted |
blackListedCampaignIds array of integers | Campaign IDs where this Inventory group is blacklisted |
publishers integer | Publishers count |
uniques integer | Total number of unique impressions of the Inventories in a group |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
deals integer | Deals count |
contextualInventories integer | Contextual Inventories count |
count integer | Inventories count |
id integer | Inventory group ID |
name integer | Inventory group name |
isShared boolean | Indicates the Inventory group is shared from the Workspace: true |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 371,
"filteredRecords": 6,
"inventoryGroupList": [
{
"groupTypeId": 1,
"created": 1720032375,
"modifiedDate": "2024-07-03T13:18:26.935+0000",
"owId": 201427,
"impressions": 0,
"isAccountLevelExcluded": null,
"campaignWhitelistCount": 0,
"campaignBlacklistCount": 0,
"whiteListedCampaignIds": [
503885,
486112,
478890
],
"blackListedCampaignIds": [],
"publishers": 0,
"sharedCount": 0,
"uniques": 0,
"reach": 0,
"inventories": 0,
"deals": 0,
"contextualInventories": 0,
"count": 0,
"id": 176178,
"name": "Inventory Group - Open exchange - 3 campaign",
"isShared": false
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
totalRecords: number;
filteredRecords: number;
inventoryGroupList: {
groupTypeId: number;
created: number;
modifiedDate: string;
owId: number;
impressions: number;
isAccountLevelExcluded: boolean;
campaignWhitelistCount: number;
campaignBlacklistCount: number;
whiteListedCampaignIds: number[];
blackListedCampaignIds: number[];
publishers: number;
sharedCount: number;
uniques: number;
reach: number;
Inventories: number;
deals: number;
contextualInventories: number;
count: number;
id: number;
name: string;
isShared: boolean;
}[];
}
};
};
};
}
function getInventoryGroups(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/groups/list',
params: {
query?: {
groupFilterId?: `number`,
groupTypeIds?: `string`,
ids?: `string`,
provideAccountLevelExcludedGroup?: `boolean`,
includeStatistics?: `boolean`,
excludeEmptyGroups?: `boolean`,
searchField?: `string`,
pageSize?: `number`,
pageNo?: `number`,
owId?: `number`,
sortBy?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Inventory Groups Statistics
GET /api/v3/inv/groups/statisticsResponse Properties
totalInventoryGroups integer | Inventory groups count |
includedGroups integer | Included groups count |
excludedGroups integer | Excluded groups count |
unUsedGroups integer | Unused groups count |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalInventoryGroups": 371,
"includedGroups": 296,
"excludedGroups": 92,
"unUsedGroups": 75
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
totalInventoryGroups: number;
includedGroups: number;
excludedGroups: number;
unUsedGroups: number;
}
};
};
};
}
function getInventoryGroupsStatistics(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/groups/statistics',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaigns Attached to Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/shared/campaigns/listPath Parameter | |
---|---|
groupId | Group ID |
Response Properties
data array of integers | List of Campaign IDs |
- JSON
- TypeScript
{
"success": true,
"data": [
286107,
284229,
287201,
287202
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: number[];
};
};
};
}
function getSharedGroupCampaignList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/shared/campaign/list',
params: {
path: {
groupId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of PMP Deals In an Inventory Group
GET api/v3/group/{groupId}/pmp-dealsPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
noOfEntries | Maximum number of entries per page, default: 50 |
pageNo | Page number |
sortBy | Sorts by ascending (+) or descending (-) |
Response Properties
pmpDealData integer | PMP deals list details | |||||||||||||||||||||||||||||
|
id integer | PMP deal ID |
dealId string | Deal ID |
dealName string | PMP deal name |
description string | Deal description |
cpm integer | Cost per mille |
dealTypeId integer | Deal Type ID |
creativeTypes array of string | List of Creative types |
exchanges array of strings | List of Exchanges |
active boolean | Indicates that deal is active: true |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate string | Modified date |
applicableTo array of integers | Customer OW IDs to whom this deal is assigned and have access rights |
userName string | User name |
isPublic boolean | Indicates that this deal is shared, not private: true |
- JSON
- TypeScript
{
"success": true,
"data": {
"pmpDealData": [
{
"id": 345,
"dealId": "070621-Test Deal-MS@15",
"dealName": "0670621 Test Deal 15",
"description": "test desc",
"cpm": 2,
"dealTypeId": 2,
"creativeTypes": [
"HTML",
"Audio"
],
"exchanges": [
"Rubicon"
],
"active": true,
"created": 1623076958,
"modifiedDate": "2021-06-08T11:27:30.549+0000",
"applicableTo": [],
"userName": null,
"isPublic": true
}
],
"totalRecords": 6,
"filteredRecords": 6
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
pmpDealData: {
id: number;
dealId: string;
dealName: string;
description: string;
cpm: number;
dealTypeId: number;
creativeTypes: string[];
exchanges: string[];
active: boolean;
created: number;
modifiedDate: string;
applicableTo: string[];
userName: string;
isPublic: boolean;
}[];
totalRecords: number;
filteredRecords: number;
}
};
};
};
}
function getGroupPMPDeals(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/pmp-deals',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
noOfEntries?: `number`,
pageNo?: `number`,
sortBy?: `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get CSV List of PMP Deals In an Inventory Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/pmp-deals/csvPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
sortOrder | Sorts by ascending (asc) or, default: descending (desc) |
sortBy | Sort by parameter, default: created |
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
}
function generateGroupPMPDealsFile(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/pmp-deals/csv',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
sortOrder?: `string`,
sortBy?: `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Open Exchange Inventories In an Inventory Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/open-exchange-inventoriesPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
noOfEntries | Maximum number of entries per page, default: 50 |
pageNo | Page number |
Response Properties
openExchangeInventoryData object | Open exchange Inventory data details list | |||||||||||||||||
|
id integer | Inventory ID |
name string | Inventory name |
publisher string | Publisher |
appId string | The bundle ID (for app request) or domain (for web request) |
inventoryType string | Inventory type |
impressions integer | Impressions count |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
videoPercentage integer | Percentage of total ad impressions that are video-based |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 3,
"filteredRecords": 3,
"openExchangeInventoryData": [
{
"id": 52982,
"name": "gazeta.pl",
"publisher": "UNKNOWN",
"appId": "INVENTORY",
"inventoryType": "Site",
"impressions": 25738,
"reach": 2128,
"videoPercentage": 18.29979,
"displayPercentage": 77.989743
},
{
"id": 52983,
"name": "protopage.com",
"publisher": "UNKNOWN",
"appId": "INVENTORY",
"inventoryType": "Site",
"impressions": 4315,
"reach": 322,
"videoPercentage": 0,
"displayPercentage": 100
},
{
"id": 52986,
"name": "gwiazdy.wp.pl",
"publisher": "UNKNOWN",
"appId": "INVENTORY",
"inventoryType": "Site",
"impressions": 516,
"reach": 58,
"videoPercentage": 4.651163,
"displayPercentage": 87.596899
}
],
"uniqueRecords": 3
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
filteredRecords: number;
openExchangeInventoryData: {
id: number;
name: string;
publisher: string;
appId: string;
impressions: number;
reach: number;
videoPercentage: number;
displayPercentage: number
}[];
uniqueRecords: number;
}
}
};
};
}
function getGroupInventories(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/open-exchange-inventories',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
noOfEntries?: `number`,
pageNo?: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Distributions of Open Exchange Inventories In an Inventory Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/open-exchange-inventories/distributionsPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
Response Properties
countries object | List of countries and distribution values | |||||
trafficTypes object | List of traffic types and distribution values | |||||
creativeTypes object | List of Creative types and distribution values | |||||
deviceTypes object | List of device types and distribution values | |||||
object properties
|
- JSON
- TypeScript
{
"success": true,
"data": {
"trafficTypes": [
{
"label": "Web",
"value": 100
}
],
"countries": [
{
"label": "United States",
"value": 98.86
},
{
"label": "Netherlands",
"value": 0.98
},
{
"label": "Canada",
"value": 0.08
},
{
"label": "Ecuador",
"value": 0.03
},
{
"label": "Virgin Islands, U.S.",
"value": 0.03
}
],
"deviceTypes": [
{
"label": "Desktop",
"value": 87.68
},
{
"label": "Mobile",
"value": 9.27
},
{
"label": "Tablet",
"value": 3.06
}
],
"creativeTypes": [
{
"label": "Banner",
"value": 81.26
},
{
"label": "Video",
"value": 15.49
},
{
"label": "Native",
"value": 3.25
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
trafficTypes: {
label: string;
value: number;
}[];
countries: {
label: string;
value: number;
}[];
deviceTypes: {
label: string;
value: number;
}[];
creativeTypes: {
label: string;
value: number;
}[];
}
}
};
};
}
function getGroupInventoriesDistributions(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/open-exchange-inventories/distributions',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Count of Open Exchange Inventories In an Inventory Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/open-exchange-inventories/countPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
Response Properties
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
publishers integer | Publishers count |
impressions object | Impressions count |
inventories object | Inventories count |
- JSON
- TypeScript
{
"success": true,
"data": {
"inventories": 3,
"reach": 2689,
"publishers": 1,
"impressions": 30569
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
Inventories: number;
reach: number;
publishers: number;
impressions: number
}
}
};
};
}
function getGroupInventoriesStatistics(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/open-exchange-inventories/count',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Contextual Inventories For an Inventory Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/contextual-inventoriesPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
noOfEntries | Maximum number of entries per page, default: 50 |
pageNo | Page number |
Response Properties
id integer | Inventory ID |
inventory string | Inventory name |
contextualType integer | Contextual type ID 1: keyword 2: URL |
- JSON
- TypeScript
{
"success": true,
"data": {
"data": [
{
"id": 42486,
"inventory": "law business",
"contextualType": 1
}
],
"totalRecords": 2,
"filteredRecords": 1
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
Inventory: string;
contextualType: number;
}[];
totalRecords: number;
filteredRecords: number;
}
};
};
}
function getContextualInventoriesForGroup(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/contextual-inventories',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
noOfEntries?: `string`,
pageNo?: `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Count of Contextual Inventories For an Inventory Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/contextual-inventories/countPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
Response Properties
contextualUrlCount integer | Contextual URL count |
contextualKeywordCount integer | Contextual keyword count |
- JSON
- TypeScript
{
"success": true,
"data": {
"contextualUrlCount": 0,
"contextualKeywordCount": 1
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
contextualUrlCount: number;
contextualKeywordCount: number;
}
};
};
}
}
function getContextualInventoriesForGroupCount(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/contextual-inventories/count',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get CSV File of Contextual Inventories For an Inventory Group
GET /api/v3/inv/groups/api/v3/group/{groupId}/contextual-inventories/csvPath Parameter | |
---|---|
groupId | Group ID |
Query Parameter | |
---|---|
searchField | Search Inventory by group name |
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
}
function generateGroupContextualInventoriesFile(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/contextual/inventories/csv',
params: {
path: {
groupId: `number`
},
query: {
searchField?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Contextual Inventory
GET /api/v3/inv/contextual/recommendGET /api/v3/inv/contextual/autosuggest
Get recommended keywords or autocompleted keywords.
Query Parameters | |
---|---|
keyword string | Suggestion or Recommendation will be made based on this keyword |
Response Properties
data array of strings | Contextual keywords list |
- JSON
- TypeScript
{
"success": true,
"data": [
"sport",
"business",
"play"
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string[];
}
};
};
}
function getRecommendedKeywords(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/contextual/recommend',
params: {
query: {
keyword?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
function getAutoSuggestKeywords(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/contextual/autosuggest',
params: {
query: {
keyword?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Inventory Group Management
Update details or delete group Inventories.
Create a New Inventory Group
POST /api/v3/inv/groupsCreate an Open Exchange Inventory Group with inventoryIds
Request Schema | |
---|---|
groupName integer | Desired name for group |
groupTypeId integer | Group type. Supported values: Open Exchange: 1 PMP: 2 Contextual: 3 |
inventoryIds array of integers | Inventory IDs to include in group |
Response Properties
groupTypeId integer | Inventory Group Type ID |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
owID integer | Organization Workspace ID |
impressions integer | Impressions count |
isAccountLevelExcluded boolean | Indicates that account-level excluded group is included |
whiteListedCampaignIds array of integers | Campaign IDs where this Inventory group is whitelisted |
blackListedCampaignIds array of integers | Campaign IDs where this Inventory group is blacklisted |
publishers integer | Publishers count |
uniques integer | Total number of unique impressions of the Inventories in a group |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
deals integer | Deals count |
contextualInventories integer | Contextual Inventories count |
count integer | Inventories count |
id integer | Inventory group ID |
name integer | Inventory group name |
isShared boolean | Indicates the Inventory group is shared from the Workspace: true |
- JSON
- TypeScript
{
"groupName": "Inventory Group - Open exchange",
"groupTypeId": 1,
"inventoryIds": [
35132,
4107192
]
}
{
"success": true,
"data": {
"groupTypeId": 1,
"created": 1719836234,
"modifiedDate": "2024-07-01T12:17:20.295+0000",
"owId": 201427,
"impressions": 2334725782,
"isAccountLevelExcluded": false,
"campaignWhitelistCount": 0,
"campaignBlacklistCount": 0,
"whiteListedCampaignIds": [],
"blackListedCampaignIds": [],
"publishers": 56,
"sharedCount": 0,
"uniques": 0,
"reach": 154976228,
"inventories": 0,
"deals": 0,
"contextualInventories": 0,
"count": 2,
"id": 174594,
"name": "Inventory Group - Open exchange",
"isShared": false
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
groupTypeId: number;
created: number;
modifiedDate: string;
owId: number;
impressions: number;
isAccountLevelExcluded: boolean;
publishers: number;
sharedCount: number;
uniques: number;
reach: number;
Inventories: number;
deals: number;
contextualInventories: number;
count: number;
id: number;
name: string;
isShared: boolean
}
}
};
};
}
function addInventoryGroup(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/groups',
requestBody: {
content: {
"application/json": {
groupTypeId?: `number`,
isAllInventories?: `boolean`,
groupName: `string`,
isEmptyGroup?: `boolean`,
inventoryTypeId?: `number`,
inventoryIds?: `array of numbers`,
dealIds?: `array of numbers`,
contextualUrls?: `array of strings`,
contextualKeywords?: `array of strings`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create an Open Exchange Inventory Group with Search Filters
Request Schema | |
---|---|
groupName integer | Desired name for group |
groupTypeId integer | Group type. Supported values: Open Exchange: 1 PMP: 2 Contextual: 3 |
excludedInventoryIds array of integers | Inventory IDs to exclude from group |
countries array of integers | Country IDs |
categories array of strings | IAB Categories to include in group |
inventoryTypes array of integers | Inventory type ID |
creativeTypes array of integers | Creative Type IDs |
trafficTypes array of integers | Traffic Type IDs |
deviceTypes array of integers | Device Type IDs |
exchanges array of integers | Exchange IDs |
Response Properties
groupTypeId integer | Inventory Group Type ID |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
owID integer | Organization Workspace ID |
impressions integer | Impressions count |
isAccountLevelExcluded boolean | Indicates that account-level excluded group is included |
whiteListedCampaignIds array of integers | Campaign IDs where this Inventory group is whitelisted |
blackListedCampaignIds array of integers | Campaign IDs where this Inventory group is blacklisted |
publishers integer | Publishers count |
uniques integer | Total number of unique impressions of the Inventories in a group |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
deals integer | Deals count |
contextualInventories integer | Contextual Inventories count |
count integer | Inventories count |
id integer | Inventory group ID |
name integer | Inventory group name |
isShared boolean | Indicates the Inventory group is shared from the Workspace: true |
- JSON
- TypeScript
{
"groupTypeId": 1,
"groupName": "Inventory Group - Open exchange - search",
"excludedInventoryIds": [],
"countries": [
30100001
],
"categories": [
"IAB1-1",
"IAB1-2",
"IAB1-3",
"IAB1-4",
"IAB1-5",
"IAB1-6"
],
"inventoryTypes": [
2,
3
],
"creativeTypes": [
1
],
"trafficTypes": [
11
],
"deviceTypes": [
20300001
],
"exchanges": [
71,
75,
41,
80,
39,
47,
76,
1,
78,
69,
88,
19,
73
]
}
{
"success": true,
"data": {
"groupTypeId": 1,
"created": 1720030003,
"modifiedDate": "2024-07-03T18:06:45.627+0000",
"owId": 201427,
"impressions": 5298817,
"isAccountLevelExcluded": false,
"campaignWhitelistCount": 0,
"campaignBlacklistCount": 0,
"whiteListedCampaignIds": [],
"blackListedCampaignIds": [],
"publishers": 9,
"sharedCount": 0,
"uniques": 0,
"reach": 458855,
"inventories": 0,
"deals": 0,
"contextualInventories": 0,
"count": 24,
"id": 176177,
"name": "Inventory Group - Open exchange - search",
"isShared": false
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
groupTypeId: number;
created: number;
modifiedDate: string;
owId: number;
impressions: number;
isAccountLevelExcluded: boolean;
publishers: number;
sharedCount: number;
uniques: number;
reach: number;
Inventories: number;
deals: number;
contextualInventories: number;
count: number;
id: number;
name: string;
isShared: boolean
}
}
};
};
}
function addInventoryGroup(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/groups',
requestBody: {
content: {
"application/json": {
groupTypeId?: `number`,
isAllInventories?: `boolean`,
groupName: `string`,
isEmptyGroup?: `boolean`,
inventoryTypeId?: `number`,
inventoryIds?: `array of numbers`,
dealIds?: `array of numbers`,
contextualUrls?: `array of strings`,
contextualKeywords?: `array of strings`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create a PMP Inventory Group with dealIds
Request Schema | |
---|---|
groupName integer | Desired name for group |
groupTypeId integer | Group type. Supported values: Open Exchange: 1 PMP: 2 Contextual: 3 |
dealIds array of integers | Deal IDs to include in group |
Response Properties
groupTypeId integer | Inventory Group Type ID |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
owID integer | Organization Workspace ID |
impressions integer | Impressions count |
isAccountLevelExcluded boolean | Indicates that account-level excluded group is included |
whiteListedCampaignIds array of integers | Campaign IDs where this Inventory group is whitelisted |
blackListedCampaignIds array of integers | Campaign IDs where this Inventory group is blacklisted |
publishers integer | Publishers count |
uniques integer | Total number of unique impressions of the Inventories in a group |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
deals integer | Deals count |
contextualInventories integer | Contextual Inventories count |
count integer | Inventories count |
id integer | Inventory group ID |
name integer | Inventory group name |
isShared boolean | Indicates the Inventory group is shared from the Workspace: true |
- JSON
- TypeScript
{
"groupName": "Inventory Group - PMP",
"groupTypeId": 2,
"dealIds": [
204
]
}
{
"success": true,
"data": {
"groupTypeId": 2,
"created": 1719836290,
"modifiedDate": "2024-07-01T12:18:10.397+0000",
"owId": 201427,
"impressions": 0,
"isAccountLevelExcluded": false,
"campaignWhitelistCount": 0,
"campaignBlacklistCount": 0,
"whiteListedCampaignIds": [],
"blackListedCampaignIds": [],
"publishers": 0,
"sharedCount": 0,
"uniques": 0,
"reach": 0,
"inventories": 0,
"deals": 0,
"contextualInventories": 0,
"count": 1,
"id": 174599,
"name": "Inventory Group - PMP",
"isShared": false
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
groupTypeId: number;
created: number;
modifiedDate: string;
owId: number;
impressions: number;
isAccountLevelExcluded: boolean;
publishers: number;
sharedCount: number;
uniques: number;
reach: number;
Inventories: number;
deals: number;
contextualInventories: number;
count: number;
id: number;
name: string;
isShared: boolean
}
}
};
};
}
function addInventoryGroup(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/groups',
requestBody: {
content: {
"application/json": {
groupTypeId?: `number`,
isAllInventories?: `boolean`,
groupName: `string`,
isEmptyGroup?: `boolean`,
inventoryTypeId?: `number`,
inventoryIds?: `array of numbers`,
dealIds?: `array of numbers`,
contextualUrls?: `array of strings`,
contextualKeywords?: `array of strings`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create a PMP Inventory Group with Keywords and/or URLs
Request Schema | |
---|---|
groupName integer | Desired name for group |
groupTypeId integer | Group type. Supported values: Open Exchange: 1 PMP: 2 Contextual: 3 |
contextualUrls array of strings | Contextual URLs to include in group |
contextualKeywords array of strings | Contextual keywords to include in group |
Response Properties
groupTypeId integer | Inventory Group Type ID |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
owID integer | Organization Workspace ID |
impressions integer | Impressions count |
isAccountLevelExcluded boolean | Indicates that account-level excluded group is included |
whiteListedCampaignIds array of integers | Campaign IDs where this Inventory group is whitelisted |
blackListedCampaignIds array of integers | Campaign IDs where this Inventory group is blacklisted |
publishers integer | Publishers count |
uniques integer | Total number of unique impressions of the Inventories in a group |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
deals integer | Deals count |
contextualInventories integer | Contextual Inventories count |
count integer | Inventories count |
id integer | Inventory group ID |
name integer | Inventory group name |
isShared boolean | Indicates the Inventory group is shared from the Workspace: true |
- JSON
- TypeScript
{
"groupName": "Inventory Group - PMP",
"groupTypeId": 2,
"contextualKeywords": [
"mcd",
"coke",
"cola"
],
"contextualUrls": [
"https://mcdindia.com/",
"https://www.coca-colacompany.com/"
]
}
{
"success": true,
"data": {
"groupTypeId": 3,
"created": 1719836633,
"modifiedDate": "2024-07-01T12:23:52.829+0000",
"owId": 201427,
"impressions": 0,
"isAccountLevelExcluded": false,
"campaignWhitelistCount": 0,
"campaignBlacklistCount": 0,
"whiteListedCampaignIds": [],
"blackListedCampaignIds": [],
"publishers": 0,
"sharedCount": 0,
"uniques": 0,
"reach": 0,
"inventories": 0,
"deals": 0,
"contextualInventories": 0,
"count": 5,
"id": 174880,
"name": "Inventory Group - Contextual keywords and URLs",
"isShared": false
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
groupTypeId: number;
created: number;
modifiedDate: string;
owId: number;
impressions: number;
isAccountLevelExcluded: boolean;
publishers: number;
sharedCount: number;
uniques: number;
reach: number;
Inventories: number;
deals: number;
contextualInventories: number;
count: number;
id: number;
name: string;
isShared: boolean
}
}
};
};
}
function addInventoryGroup(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/groups',
requestBody: {
content: {
"application/json": {
groupTypeId?: `number`,
isAllInventories?: `boolean`,
groupName: `string`,
isEmptyGroup?: `boolean`,
inventoryTypeId?: `number`,
inventoryIds?: `array of numbers`,
dealIds?: `array of numbers`,
contextualUrls?: `array of strings`,
contextualKeywords?: `array of strings`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Validations
Pass different combinations of fields for validation.
Validate Group Name | |
---|---|
groupName integer | Desired name for group |
Validate Group Type | |
---|---|
groupTypeId integer | Group type. Supported values: Open Exchange: 1 PMP: 2 Contextual: 3 |
Validate Inventory Group | |
---|---|
groupName integer | Desired name for group |
groupTypeId integer | Group type. Supported values: Open Exchange: 1 PMP: 2 Contextual: 3 |
Add or Remove Mappings to an Inventory Group
POST /api/v3/inv/group/addMappingsPOST /api/v3/inv/group/removeMappings
Add or Remove Inventories (Open Exchange, Private Deals, Contextual) to a group or multiple groups.
Inventories can be added/removed by filtering for results, inputting dealIds, contextual details, or inventoryIds.
Add/Remove by Filter
Request Schema | |
---|---|
groupIds array of integers | Group IDs to add/remove mappings to/from |
keywords array of strings | Filters by keyword |
countries array of integers | Filters by Country IDs |
categories array of strings | Filter by IAB Category |
inventoryTypes array of integers | Filter by Inventory Types |
creativeSizes array of strings | Filter by Creative size |
creativeTypes array of integers | Filter by Creative Type IDs |
trafficTypes array of integers | Filter by Traffic Type IDs |
deviceTypes array of integers | Filter by Device Type IDs |
videoPlayerSizes array of integers | Filter by Video Player Size IDs |
isAllInventories boolean | Indicates Inventory IDs will be retrieved from the database instead of the UI: true |
Add/Remove by Deal ID
Request Schema | |
---|---|
groupIds array of integers | Group IDs to add/remove mappings to/from |
dealIds array of integers | Deal IDs to add/remove to/from group |
Add/Remove by Contextual Inventories
Request Schema | |
---|---|
groupIds array of integers | Group IDs to add/remove mappings to/from |
contextualKeywords array of strings | Names of Contextual Inventories |
contextualUrls array of strings | URLs of Contextual Inventories |
Add/Remove by Inventory ID
Request Schema | |
---|---|
groupIds array of integers | Group IDs to add/remove mappings to/from |
inventoryIds array of integers | Inventory IDs to add/remove to/from group |
Response Properties
groupTypeId integer | Inventory Group Type ID |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
owID integer | Organization Workspace ID |
impressions integer | Impressions count |
isAccountLevelExcluded boolean | Indicates that account-level excluded group is included |
whiteListedCampaignIds array of integers | Campaign IDs where this Inventory group is whitelisted |
blackListedCampaignIds array of integers | Campaign IDs where this Inventory group is blacklisted |
publishers integer | Publishers count |
uniques integer | Total number of unique impressions of the Inventories in a group |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
deals integer | Deals count |
contextualInventories integer | Contextual Inventories count |
count integer | Inventories count after add/remove mapping |
id integer | Inventory group ID |
name integer | Inventory group name |
isShared boolean | Indicates the Inventory group is shared from the Workspace: true |
- JSON
- TypeScript
{
"success": true,
"data": [
{
"groupTypeId": 1,
"created": 1719983099,
"modifiedDate": "2024-07-03T07:35:45.800+0000",
"owId": 202017,
"impressions": 7927783118,
"isAccountLevelExcluded": false,
"whiteListedCampaignIds": null,
"blackListedCampaignIds": null,
"publishers": 59,
"sharedCount": 1,
"uniques": 0,
"reach": 558137549,
"inventories": 0,
"deals": 0,
"contextualInventories": 0,
"count": 2,
"id": 176130,
"name": "Open Exchange Inventories Group",
"isShared": true
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
groupTypeId: number;
created: number;
modifiedDate: string;
owId: number;
impressions: number;
isAccountLevelExcluded: boolean;
publishers: number;
sharedCount: number;
uniques: number;
reach: number;
Inventories: number;
deals: number;
contextualInventories: number;
count: number;
id: number;
name: string;
isShared: boolean
}
}
};
};
}
function addMappingsToInventoryGroups(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/group/addMappings',
requestBody: {
content: {
"application/json": {
groupName: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
function removeMappingsOfInventoryGroup(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/group/removeMappings',
requestBody: {
content: {
"application/json": {
inventoryTypeId?: `number`,
searchField?: `string`,
excludedInventoryIds?: `array of numbers`,
allInventories?: `boolean`,
groupTypeId?: `number`,
groupId?: `number`,
inventoryIds?: `array of numbers`,
dealIds?: `array of numbers`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Add or Remove Customers From a Shared Inventory Group
PATCH /api/v3/inv/group/{groupId}/shared/customers/editAdd or remove Customers from an Inventory group by group ID with the following endpoint:
Path Parameters | |
---|---|
groupId integer | Group ID |
Request Schema | |
---|---|
addOwIds array of integers | Organization Worskpace IDs to add to Inventory group |
removeOwIds array of integers | Organization Workspace IDs to remove from Inventory group |
Response Properties
data array of strings | Success message |
- JSON
- TypeScript
{
"addOWIds": [
200425,
200495,
200496
],
"removeOWIds": [
200929,
200931,
200963,
200964
]
}
{
"success": true,
"data": "Your changes have been successfully saved."
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string
}
};
};
}
function editSharedGroupMapping(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/inv/group/{groupId}/shared/customers/edit',
params: {
path: {
groupId: `number`
}
},
requestBody: {
content: {
"application/json": {
addOWIds?: `array of numbers`,
removeOWIds?: `array of numbers`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Edit Inventory Group
PATCH /api/v3/inv/groups/{groupId}Edit an Inventory group.
Path Parameters | |
---|---|
groupId integer | Group ID |
Request Schema | |
---|---|
groupName string | Name of group |
Response Properties
groupTypeId integer | Inventory Group Type ID |
created integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
owID integer | Organization Workspace ID |
impressions integer | Impressions count |
isAccountLevelExcluded boolean | Indicates that account-level excluded group is included |
whiteListedCampaignIds array of integers | Campaign IDs where this Inventory group is whitelisted |
blackListedCampaignIds array of integers | Campaign IDs where this Inventory group is blacklisted |
publishers integer | Publishers count |
uniques integer | Total number of unique impressions of the Inventories in a group |
reach integer | The number of unique individuals reached by an Inventory group, does not count repeat views |
deals integer | Deals count |
contextualInventories integer | Contextual Inventories count |
count integer | Inventories count |
id integer | Inventory group ID |
name integer | Inventory group name |
isShared boolean | Indicates the Inventory group is shared from the Workspace: true |
- JSON
- TypeScript
{
"groupName": "Open exchange Group - updated"
}
{
"success": true,
"data": {
"groupTypeId": null,
"created": null,
"modifiedDate": null,
"owId": 0,
"impressions": 0,
"isAccountLevelExcluded": null,
"campaignWhitelistCount": 0,
"campaignBlacklistCount": 0,
"whiteListedCampaignIds": null,
"blackListedCampaignIds": null,
"publishers": 0,
"sharedCount": 0,
"uniques": 0,
"reach": 0,
"inventories": 0,
"deals": 0,
"contextualInventories": 0,
"count": 0,
"id": 176168,
"name": "Open exchange Group - updated",
"isShared": false
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "Inventory group name can not have more than 255 characters.",
"field": "groupName"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
groupTypeId: number;
created: number;
modifiedDate: string;
owId: number;
impressions: number;
isAccountLevelExcluded: boolean;
publishers: number;
sharedCount: number;
uniques: number;
reach: number;
Inventories: number;
deals: number;
contextualInventories: number;
count: number;
id: number;
name: string;
isShared: boolean
}
}
};
};
}
function editInventoryGroup_1(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/inv/groups/{groupId}',
params: {
path: {
groupId: `number`
}
},
requestBody: {
content: {
"application/json": {
groupName: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Delete Inventory Group
DELETE /api/v3/inv/groups/{groupId}Delete an existing Inventory group.
Path Parameters | |
---|---|
groupId integer | Group ID |
Response Properties
data array of strings | Success message |
- JSON
- TypeScript
{
"success": true,
"data": "Inventory group deleted successfully."
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string
}
};
};
}
function deleteInventoryGroup(): Promise<Responses> {
const options = {
method: 'DELETE',
url: 'https://app.iqm.com/api/v3/inv/groups/{groupId}/',
params: {
path: {
groupId: `number`
}
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Private Marketplace (PMP) Deals Details
Get PMP Deals List
POST /api/v3/pmp/deals/listGet a list of PMP deals based on desired filters available for user.
Request Schema | |
---|---|
groupId integer | Filters PMP Deals by group ID |
active | boolean |
searchKeywords array of strings | Strings used to search by dealId, dealName, or description |
creativeTypes array of integers | Creative type IDs |
exchanges array of integers | Exchanges IDs |
ids array of integers | PMP Deal IDs |
dealStatuses array of strings | Deal statuses, allowed values: inUse, unUsed, and inActive |
owIds array of integers | Organization Workspace IDs |
pageNo integer | Pages of retrieved details desired, default: 1 |
noOfEntries integer | Maximum number of deals to retrieve, default: 50 |
sortBy string | Sort entries by ascending (+dealId) or descending (-dealId) |
Response Properties
pmpDealData integer | PMP deals list details | |||||||||||||||||||||||||||
|
id integer | PMP deal ID |
dealId string | Deal ID |
dealName string | PMP deal name |
description string | Deal description |
cpm integer | Cost per mille |
dealCurationTypeId integer | Curation type ID |
creativeTypes array of string | List of Creative types |
exchanges array of strings | List of Exchanges |
active boolean | Indicates that deal is active: true |
shared boolean | Indicates that this deal is shared, not private: true |
created integer | Unix epoch creation date, in milliseconds |
assignedToCustomers array of integers | List of Customer deal is assigned to |
assignedToCampaigns array of integers | List of Campaigns deal is assigned to |
- JSON
- TypeScript
{
"groupId": 1,
"active": true,
"searchKeywords": [
"keyword1",
"keyword2"
],
"creativeTypes": [
1,
2,
3
],
"exchanges": [
1,
2,
3,
4
],
"ids": [
1,
2,
3,
4
],
"dealStatuses": [
"inUse",
"unUsed",
"inActive"
],
"sortBy": "-dealId",
"noOfEntries": 2,
"pageNo": 1
}
{
"success": true,
"data": {
"filteredRecords": 1,
"filteredList": [
{
"id": 115,
"dealId": "1476907757380667148",
"dealName": "85%+ Completion",
"description": "85%+ Completion",
"cpm": 20,
"dealCurationTypeId": 1,
"creativeTypes": [
"video"
],
"exchanges": [
"Oath"
],
"active": true,
"shared": false,
"created": 1597658148,
"assignedToCustomers": [
1,
2
],
"assignedToCampaigns": [
11223,
65333
]
}
]
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Invalid sortBy value."
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
filteredRecords: number;
filteredList: {
id: number;
dealId: number;
dealName: string;
description: string;
cpm: number;
dealCurationTypeId: number;
creativeTypes: string[];
exchanges: string[];
active: boolean;
shared: boolean;
created: number;
assignedToCustomers: number[];
assignedToCampaigns: number[];
}[]
}
}
};
};
}
function getPMPDealList(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/pmp/deals/list',
requestBody: {
content: {
"application/json": {
searchBy?: `array of strings`,
groupId?: `number`;
active?: `boolean`;
owIds?: `array of numbers`,
pagination?: `string`;
pageNo?: `number`;
noOfEntries?: `number`;
sortBy?: `string`;
searchField?: `string`;
order?: `string`,
offset?: `number`;
ids?: `array of numbers`,
searchKeywords?: `array of strings`,
creativeTypes?: `array of numbers`,
exchanges?: `array of numbers`,
dealStatuses?: `array of strings`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get PMP Deal Details by IDs
GET /api/v3/inv/pmp/deals/{id}Path Parameters | |
---|---|
id integer | PMP Deal ID |
Response Properties
pmpDealData integer | PMP deals list details | |||||||||||||||||||||||||||
|
id integer | PMP deal ID |
dealId string | Deal ID |
dealName string | PMP deal name |
description string | Deal description |
cpm integer | Cost per mille |
dealCurationTypeId integer | Curation type ID |
creativeTypes array of string | List of Creative types |
exchanges array of strings | List of Exchanges |
active boolean | Indicates that deal is active: true |
shared boolean | Indicates that this deal is shared, not private: true |
created integer | Unix epoch creation date, in milliseconds |
assignedToCustomers array of integers | List of Customer deal is assigned to |
assignedToCampaigns array of integers | List of Campaigns deal is assigned to |
- JSON
- TypeScript
{
"success": true,
"data": {
"id": 459,
"dealId": "BySuper_toAdvertiser",
"dealName": "BySuper_toAdvertiser_stageSharedOnly",
"description": "BySuper_toAdvertiser",
"cpm": 10,
"dealCurationTypeId": 2,
"creativeTypes": [
"html",
"video",
"native"
],
"exchanges": [
"Equativ"
],
"active": true,
"created": 1716877559,
"assignedToCustomers": [
201427
],
"assignedToCampaigns": [
2046372,
2053221
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
dealId: string;
dealName: string;
description: string;
cpm: number;
dealCurationTypeId: number;
creativeTypes: string[];
exchanges: string[];
active: boolean;
created: number;
assignedToCustomers: number[];
assignedToCampaigns: number[]
}
}
};
};
}
function getPMPDealDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/pmp/deals/{id}',
params: {
path: {
id: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Customers Associated with Campaigns for a PMP Deal
GET /api/v3/inv/pmp/deals/{dealId}/associated-customersPath Parameters | |
---|---|
dealId integer | PMP Deal ID |
Query Parameters | |
---|---|
owIds integer | Organization Workspace IDs |
Response Properties
data array of integers | Customer OW IDs |
- JSON
- TypeScript
{
"success": true,
"data": [
201427
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: number[]
}
};
};
}
function fetchAssociatedCustomersForPMPDeal(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/pmp/deals/{dealId}/associated-customers',
params: {
path: {
dealId: `number`
},
query?: {
owIds?: `array of numbers`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Count of PMP Deals for All statuses
GET /api/v3/inv/pmp/deals/count-by-statusResponse Properties
All integer | Total count |
inActive integer | Inactive count |
inUse integer | In use count |
unUsed integer | Unused count |
- JSON
- TypeScript
{
"success": true,
"data": {
"All": 351,
"inActive": 48,
"inUse": 266,
"unUsed": 37
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
All: number;
inActive: number;
inUse: number;
unUsed: number
}
}
};
};
}
function getPMPDealsCountByStatus(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/pmp/deals/count-by-status',
params: {
query?: {
searchKeywords?: `array of strings`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Deal Types
GET /api/v3/inv/static/deal-typesResponse Properties
dealTypeList object | Deal type details list | |||||||||
|
displayName integer | Display name |
name string | Name |
id string | ID |
order string | Order |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 2,
"filteredRecords": 2,
"dealTypeList": [
{
"displayName": "PMP Deal",
"name": "PMP deal",
"id": 1,
"order": 1
},
{
"displayName": "PG Deal",
"name": "PG deal",
"id": 2,
"order": 2
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
filteredRecords: number;
dealTypeList: {
displayName: string;
name: string;
id: number;
order: number;
}[];
}
}
};
};
}
function getDealTypes(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/static/deal-types',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Deal statuses
GET /api/v3/inv/static/deal-statusResponse Properties
dealStatuses object | Deal type details list | |||||||||
|
displayName integer | Display name |
name string | Name |
id string | ID |
order string | Order |
- JSON
- TypeScript
{
"success": true,
"data": {
"dealStatuses": [
{
"name": "active",
"id": 1,
"label": "Active",
"order": 1
},
{
"name": "inactive",
"id": 2,
"label": "Inactive",
"order": 2
}
],
"totalRecords": 2,
"filteredRecords": 2
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
filteredRecords: number;
dealStatuses: {
displayName: string;
name: string;
id: number;
order: number;
}[];
}
}
};
};
}
function getDealStatuses(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/static/deal-status',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
PMP Management
Create, update, or delete PMP Deals using the methods and endpoints outlined in this section.
Resource Properties
Create or update PMP Deals using the following properties in the Request Body Schema.
Properties | |
---|---|
dealId string | PMP Deal ID |
dealName string | PMP Deal name |
description string | PMP Deal description |
cpm integer | PMP deal Cost Per Mille (CPM) value |
dealCurationTypeId integer | Curation type ID |
creativeTypes array of integers | Creative type IDs |
exchangeId integer | Exchange associated with PMP Deal |
assignToCustomers array of integers | Customer Organization Workspace IDs |
active boolean | Deal status, active (true) or inactive (false) |
Create PMP Deal
POST api/v3/inv/pmp/deals/addCreate a new PMP Deal using the above Resource Properties as the request schema
Response Properties
id integer | PMP Deal ID |
message string | Success message |
- JSON
- TypeScript
{
"dealId": "DIewkFZALX1taoLjQg6Gge1dD6YvZYO4RChUKmOLk",
"dealName": "Deal test123",
"description": "test deal description",
"cpm": 10,
"creativeTypes": [
11,
12
],
"exchangeId": 39,
"active": true
}
{
"success": true,
"data": {
"id": 461,
"message": "Deal test123 created successfully"
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Deal id can not be longer than 500 characters",
"field": "dealId"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "Invalid exchange id/ids provided"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
}
}
};
};
400: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
field: string;
}[];
}
};
};
422: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
}
};
};
500: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
}
};
};
}
function addPMPDeal(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/pmp/deals/add',
requestBody: {
content: {
"application/json": {
dealId: `string`,
dealName: `string`,
description?: `string`,
cpm?: `number`,
dealCurationTypeId?: `number`,
creativeTypes?: `array of numbers`,
exchangeId: `number`,
assignToCustomers?: `array of numbers`,
active: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update PMP Deal
PATCH /api/v3/inv/pmp/deals/{id}Update any Resource Property of an existing PMP Deal with its ID.
Path Parameters | |
---|---|
id integer | PMP Deal ID |
Response Properties
id integer | PMP Deal ID |
message string | Success message |
- JSON
- TypeScript
{
"dealName": "New Deal Name"
}
{
"success": true,
"data": {
"id": 461,
"message": "New Deal Name updated successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
}
}
};
};
}
function editPMPDeal(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/inv/pmp/deals/{id}',
params: {
path: {
id: `number`
}
}
requestBody: {
content: {
"application/json": {
id: `string`,
dealId: `string`,
dealName: `string`,
description?: `string`,
cpm?: `number`,
dealCurationTypeId?: `number`,
creativeTypes?: `array of numbers`,
exchangeId: `number`,
assignToCustomers?: `array of numbers`,
active: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Delete PMP Deal
DELETE /api/v3/inv/pmp/dealsDelete an existing PMP Deal.
Query Parameters | |
---|---|
ids list of integers | PMP Deal IDs to delete |
Response Properties
id array of integers | PMP Deal IDs |
message string | Success message |
- JSON
- TypeScript
{
"success": true,
"data": {
"id": [
470,
471
],
"message": "Deal/s deleted successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number[];
message: string;
}
}
};
};
}
function deletePMPDeal(): Promise<Responses> {
const options = {
method: 'DELETE',
url: 'https://app.iqm.com/api/v3/inv/pmp/deals',
params: {
path: {
ids: `array of numbers`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Programmatic Guarantee (PG) Deals Details
Get PG Deals List
GET /api/v3/inv/pg/deals/listGet a list of PG deals available for user.
Query Parameters | |
---|---|
searchField string | Search results by keyword |
noOfEntries integer | Maximum number of deals to retrieve, default: 20 |
pageNo integer | Pages of retrieved details desired, default: 1 |
sortBy string | Sort results by ascending (+) or descending (-), supported values: id, dealName, cmp Default: -id |
ids array of integers | IDs of the primary key of PG Deals |
paymentTypeIds array of integers | Payment type ID 2: platform-based payment |
statusIds array of integers | Status IDs |
exchangeIds array of integers | Exchange IDs |
Response Properties
pgDealData integer | PG deals list details | |||||||||||||||||||||||
|
id integer | PG deal ID |
dealId string | Deal ID |
dealName string | PG deal name |
statusId integer | Status ID |
description string | Deal description |
paymentTypeId integer | Payment type ID 2: platform-based payment |
exchangeId integer | Exchange ID |
created integer | Unix epoch creation date, in milliseconds |
activeCampaignIds array of integers | List of active Campaigns deal is assigned to |
otherCampaignIds array of integers | List of all other status Campaigns deal is assigned to |
deleteAllowed boolean | Indicates deal can be deleted: true |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 61,
"filteredRecords": 4,
"pgDealData": [
{
"id": 873,
"dealId": "PM-RTY-98765",
"dealName": "Demo Deal D4",
"statusId": 1,
"description": "Demo deal description D4",
"paymentTypeId": 2,
"exchangeId": 11,
"created": 1719723041347,
"activeCampaignIds": [],
"otherCampaignIds": [
506172,
506173,
506174,
506175,
506176,
506177,
506178
],
"deleteAllowed": true
},
{
"id": 872,
"dealId": "PM-QWE-54321",
"dealName": "Sample Deal C3",
"statusId": 1,
"description": "Sample deal description C3",
"paymentTypeId": 2,
"exchangeId": 78,
"created": 1719722247192,
"activeCampaignIds": [
506162,
506161,
506160
],
"otherCampaignIds": [
506163,
506166,
506165,
506164
],
"deleteAllowed": false
},
...
]
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Unauthorized"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "Invalid sortBy value."
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
filteredRecords: number;
pgDealData: {
id: number;
dealId: number;
statusId: number;
description: string;
paymentTypeId: number;
exchangeId: number;
created: number;
activeCampaigns: number[];
otherCampaignIds: number[];
deleteAllowed: boolean;
}[];
}
}
};
};
}
function fetchPGDealList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/pg/deals/list',
params: {
query?: {
searchField?: `string`,
noOfEntries?: `number`,
pageNo?: `number`,
sortBy?: `string`,
exchangeId?: `string`,
ids?: `array of numbers`,
paymentTypeIds?: `array of numbers`,
statusIds?: `array of numbers`,
exchangeIds?: `array of numbers`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get PG Deals Details by ID
GET /api/v3/inv/pg/deals/{id}Get PG Deal details by specified ID including its associated Campaign IDs.
Path Parameters | |
---|---|
id integer | PG Deal ID |
Response Properties
pgDealData integer | PG deals list details | |||||||||||||||||||||
|
id integer | PG deal ID |
dealId string | Deal ID |
statusId integer | Status ID |
dealName string | PG deal name |
description string | Deal description |
paymentTypeId integer | Payment type ID 2: platform-based payment |
exchangeId integer | Exchange ID |
created integer | Unix epoch creation date, in milliseconds |
activeCampaignIds array of integers | List of active Campaigns deal is assigned to |
otherCampaignIds array of integers | List of all other status Campaigns deal is assigned to |
- JSON
- TypeScript
{
"success": true,
"data": {
"id": 872,
"dealId": "PM-QWE-54321",
"dealName": "Sample Deal C3",
"statusId": 1,
"description": "Sample deal description C3",
"paymentTypeId": 2,
"exchangeId": 78,
"created": 1719722247192,
"activeCampaignIds": [
506160,
506161,
506162
],
"otherCampaignIds": [
506163,
506164,
506165,
506166
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
filteredRecords: number;
pgDealData: {
id: number;
dealId: number;
statusId: number;
description: string;
paymentTypeId: number;
exchangeId: number;
created: number;
activeCampaigns: number[];
otherCampaignIds: number[];
}[];
}
}
};
};
}
function getPGDealById(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/inv/pg/deals/{id}',
params: {
path: {
id: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
PG Management
Create, update, or delete PG Deals using the methods and endpoints outlined in this section.
Resource Properties
Create or update PG Deals using the following properties in the Request Body Schema.
Properties | |
---|---|
dealId string | PG Deal ID |
dealName string | PG Deal name |
exchangeId integer | Exchange ID associated with PG Deal |
cpm integer | Cost Per Mille (CPM) value |
statusId integer | Status ID of PG Deal |
description string | Description or notes about the deal |
paymentTypeId integer | Payment type ID 2: platform-based payment |
Create PG Deal
POST /api/v3/inv/pg/deals/addCreate a new PG Deal. Refer to PG Deal Resource Properties above for schema.
Response Properties
id integer | PG Deal ID |
message string | Success message |
- JSON
- TypeScript
{
"dealId": "YT-Test-1234",
"dealName": "Test deal YT31",
"exchangeId": 11,
"statusId": 2,
"paymentTypeId": 1,
"description": "Test Deal"
}
{
"success": true,
"data": {
"message": "Deal Test deal YT31 created successfully",
"id": 2
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
message: string;
id: number;
}
}
};
};
}
function addPGDeal(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/inv/pg/deals/add',
requestBody: {
content: {
"application/json": {
dealId: `string`
dealName: `string`,
exchangeId: `number`,
statusId: `number`,
description?: `string`,
owId?: `number`,
paymentTypeId?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update PG Deal Details
PATCH /api/v3/inv/pg/deals/{id}Update specific details of a PG Deal. Refer to PG Deal Resource Properties above for request schema.
Path Parameters | |
---|---|
id integer | PG Deal ID |
Response Properties
data string | Success message |
- JSON
- TypeScript
{
"dealId": "PM-ABC-12345",
"dealName": "Premium Advertising Package",
"statusId": 2,
"description": "Comprehensive advertising package including display, video, and social media placements for maximum exposure.",
"cpm": 40,
"paymentTypeId": 2,
"exchangeId": 11
}
{
"success": true,
"data": "PG deal updated successfully"
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string;
}
};
};
}
function updatePGDeal(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/inv/pg/deals/{id}',
parms: {
path: {
id: `number`
}
},
requestBody: {
content: {
"application/json": {
dealId: `string`
dealName: `string`,
exchangeId: `number`,
statusId: `number`,
description?: `string`,
owId?: `number`,
paymentTypeId?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Delete PG Deal
DELETE /api/v3/inv/pg/dealsDelete an existing PG Deal.
Query Parameters | |
---|---|
ids integer required | Comma separated PG Deal IDs to delete |
Response Properties
data string | Success message |
- JSON
- TypeScript
{
"success": true,
"data": "PG Deal deleted successfully"
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string;
}
};
};
}
function deletePGDeals(): Promise<Responses> {
const options = {
method: 'DELETE',
url: 'https://app.iqm.com/api/v3/inv/pg/deals',
parms: {
query: {
ids: `array of numbers`
}
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}