Campaign API
Overview
The Campaign API allows you to create and manage Campaigns and Insertion Orders (IOs). This page covers the common endpoints and methods associated with the Campaign API.
- Campaigns are targeted advertising runs that operate for a set period of time under specified optimization strategies.
- Insertion Orders are the parent hierarchy to Campaigns and they define the contracts between an Advertiser and a media partner, as well as the parameters of an advertising Campaign.
More Resources
- Create a Campaign Quickstart Guide
- Create a PG Campaign Tutorial
- Media Planning and Campaign Setup Help Center article
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 Workspace ID Header |
Campaign Details
Campaign Resource Properties
Resource Properties
owId integer | Organization Workspace ID |
parentOrganizationName string | Parent Organization name |
id integer | Campaign ID |
uowId integer | User Organization Workspace ID |
campaignName string | Campaign Name |
advertiserDomain string | Campaign Advertiser Domain |
creativeType integer | Creative Type ID |
campaignType integer | Campaign Type ID |
totalBudgetPacing boolean | Budget is spent equally every hour: true |
isTvAd boolean | Specifies if Campaign is TV ad: true |
budgetDay integer | Daily budget of Campaign |
budgetTotal integer | Total budget for campaign Note: can be null if fixed daily budget, start time, and end time are provided |
maxBid integer | Max bid of budget for serving |
timezone integer | Timezone ID |
startTime integer | Unix epoch timestamp of Campaign start date, in milliseconds |
endTime integer | Unix epoch timestamp of Campaign end date, in milliseconds |
status string | Status of Campaign |
creativeIds string | Comma separated Creative Type IDs |
dspMargin integer | Campaign DSP Margin |
platformMargin integer | Campaign platform margin |
userDealMargin integer | Campaign user deal margin |
spentScale boolean | Spent scale for Campaign |
conversionType string | Conversion type of Campaign |
spent integer | Campaign spent |
bidOptimization integer | Optimize bid price based on analysis: true |
bidPacing boolean | Budget is spent equally every hour: true |
isBidShading boolean | Indicates whether Bid Shading is turned on (true) or off (false) |
impressionCapping integer | Maximum impressions in one Inventory |
maxDayImpressions integer | Maximum daily impressions |
maxDayClicks integer | Maximum daily clicks |
maxDayConversions integer | Maximum daily Conversions |
totalImpressions integer | Total Conversions |
totalClicks integer | Total clicks |
totalConversions integer | Total Conversions |
deviceType string | Comma separated Device Type IDs |
trafficType string | Comma separated Traffic Type IDs |
exchanges string | Comma separated Exchange IDs |
isLocationWithOrFilter boolean | Indicates if the location should be applied with or filtered from the results |
stateIds string | Comma separated State IDs |
countryId integer | Country ID |
locationDetails json | Location by uploaded file with targeting type |
isCampaignFromNewPlatform boolean | Indicates if Campaign is from the old platform |
campaignIabCategoryIds string | Comma separated Campaign IAB Category IDs |
rejectionReason string | Reason of rejecting Campaign |
creativesPlacementMapping json | Ad placement mapping with Creatives (present in case of audio and video Campaigns) |
organizationName string | Organization name |
userName string | Name of user |
userEmail string | Email of user |
conversionTypeId integer | Conversion type ID |
conversionIds string | Comma separated Conversions IDs |
isUnapprovedAudienceTargeted boolean | Indicates if at least one unapproved Audience is targeted in Campaign |
isAllAudienceUnapproved boolean | Indicates if all targeted Audiences are unapproved |
createDate integer | Unix epoch timestamp of Campaign creation date, in milliseconds |
ioId integer | Insertion Order ID |
ioName string | Insertion Order name |
prebidAudienceSegmentIdList array of integers | Prebid Audience segment IDs to attach Campaign to segment IDs |
campaignTypeId integer | Campaign Type ID |
budgetTypeId integer | Budget Type ID |
isEstimatorAvailable boolean | Indicates if Campaign estimator is available |
isAdvanceAudioVideoTargeted boolean | true indicates advanced targeting is enabled |
isEditAccess boolean | Indicates if user has edit access for the requested resources |
isMarginSet boolean | Indicates if margin is set for the workspace/Customer |
isApprovalAccess boolean | Indicates if user has access to approve |
isParentInvoiceTemplateSet boolean | Indicates if client has set the invoice template |
locationDetails example
"locationDetails": {
"1010": {
"fileName": "bulk-location-example(10)(2).csv",
"fileType": "location",
"validLocations": [
{
"latitude": 40.7128,
"longitude": -74.006,
"radius": 0.5,
"address": "1 Murray Street, New York, NY 10007, USA",
"locationId": 48374,
"isIncluded": true,
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 36.7783,
"longitude": -119.4179,
"radius": 1.0,
"address": "Center stage, 2630 Croydon Drive, Sanger, CA 93657, USA",
"locationId": 48375,
"isIncluded": true,
"cdId": 0,
"sdId": 0,
"hdId": 0
}
],
"id": 1010
},
"1011": {
"fileName": "bulk-addresses-example (4)(1).csv",
"fileType": "address",
"validLocations": [
{
"latitude": 35.7831443,
"longitude": -78.6388985,
"radius": 0.5,
"address": "16 West Jones Street,Raleigh,NC,27601",
"locationId": 48376,
"isIncluded": false,
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7803163,
"longitude": -78.5326985,
"radius": 1.34,
"address": "1002 Lyndhurst Falls Ln,Knightdale,NC,27545",
"locationId": 48377,
"isIncluded": true,
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.8440052,
"longitude": -78.6580243,
"radius": 1.2,
"address": "4604 Gramercy Ct,Raleigh,NC,27609",
"locationId": 48378,
"isIncluded": true,
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.8074803,
"longitude": -78.6582902,
"radius": 1.5,
"address": "2612 Dover Rd,Raleigh,NC,27608",
"locationId": 48379,
"isIncluded": true,
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7950389,
"longitude": -78.65665039999999,
"radius": 1.0,
"address": "820 Graham St ,Raleigh,NC,27605",
"locationId": 48380,
"isIncluded": true,
"cdId": 0,
"sdId": 0,
"hdId": 0
}
],
"id": 1011
}
}
Get Campaign Details by ID
GET /api/v2/cmp/campaign/{campaignId}Get a Campaign's basic details and targeting details by ID.
| Path Parameters | |
|---|---|
| campaignId integer | Campaign ID |
| Query Parameters | |
|---|---|
| isSpentRequired boolean | Flag to get the Campaign spent Default: false |
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"owId": 203578,
"parentOrganizationName": "Signup testing 1",
"id": 537599,
"uowId": 188494,
"campaignName": "TestCampaign",
"advertiserDomain": "https://iqm.com",
"creativeType": 11,
"campaignType": 1,
"totalBudgetPacing": true,
"isTvAd": false,
"budgetDay": 1199.08,
"budgetTotal": 50000.0,
"maxBid": 15.0,
"timezone": 29,
"startTime": 1726518001,
"endTime": 1727668800,
"status": "pending",
"dspMargin": 0,
"platformMargin": 0,
"userDealMargin": 0,
"spentScale": false,
"creativeIds": "676384",
"conversionType": "None",
"bidOptimization": true,
"bidPacing": true,
"isBidShading": false,
"impressionCapping": 0,
"maxDayImpressions": 0,
"maxDayClicks": 0,
"maxDayConversions": 0,
"totalImpressions": 0,
"totalClicks": 0,
"totalConversions": 0,
"deviceType": "13,15,11,12",
"trafficType": "11,12",
"exchanges": "",
"isLocationWithOrFilter": true,
"countryId": "30100001",
"locationDetails": {},
"isCampaignFromNewPlatform": true,
"organizationName": "User's Org",
"userEmail": "User@iqm.com",
"userName": "User",
"conversionTypeId": 0,
"isUnapprovedAudienceTargeted": false,
"isAllAudienceUnapproved": false,
"createDate": 1726517360,
"ioId": 15844,
"ioName": "Test2",
"prebidAudienceSegmentIdList": [],
"campaignTypeId": 1,
"budgetTypeId": 1,
"isAdvanceAudioVideoTargeted": false,
"isEstimatorAvailable": true,
"isEditAccess": true,
"isMarginSet": false,
"isApprovalAccess": false,
"isParentInvoiceTemplateSet": true
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
owId: number;
parentOrganizationName: string;
id: number;
uowId: number;
campaignName: string;
advertiserDomain: string;
creativeType: number;
campaignType: number;
totalBudgetPacing: boolean;
isTvAd: boolean;
budgetDay: number;
budgetTotal: number;
maxBid: number;
timezone: number;
startTime: number;
endTime: number;
status: string;
dspMargin: number;
platformMargin: number;
userDealMargin: number;
spentScale: boolean;
creativeIds: string;
conversionType: string;
bidOptimization: boolean;
bidPacing: boolean;
isBidShading: boolean;
impressionCapping: number;
maxDayImpressions: number;
maxDayClicks: number;
maxDayConversions: number;
totalImpressions: number;
totalClicks: number;
totalConversions: number;
deviceType: string;
trafficType: string;
exchanges: string;
isLocationWithOrFilter: boolean;
countryId: string;
locationDetails: {}
isCampaignFromNewPlatform: boolean;
organizationName: string;
userEmail: string;
userName: string;
conversionTypeId: number;
isUnapprovedAudienceTargeted: boolean;
isAllAudienceUnapproved: boolean;
createDate: number;
ioId: number;
ioName: number;
prebidAudienceSegmentIdList: number[];
campaignTypeId: number;
budgetTypeId: number;
isAdvanceAudioVideoTargeted: boolean;
isEstimatorAvailable: boolean;
isEditAccess: boolean;
isMarginSet: boolean;
isApprovalAccess: boolean;
isParentInvoiceTemplateSet: boolean;
}
}
}
}
}
function getCampaign(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v2/cmp/campaign/{campaignId}',
params: {
query?: {
isSpentRequired?: `boolean`,
},
path: {
campaignId: `number`
}
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaigns
GET /api/v2/cmp/campaigns/dataReturns list of Campaigns based on set of filters and conversionId query parameter.
A Campaign id can be used to Get Campaign Details by ID or to perform various actions in Campaign Management.
| Query Parameters | |
|---|---|
searchField string | Search results by keyword |
limit integer | Maximum number of entries returned, default: 50 |
pageNo integer | Page number for the data, default: 1 |
sortBy string | Sorts by ascending (+) or descending (-), default: -created |
conversionId integer | Targeted Campaign will be returned at top of list |
status string | Filter by multiple statuses |
owIds integer | Filter by Organization Workspace IDs |
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"totalRecords": 1498,
"data": [
{
"id": 176881,
"name": "Campaign to test duplicate copy",
"creativeTypeId": 14,
"campaignType": "CPV",
"status": "pending",
"advertiserId": 100419,
"created": 1620024156,
"modifiedDate": 1621571575,
"conversionId": 18
},
{
"id": 176880,
"name": "Campaign to test duplicate update",
"creativeTypeId": 14,
"campaignType": "CPV",
"status": "pending",
"advertiserId": 100419,
"created": 1620024050,
"modifiedDate": 1621571575,
"conversionId": 18
},
{
"id": 176879,
"name": "to test campaign duplication",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "pending",
"advertiserId": 100419,
"created": 1620023582,
"modifiedDate": 1620024188
},
{
"id": 176148,
"name": "campaign to test Inventory group and all device type",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "pending",
"advertiserId": 100419,
"created": 1618990887,
"modifiedDate": 1618992828
},
{
"id": 173357,
"name": "test cb",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "running",
"advertiserId": 100001,
"created": 1617170692,
"modifiedDate": 1619433624
},
{
"id": 173353,
"name": "test cb",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "running",
"advertiserId": 100001,
"created": 1617163055,
"modifiedDate": 1619433624
},
{
"id": 173318,
"name": "test cb1",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "running",
"advertiserId": 100001,
"created": 1617130075,
"modifiedDate": 1619433624
},
{
"id": 173317,
"name": "test cb",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "running",
"advertiserId": 100001,
"created": 1617126490,
"modifiedDate": 1619433624
},
{
"id": 173316,
"name": "test old cb",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "running",
"advertiserId": 100001,
"created": 1617125771,
"modifiedDate": 1619433624
},
{
"id": 169459,
"name": "test daily",
"creativeTypeId": 11,
"campaignType": "CPM",
"status": "pending",
"advertiserId": 100419,
"created": 1611734667,
"modifiedDate": 1618992828
}
],
"filteredRecords": 1039
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
totalRecords: number;
data: {
id: number;
name: string;
creativeTypeId: number;
campaignType: string;
status: string;
advertiserId: number;
created: number;
modifiedDate: number;
conversionId?: number;
}[];
filteredRecords: number;
};
};
};
};
}
function Getcampaigndata(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v2/cmp/campaigns/data',
params: {
query: {
searchField: `string`,
pageNo: `number`,
limit: `number`,
sortBy: `string`,
conversionId: `number`,
status: `string`,
owIds: `number`,
},
header: {
"X-IAA-HOST": `string`
}
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaigns with Basic Details
GET /api/v2/cmp/campaigns/listReturns a paginated list of Campaigns with their basic details.
| Query Parameters | |
|---|---|
search_field string | Search results by keyword |
no_of_entries integer | Maximum number of entries returned, default: 50 |
pgno integer | Page number for the data, default: 1 |
order string | Sorts by ascending (asc) or descending (desc) |
creative_type_ids integer | Filter by Creative Type ID |
created_time_of_creative string | Filter by Creative creation time |
status string | Filter by multiple statuses Supported values: running, pending, paused, draft, rejected, expired |
ow_ids integer | Filter by Organization Workspace IDs |
- JSON
- TypeScript
{
"statusCode": 200,
"recordsTotal": 1,
"pageNumber": 1,
"pageSize": 50,
"draw": 0,
"recordsFiltered": 1,
"data": [
{
"id": "214269",
"name": "Name Edit Test_UI",
"status": "pending",
"owId": 1000,
"uowId": 1,
"advertiser_email": null,
"advertiser_id": 0,
"campaign_type": "CPM",
"creative_type": "HTML",
"dsp_id": 0,
"start_date": 1632873600,
"end_date": 1632829200,
"creative_type_id": 13,
"total_budget": 1000
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
recordsTotal: number;
pageNumber: number;
pageSize: number;
draw: number;
recordsFiltered: number;
data: {
id: string;
name: string;
status: string;
owId: number;
uowId: number;
advertiser_email: string | null;
advertiser_id: number;
campaign_type: string;
creative_type: string;
dsp_id: number;
start_date: number;
end_date: number;
creative_type_id: number;
total_budget: number;
}[];
};
};
};
}
function GetCampaignList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v2/cmp/campaigns/list',
params: {
query: {
creative_type_ids: `string`,
created_time_of_creative: `string`,
sort_by: `string`,
order: `string`,
no_of_entries: `number`,
pgno: `number`,
search_field: `string`,
status: `string`,
ow_ids: `string`,
},
header: {
"X-IAA-HOST": `string`
}
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Basic Details of Campaigns
POST /api/v3/cmp/basic/list| Request Schema | |
|---|---|
pageNo integer | Page number for the data, default: 1 |
noOfEntries integer | Maximum number of entries returned, default: 20, maximum: 500 |
sortBy string | Sorts results by specified field |
order string | Sorts by ascending (asc) or descending (desc) |
searchField string | Search results by keyword |
campaignIds array of integers | Filters results by provided Campaign IDs |
owIds array of integers | Filters results by provided OW IDs |
status array of strings | Filters results by provided Campaign statuses |
responseFields array of strings | Choose which values to return in response, supported: id, campaignId, name,creativeTypeId, status, startTime, endTime, createdAt, modifiedAt, owId, organizationName, organizationLogo |
creativeTypeIds array of integers | Filters results by provided Creative Type IDs |
campaignTypeIds array of integers | Filter results by Campaign Type IDs |
isAllOwIds boolean | Filters records with all allowed OW IDs if true, prioritizes records over owIds |
ids array of integers | Prioritizes results of provided Campaign group IDs over other records |
ioIdsList array of integers | Filters results by provided Insertion Order IDs |
- JSON
- TypeScript
{
"isAllOwIds": false,
"owIds": [
200002
],
"searchField": "",
"pageNo": 1,
"noOfEntries": 50
}
{
"success": true,
"data": {
"data": [
{
"campaignId": 273438,
"name": "Campaign-1",
"creativeTypeId": 11,
"campaignTypeId": 1,
"status": "deleted",
"startTime": 1658217468,
"endTime": 1658303868,
"createdAt": 1658217469,
"modifiedAt": 1661150517,
"owId": 200002,
"organizationName": "Organization-1",
"organizationLogo": "https://iqm-web-assets-c92d6b6cbde1-stage.s3.amazonaws.com/avatar/SA.png",
"ioId": 1,
"ioStatusId": 1,
"timezoneId": 11,
"ioBudgetTypeId": 1,
"ioName": "Name Insertion Order"
},
{
"campaignId": 261497,
"name": "Campaign-2",
"creativeTypeId": 11,
"campaignTypeId": 1,
"status": "running",
"startTime": 1653551400,
"endTime": 1674777600,
"createdAt": 1653550497,
"modifiedAt": 1661150407,
"owId": 200002,
"organizationName": "Organization-1",
"organizationLogo": "https://iqm-web-assets-c92d6b6cbde1-stage.s3.amazonaws.com/avatar/SA.png",
"ioId": 1,
"ioStatusId": 1,
"timezoneId": 11,
"ioBudgetTypeId": 1,
"ioName": "Name Insertion Order"
}
],
"totalRecords": 2,
"filteredRecords": 50
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
data: {
campaignId: number;
name: string;
creativeTypeId: number;
campaignTypeId: number;
status: string;
startTime: number;
endTime: number;
createdAt: number;
modifiedAt: number;
owId: number;
organizationName: string;
organizationLogo: string;
ioId: number;
ioStatusId: number;
timezoneId: number;
ioBudgetTypeId: number;
ioName: string;
}[];
totalRecords: number;
filteredRecords: number
}
}
};
};
}
function getCampaignBasicDetailList(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/basic/list',
requestBody: {
content: {
"application/json": {
campaignIds?: `array of numbers`,
owIds?: `array of numbers`,
isAllOwIds?: `boolean`,
status?: `array of strings`,
creativeTypeIds?: `array of numbers`,
ids?: `array of numbers`,
responseFields?: `array of strings`,
ioIdsList?: `array of numbers`,
campaignTypeIds?: `array of numbers`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Campaign Audience Targeting Details
POST /api/v3/cmp/audience/targetingGet a list of Audience IDs and type for each Campaign ID.
| Request Schema | |
|---|---|
campaignIds array of integers | Campaign IDs |
Response Properties
campaignId object | Name-Value pairs of campaignId and its object properties | |||||
| ||||||
audienceTypeId integer | Audience Type ID |
audienceIds array of integers | Audience IDs |
- JSON
- TypeScript
{
"campaignIds": [
52241,
50322
]
}
{
"success": true,
"data": {
"543363": [],
"553441": [
{
"audienceTypeId": 1,
"audienceIds": [
1101833,
1101834,
1101835,
1102476
]
}
],
"553443": [
{
"audienceTypeId": 1,
"audienceIds": [
1101831,
1101835,
1102476
]
},
{
"audienceTypeId": 9,
"audienceIds": [
1124205,
1124206
]
}
]
}
}
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: {
[campaignId: number]: {
audienceTypeId: number;
audienceIds: number[];
}
}[];
};
};
};
}
function getAudienceBasicDetailByCampaign(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/audience/targeting',
requestBody: {
content: {
"application/json": {
campaignIds?: `array of numbers`,
owIds?: `array of numbers`,
isAllOwIds?: `boolean`,
status?: `array of strings`,
creativeTypeIds?: `array of numbers`,
ids?: `array of numbers`,
responseFields?: `array of strings`,
ioIdsList?: `array of numbers`,
campaignTypeIds?: `array of numbers`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaigns with Filters
POST /api/v3/cmp/customer/campaigns/listFilter Campaign list by the following parameters:
| Request Schema | |
|---|---|
searchField string | Search results by keyword |
noOfEntries integer | Maximum number of entries returned, default: 20, maximum: 500 |
pageNo integer | Page number for the data, default: 1 |
sortBy string | Sorts by specified field |
order string | Sorting order, ascending (asc) or descending (desc) |
campaignIds array of integers | Filter results by Campaign IDs |
owIds array of integers | Filter results by Organization Workspace IDs |
status array of strings | Filter results by statuses |
created integer | Date created, unix epoch |
isBasicInfo boolean | If true returns fewer details, if false returns all details |
creativeTypeIds array of integers | Filter results by Creative Type IDs |
campaignTypeIds array of integers | Filter results by Campaign Type IDs |
ids array of integers | Prioritizes results of provided Campaign IDs over other records |
- JSON
- TypeScript
{
"isBasicInfo": true,
"sortBy": "modifiedDate",
"pageNo": 1,
"noOfEntries": 10,
"status": "pending",
"searchField": "",
"owIds": "all",
"creativeTypeIds": "",
"campaignTypeIds": [
2
],
"created": ""
}
{
"success": true,
"data": {
"totalRecords": 5435,
"data": [
{
"owId": 201900,
"parentOrganizationName": "Yashwant Ad Org",
"id": 440264,
"name": "QA Dollar API Pending - 233",
"creativeType": "Image",
"creativeTypeId": 11,
"budgetTotal": 10000,
"budgetDay": 50,
"maxBid": 21,
"startTime": 1695873600,
"uowId": 106792,
"status": "pending",
"created": 1695793014,
"modifiedDate": 1695793014,
"userName": "Yashwant",
"timeZoneName": null,
"endTime": 0,
"totalSpent": 0,
"organizationName": "Yashwant Ad workspace",
"userEmail": "yashwant.p+adv@iqm.com",
"budgetTypeId": 1,
"impression": 0,
"campaignTypeId": 2,
"pgPaymentTypeId": 2,
"totalImpressions": 0,
"isParentInvoiceTemplateSet": true,
"isApprovalAccess": true,
"isEditAccess": true,
"isMarginSet": true
},
{
"owId": 201923,
"parentOrganizationName": "Yashwant Ad Org",
"id": 440133,
"name": "IMP camp budget API - 296",
"creativeType": "Image",
"creativeTypeId": 11,
"budgetTotal": 100,
"budgetDay": 2.2,
"maxBid": 10,
"startTime": 1697700365,
"uowId": 107184,
"status": "pending",
"created": 1695744164,
"modifiedDate": 1695744164,
"userName": "Yashwant adv4",
"timeZoneName": null,
"endTime": 0,
"totalSpent": 0,
"organizationName": "Sample adv4",
"userEmail": "yashwant.p+adv4@iqm.com",
"budgetTypeId": 2,
"campaignTypeId": 1,
"impression": 0,
"totalImpressions": 10000,
"isParentInvoiceTemplateSet": true,
"isApprovalAccess": true,
"isEditAccess": true,
"isMarginSet": false
}
],
"filteredRecords": 5435
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Please provide valid value of status."
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
data: {
owId: number;
parentOrganizationName: string;
id: number;
name: string;
creativeType: string;
budgetTotal: number;
budgetDay: number;
maxBid: number;
startTime: number;
uowId: number;
status: string;
created: number;
modifiedDate: number;
userName: string;
timeZoneName: string;
endTime: number;
totalSpent: number;
organizationName: string;
useremail: string;
budgetTypeId: number;
impression: number;
campaignTypeId: number;
pgPaymentTypeId: number;
totalImpressions: number;
isParentInvoiceTemplateSet: boolean;
isApprovalAccess: boolean;
isMarginSet: boolean;
}[];
filteredRecords: number
}
}
};
};
400: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string
}
}
};
};
}
function getCampaignDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/customer/campaigns/list',
requestBody: {
content: {
"application/json": {
owIds?: `string`,
creativeTypeIds?: `string`,
creativeTypeIdsList?: `array of numbers`,
status?: `string`,
created?: `number`,
isBasicInfo?: `boolean`,
campaignTypeIds?: `array of numbers`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Campaign Budget Details
GET /api/v2/cmp/campaign/budgetInfoGet Campaign budget info and graph details.
| Query Parameters | |
|---|---|
budgetTotal integer | Campaign total budget Note: can be null if fixed daily budget, start time, and end time are provided |
dailyBudget integer | Campaign daily budget Note: can be null if fixed daily budget, start time, and end time are provided |
fixedDailyBudget boolean | Flag to indicate whether daily budget is fixed or not |
startTime integer required | Campaign start time |
endTime integer | Campaign end time Note: can be null if fixed daily budget, start time, and end time are provided |
timezone integer required | Campaign timezone |
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"campaignId": 168930,
"budgetTotal": 30000,
"actualSpent": 0,
"dailyBudget": 5000,
"fixedDailyBudget": false,
"startTime": 1610211600,
"endTime": 1610686800,
"timezone": 371,
"graphInfo": [
{
"date": "2021-01-08T18:30:00.000+0000",
"amount": 131.0083085876,
"type": "spent"
},
{
"date": "2021-01-09T18:30:00.000+0000",
"amount": 86.1821112588,
"type": "spent"
},
{
"date": "2021-01-10T18:30:00.000+0000",
"amount": 127.31636722319996,
"type": "spent"
},
{
"date": "2021-01-11T18:30:00.000+0000",
"amount": 9885.01,
"type": "projected"
},
{
"date": "2021-01-12T18:30:00.000+0000",
"amount": 9885.01,
"type": "projected"
},
{
"date": "2021-01-13T18:30:00.000+0000",
"amount": 9885.01,
"type": "projected"
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
campaignId: number;
budgetTotal: number;
actualSpent: number;
dailyBudget: number;
fixedDailyBudget: boolean;
startTime: number;
endTime: number;
timezone: number;
graphInfo: {
date: string;
amount: number;
type: string;
}[];
};
};
};
};
}
function CampaignBudgetInfo(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v2/cmp/campaign/budgetInfo',
params: {
query: {
budgetTotal: `number`,
dailyBudget: `number`,
fixedDailyBudget: `boolean`,
startTime: `number`,
endTime: `number`,
timezone: `number`,
},
header: {
"X-IAA-HOST": `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaign Groups
POST /api/v3/cmp/campaigngroup/listFilter Campaign list by the following parameters:
| Request Schema | |
|---|---|
searchField string | Search results by keyword |
noOfEntries integer | Maximum number of entries returned, default: 20, maximum: 500 |
pageNo integer | Page number for the data, default: 1 |
sortBy string | Sorts by specified field |
order string | Sorting order, ascending (asc) or descending (desc) |
campaignGroupIds array of integers | Filter results by Campaign group IDs |
owIds array of integers | Filter results by Organization Workspace IDs |
isAllOwIds boolean | Filters records with all allowed OW IDs if true, prioritizes records over owIds |
ids array of integers | Prioritizes results of provided Campaign group IDs over other records |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 20,
"owIds": [],
"ids": [
1235
],
"sortBy": "id",
"order": "asc",
"searchField": ""
}
{
"success": true,
"data": {
"data": [
{
"groupId": 1234,
"groupName": "campaign group -1",
"createdDate": 1668201219,
"owId": 1
},
{
"groupId": 1235,
"groupName": "campaign group -2",
"createdDate": 1674798403,
"owId": 1
}
],
"totalRecords": 2,
"filteredRecords": 2
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "invalid arguments owIds!"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
data: {
groupId: number;
groupName: string;
createdDate: number;
owId: number;
}[]
totalRecords: number;
filteredRecords: number
}
}
};
};
400: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[]
}
};
};
}
function getCampaignGroupList(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/campaigngroup/list',
requestBody: {
content: {
"application/json": {
searchField?: `string`,
noOfEntries?: `number`,
pageNo?: `number`,
sortBy?: `string`,
order?: `string`,
campaignGroupIds?: `array of numbers`,
owIds?: `array of numbers`,
isAllOwIds?: `boolean`,
ids?: `array of numbers`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Deals Associated with Campaigns
GET /api/v3/cmp/campaigns/{campaignTypeId}/dealsGet a list of Campaigns and their associated deal IDs by Campaign Type ID.
| Path Parameter | |
|---|---|
campaignTypeId integer | Campaign Type ID 1: Advanced 2: PG |
Response Properties
data object | Name-Value pairs of campaignId and an array of deal IDs |
- JSON
- TypeScript
{
"success": true,
"data": {
"503584": [
468,
469,
23
],
"503947": [
468,
469
],
"504447": [
468,
469
],
"504448": [
589,
588
],
"505743": [
468,
469
],
"505753": [
468,
469
],
"505754": [
468,
469
],
"505755": [
588,
589
],
"505758": [
468,
469
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success?: boolean;
errorObjects?: {
error?: string;
reason?: string;
field?: string;
}[];
data?: Record<string, never>;
};
};
};
}
function getDealsPerCampaign(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/cmp/campaigns/{campaignTypeId}/deals',
params: {
path: {
campaignTypeId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Campaign Count by Status
POST /api/v3/cmp/campaigns/countThis API returns a count of Campaigns for each status type.
| Request Schema | |
|---|---|
owIds string | Comma separated Organization Workspace IDs, returns Campaign counts (supported: all) |
ioIdsstring | Comma separated Insertion Order IDs, returns Campaign counts (with owIds = all) |
campaignTypeIds string | Filter results by Campaign Type IDs (ioIds also required) |
campaignExpiredAfterEpoch integer | Unix epoch timestamp (in milliseconds) expiration |
searchField string | Returns Campaign counts for field matched Campaign ID or Name |
Response Properties
order integer | Display order |
status_key string | Status key |
status_label string | Status label |
status_count integer | Campaign count |
- JSON
- TypeScript
{
"owIds": "all",
"ioIds": "1,2,3"
}
{
"success": true,
"data": [
{
"order": 0,
"status_key": "running",
"status_label": "Running",
"status_count": 10
},
{
"order": 1,
"status_key": "pending",
"status_label": "Pending",
"status_count": 11
},
{
"order": 2,
"status_key": "paused",
"status_label": "Paused",
"status_count": 22
},
{
"order": 5,
"status_key": "deleted",
"status_label": "Deleted",
"status_count": 33
},
{
"order": 6,
"status_key": "expired",
"status_label": "Expired",
"status_count": 44
},
{
"order": 3,
"status_key": "draft",
"status_label": "Draft",
"status_count": 55
},
{
"order": 7,
"status_key": "rejected",
"status_label": "Rejected",
"status_count": 66
},
{
"order": 8,
"status_key": "all",
"status_label": "ALL",
"status_count": 77
}
]
}
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: {
order: number;
status_key: string;
status_label: string;
status_count: string;
}[];
}
}
};
}
function getCampaignsCount(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/campaigns/count',
requestBody: {
content: {
"application/json": {
owIds: `string`,
ioIds: `string`,
campaignTypeIds: `string`,
campaignExpiredAfterEpoch: `number`,
searchField: `string`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Campaign Count with Campaign Type
POST /api/v3/cmp/campaign-type/countReturns values of Campaign types with count of Campaigns.
| Request Schema | |
|---|---|
budgetTypeIds array of integers | Filters results for selected Budget Type ID: dollar-based Campaign or impression-based Campaign |
statusList array of strings | Filters results for types of Campaign statuses |
countRequired boolean | Returns Campaigns count with Campaign type if true |
campaignIds array of integers | Filters results for selected Campaign IDs |
ioIds array of integers | Filters results for selected Insertion Order IDs |
creativeTypeIds array of integers | Filters results for Creative Type IDs |
| Properties | |
|---|---|
Advanced ID: 1 | Campaign with Audience, impressions, and bid optimization settings |
PG ID: 2 | Campaign associated with PG deal |
Response Properties
campaignTypeDetails object | Campaign type details | |||||||||||
| ||||||||||||
id integer | Campaign type ID |
order integer | Display order |
name integer | Campaign type name |
label integer | Campaign type label |
count integer | Campaign count |
- JSON
- TypeScript
{
"statusList": [
"pending"
],
"creativeTypeIds": [
11
],
"budgetTypeIds": [
1
],
"campaignIds": [
23434,
46453
],
"countRequired": "true"
}
{
"success": true,
"data": {
"totalRecords": 2,
"filteredRecords": 2,
"campaignTypeDetails": [
{
"id": 1,
"order": 1,
"name": "advanced",
"label": "Advanced",
"count": 1
},
{
"id": 2,
"order": 2,
"name": "pg",
"label": "PG",
"count": 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;
campaignTypeDetails: {
id: number;
order: number;
name: string;
label: string;
count: number
}[]
}
}
};
};
}
function getCampaignsCountWithCampaignType(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/campaign-type/count',
requestBody: {
content: {
"application/json": {
budgetTypeIds?: `array of numbers`,
statusList?: `array of strings`,
countRequired?: `boolean`,
campaignIds?: `array of numbers`,
ioIds?: `array of numbers`,
creativeTypeIds?: `array of numbers`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Campaign Count by Creative Type
GET /api/v2/cmp/campaigns/countGet a count of Campaigns by Creative type ID and given Organization Workspace IDs.
| Query Parameters | |
|---|---|
sortType string | Sort by ascending (asc) or descending (desc) |
creativeTypeIds integer | Comma separated Creative Type IDs, supported values: Image: 11 HTML: 13 Video: 14 Ticker Banner: 16 Audio: 17 GOTV: 18 |
searchField string | Filter records by search keyword |
owIds integer | Filter results by comma separated Organization Workspace IDs |
Response Properties
order integer | Display order |
status_key string | Status key |
status_label string | Status label |
status_count integer | Campaign count |
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": [
{
"order": 0,
"status_key": "running",
"status_label": "Running",
"status_count": 14
},
{
"order": 2,
"status_key": "paused",
"status_label": "Paused",
"status_count": 3
},
{
"order": 7,
"status_key": "all",
"status_label": "ALL",
"status_count": 17
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
order: number;
status_key: string;
status_label: string;
status_count: number;
}[];
};
};
};
}
function CampaignCountbycreativetype(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v2/cmp/campaigns/count',
parameters: {
query: {
sortType: `string`,
creativeTypeIds: `string`,
searchField: `string`,
owIds: `string`,
};
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Creative Type and Campaigns Count
POST /api/v3/cmp/creative-types/count| Request Schema | |
|---|---|
owIds array of integers | Filters results by Organization Workspace IDs |
ioIds array of integers | Filters results by Insertion Order IDs |
status string | Filters results based on list of statuses, pass empty string to filter for all statuses |
statusList array of strings | Filters results for types of Campaign statuses |
Response Properties
count integer | Campaign count |
creativeType string | Creative type |
creativeTypeId integer | Creative Type ID |
- JSON
- TypeScript
{
"ioIds": [
0
],
"owIds": [
0
],
"status": "string",
"statusList": [
"string"
]
}
{
"success": true,
"data": [
{
"count":3,
"creativeType": "Image",
"creativeTypeId": 11
},
{
"count": 0,
"creativeType": "HTML",
"creativeTypeId": 13
},
{
"count": 0,
"creativeType": "Video",
"creativeTypeId": 14
},
{
"count": 1,
"creativeType": "Audio",
"creativeTypeId": 17
},
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
count: number;
creativeType: number;
creativeTypeId: number;
}[]
}
};
};
422: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string
}[]
}
};
};
}
function getCampaignCountWithCreativeTypeByIoIds(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/creative-types/count',
requestBody: {
content: {
"application/json": {
ioIds?: `array of numbers`,
owIds?: `array of numbers`,
status?: `string`,
statusList?: `array of strings`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Invalid ioIds."
}
]
}
Get Campaign Start Date
GET /api/v2/cmp/campaign/startGet Campaign start date.
Response Properties
start_time integer | Unix epoch timestamp of Campaign start time |
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"start_time": 1632286201
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
start_time: number;
};
};
};
};
}
function Getcampaignstartdate(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v2/cmp/campaign/start',
params: {
headers: {
'X-IAA-HOST': `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaign Start Dates or End Dates
POST /api/v3/cmp/startDate/listPOST /api/v3/cmp/endDate/list
Get a paginated list of Campaign's start dates with supported filters.
| Request Schema | |
|---|---|
pageNo integer | Page number for the data, default: 1 |
noOfEntries integer | Maximum number of entries returned, default: 300 |
sortBy string | Sorts by ascending (+) or descending (-), default: -campaignDate |
startDate string | Filter results by Campaign start date, will only return results that have a start date greater than the specified date |
endDate string | Filter results by Campaign end date, will only return results that have an end date less than the specified date |
ids array of integers | Prioritizes selected Campaigns over other dates in response |
isAllOwIds boolean | Filter results with all allowed OW IDs, if true prioritizes over owIds |
owIds array of integers | Filters for specified Customer OW IDs |
Response Properties
data array of strings | List of dates |
- JSON
- TypeScript
{
"noOfEntries": 10,
"pageNo": 1,
"owIds": [],
"ids": [],
"searchField": "",
"sortBy": "-campaignDate"
}
{
"success": true,
"data": {
"data": [
"02/21/2023",
"01/27/2023",
"01/20/2023",
"01/11/2023",
"01/06/2023",
"01/05/2023",
"12/29/2022",
"12/28/2022",
"12/23/2022",
"12/22/2022"
],
"totalRecords": 42,
"filteredRecords": 42
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
data: string[]
}
}
};
};
}
function getCampaignStartDateList(): Promise<Responses> {
/*
*or
*
* function getCampaignEndDateList(): Promise<Responses> {
*/
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/startDate/list',
/*
* or
*
* url: 'https://api.iqm.com/api/v3/cmp/endDate/list',
*/
requestBody: {
content: {
"application/json": {
owIds?: `array of numbers`,
isAllOwIds?: `boolean`,
ids?: `array of strings`,
startDate?: `string`,
endDate?: `string`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Campaign Report Data
GET /api/v3/cmp/campaigns/report/dataGet Report data by Campaign IDs and other filters.
| Query Parameters | |
|---|---|
searchField string | Search results by ID or name |
limit integer | Maximum number of entries returned, default: 10 |
pageNo integer | Page number for the data, default: 1 |
sortBy string | Sorts by ascending (+) or descending (-), default: -created Supported values: created, name, id, status, modifiedDate |
status string | Filter results by the following status values: running, paused, pending, expired, draft |
conversionId integer | Filter results by Conversion ID |
campaignIds integer | Filter results by comma separated Campaign IDs |
Response Properties
id integer | Report ID |
name string | Report name |
status string | Report status |
clicks integer | Clicks count |
impression integer | Impressions count |
conversionCount integer | Conversion count |
uniqueCount integer | Uniques count |
creativeType string | Creative type |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 290,
"data": [
{
"id": 240946,
"name": "Campaign-1",
"status": "draft",
"clicks": 0,
"impression": 0,
"conversionCount": 0,
"uniqueCount": 0,
"creativeType": "VIDEO"
},
{
"id": 241058,
"name": "Campaign-2",
"status": "expired",
"clicks": 0,
"impression": 0,
"conversionCount": 0,
"uniqueCount": 0,
"creativeType": "IMAGE"
}
],
"filteredRecords": 290
}
}
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;
data: {
id: number;
name: string;
status: string;
clicks: number;
impression: number;
conversionCount: number;
uniqueCount: number;
creativeType: string;
}[];
filteredRecords: number;
};
};
};
};
}
function GetCampaignReportData(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/cmp/campaigns/report/data',
parameters: {
query: {
status: `string`,
sortBy: `string`,
limit: `string`,
pageNo: `string`,
searchField: `string`,
conversionId: `string`,
campaignIds: `string`,
}
}
}
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Campaign Management
Create, update and manage Campaigns.
Create New Campaign
POST /api/v2/cmp/campaigns/addPOST /api/v2/cmp/campaigns/draft/add
Create a new Campaign in pending or draft status.
Request Schema
campaignName string | Campaign name |
isAgreementChecked boolean | Check to proceed: true |
ioId string | Insertion Order ID that Campaign belongs to |
countryId string | Country ID |
advertiserDomain string | Advertiser domain |
creativeType integer | Creative Type ID |
campaignType integer | Campaign Type ID |
startTime integer | Campaign start time |
endTime integer | Campaign end time (required if total budget pacing is enabled) |
totalBudgetPacing boolean | Budget is spent equally every hour: true |
budgetDay integer | Daily budget for Campaign serving daily (not applicable if budget pacing is set to true) |
budgetTotal integer | Total budget for Campaign serving period |
budgetTypeId integer | Budget Type ID |
maxBid integer | Max bid for each bid request |
timezone integer | Timezone ID for Campaign |
creativeIds string | Comma separated Creative IDs |
bidOptimization boolean optional | Optimize bid price based on analysis: true |
bidPacing boolean optional | Budget is spent equally every hour: true |
impressionCapping integer optional | Maximum impressions in one Inventory |
maxDayClicks integer optional | Maximum daily clicks |
totalClicks integer optional | Total clicks |
maxDayImpressions integer optional | Maximum daily impressions |
totalImpressions integer optional | Total impressions |
maxDayConversions integer optional | Maximum daily Conversions |
totalConversions integer optional | Total Conversions |
targetCPI integer optional | Target CPI (cost per install) for Campaign Serving |
conversionType string optional | User Conversion type Allowed values: install, non-install |
conversionTypeId integer | Conversion Type ID |
appURL string optional | If Conversion type is install, specify URL of Inventory |
carriers string optional | Comma separated Carrier IDs for targeting |
networkType string optional | Comma separated Network Type IDs for tareting |
deviceType string optional | Comma separated Device Type IDs for targeting |
trafficType string optional | Comma separated Traffic Type IDs for targeting |
manufacturer string optional | Comma separated Manufacturer IDs for targeting |
os string optional | Comma separated OS IDs for targeting |
osVersion string optional | Comma separated OS version IDs for targeting |
exchanges string | Comma separated Exchanges IDs for targeting (leave string empty to select all) |
prebidAudienceSegmentIdList array of integersoptional | Prebid Audience Segment IDs to attach Campaign to segment IDs |
device string optional | Comma separated Device Type IDs for targeting |
publisherAdCategory string | Comma separated Publisher Ad Category IDs for targeting (leave string empty to select all) |
userDealId string optional | Comma separated user Deal IDs |
groupDealId string optional | Comma separated group Deal IDs |
politicalAdvertiserClientId integer optional | Political Advertiser ID for political Campaign |
stateIds string optional | Comma separated State IDs for targeting |
locationFileIds string optional | Comma separated CSV file IDs for custom locations |
ageRangeIds string optional | Comma separated Age Range IDs for targeting |
genderIds string optional | Comma separated Age Range IDs for targeting |
interestIds string optional | Comma separated Interest IDs for targeting |
incomeRangeIds string optional | Comma separated Income Range IDs for targeting |
languageIds string optional | Comma separated Language IDs for targeting |
ethnicityIds string optional | Comma separated Ethnicity IDs for targeting |
schedule string optional | key as [0 to 6] maps to [Monday to Sunday] & values [['hh:mm:ss','hh:mm:ss'], ...] |
campaignIabCategoryIds string optional | Comma separated IAB Category IDs |
isAdvanceAudioVideoTargeted boolean | Indicates advanced targeting is enabled (true): creativeAdvanceTargeting is optional and it is assumed that every video Creative segment is targeted |
isBidShading boolean optional | Indicates Bid shading is enabled: true |
creativeAdvanceTargeting JSON optional | String to integer map of Creative advanced targeting group to list of Creative advance targeting segment IDs |
campaignEstimatorMetaData JSON optional | Campaign Estimator data with reachMeta, landScapeMeta and sliderMeta |
Response Properties
data integer | Campaign ID |
message string | Success message |
status string | Campaign status |
- JSON
- TypeScript
{
"campaignName": "Sample campaign name ",
"isAgreementChecked": true,
"advertiserDomain": "https://www.example.com",
"creativeType": 14,
"budgetTotal": 100,
"budgetTypeId": 1,
"startTime": 1598427074,
"budgetDay": 18,
"timezone": 105,
"creativeIds": "100027,100028",
"maxBid": 10,
"bidOptimization": false,
"bidPacing": true,
"isBidShading": true,
"impressionCapping": 2,
"conversionType": "install",
"conversionTypeId": 1,
"appURL": "https://www.example.com",
"totalBudgetPacing": false,
"carriers": "293,294",
"networkType": "13",
"deviceType": "15",
"trafficType": "11",
"manufacturer": "451,155",
"os": "11,14",
"osVersion": "11,12,13",
"exchanges": "27,21",
"publisherAdCategory": "112",
"userDealId": "1,2,b",
"countryId": 246,
"ioId": "20",
"politicalAdvertiserClientId": 17,
"locationFileIds": "1011,1010",
"stateIds": "30200031,30200032",
"prebidAudienceSegmentIdList": [
10,
11,
12
],
"campaignEstimatorMetaData": {
"reachMeta": {},
"landScapeMeta": {},
"sliderMeta": {}
},
"isAdvanceAudioVideoTargeted": true,
"creativeAdvanceTargeting": {
"placementType": [
20600001
],
"rollPosition": [
20700001
],
"playerSize": [
20800001
],
"skippability": [
20900001
],
"playbackMethod": [
21000001
]
},
"inventoryKeywords": [
"Clothing",
"Education"
],
"inventoryUrls": [
"https://www.google.com",
"https://www.iqm.com"
]
}
{
"statusCode": 201,
"responseObject": {
"data": 123456,
"message": "Campaign saved successfully.",
"status": "pending"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: number;
message: string;
status: string;
}
}
};
};
}
function saveCampaign(): Promise<Responses> {
/*
* or function saveDraftCampaign(): Promise<Responses> {
*/
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v2/cmp/campaigns/add',
/*
* or url : 'https://api.iqm.com/api/v2/cmp/campaigns/draft/add',
*/
requestBody: {
content: {
"application/json": {
advertiserId?: `number`,
dspId?: `number`,
owId?: `number`,
uowId?: `number`,
id?: `number`,
campaignName?: `string`,
advertiserDomain?: `string`,
creativeType?: `number`,
campaignType?: `number`,
totalBudgetPacing?: `boolean`,
budgetDay?: `number`,
budgetTotal?: `number`,
maxBid?: `number`,
timezone?: `number`,
startTime?: `number`,
endTime?: `number`,
status?: `string`,
created?: `number`,
excludeFromPlatformServing?: `boolean`,
forTest?: `boolean`,
modifiedDate?: `string`,
dspMarginJson?: `string`,
platformMarginJson?: `string`,
dspMargin?: `number`,
platformMargin?: `number`,
userDealMargin?: `number`,
isAgreementChecked?: `boolean`,
spentScale?: `boolean`,
creativeIds?: `string`,
targetCPI?: `number`,
conversionType?: `string`,
conversionTypeId?: `number`,
appURL?: `string`,
bidOptimization?: `boolean`,
bidPacing?: `boolean`,
impressionCapping?: `number`,
maxDayImpressions?: `number`,
maxDayClicks?: `number`,
maxDayConversions?: `number`,
totalImpressions?: `number`,
totalClicks?: `number`,
totalConversions?: `number`,
bidStrategyFlag?: `boolean`,
ioId?: `number`,
prebidAudienceSegmentIdList?: `array of numbers`,
isBidShading?: `boolean`,
carriers?: `string`,
networkType?: `string`,
deviceType?: `string`,
trafficType?: `string`,
manufacturer?: `string`,
device?: `string`,
os?: `string`,
osVersion?: `string`,
technologyFlag?: `boolean`,
exchanges: `string`,
advancedFlag?: `boolean`,
userDealId?: `string`,
groupDealId?: `string`,
publisherAdCategory: `string`,
campaignIabCategoryIds?: `string`,
stateIds?: `string`,
countryId?: `number`,
dmaIds?: `string`,
zipcodes?: `string`,
locationFileIds?: `string`,
inventoryKeywords?: `array of strings`,
inventoryUrls?: `array of strings`,
pmpDealIds?: `array of numbers`,
politicalAdvertiserClientId?: `number`,
scheduling?: {
[key: `string`]: `Record<string, never>`,
},
ageRangeIds?: `string`,
genderIds?: `string`,
languageIds?: `string`,
incomeRangeIds?: `string`,
ethnicityIds?: `string`,
interestIds?: `string`,
demographicTargetingFlag?: `boolean`,
conversionIds?: `string`,
creativesPlacementMapping?: {
[key: `string`]: `number`,
},
isTvAd?: `boolean`,
creativeAdvanceTargeting?: {
[key: `string`]: `array of numbers`
},
budgetTypeId?: `number`,
campaignEstimatorMetaData?: {
reachMeta?: {
[key: string]: Record<string, never>;
};
landScapeMeta?: {
[key: string]: Record<string, never>;
};
sliderMeta?: {
[key: string]: Record<string, never>;
},
},
customAudienceTargeted?: `boolean`,
advanceAudioVideoTargeted?: `boolean`,
isAdvanceAudioVideoTargeted?: `boolean`,
};
};
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Campaign
PATCH /api/v2/cmp/campaign/{campaignId}Update various Campaign properties.
If Campaign is in draft status, this API will automatically update status from draft to pending. In all other cases status will not be updated.
| Path Parameters | |
|---|---|
campaignId integer | Campaign ID |
Supported properties
id integer | Campaign ID |
campaignName string | Campaign name |
advertiserDomain string | Advertiser domain |
creativeType integer | Creative Type ID |
campaignType integer | Campaign Type ID |
totalBudgetPacing boolean | Budget is spent equally every hour: true |
budgetDay integer | Daily budget for Campaign serving daily |
budgetTotal integer | Total budget for Campaign serving period |
maxBid integer | Max bid for each bid request |
timezone integer | Timezone ID for Campaign |
startTime integer | Campaign start time |
endTime integer | Campaign end time |
status string | Status of Campaign |
creativeIds integer | Campaign creation time update |
excludeFromPlatformServing boolean | Exclude Campaign from platform serving |
forTest boolean | Indicates Campaign for test |
modifiedDate integer | Campaign modified date |
dspMarginJson string | Campaign DSP margin JSON |
platformMarginJson string | Campaign platform margin JSON |
dspMargin integer | Campaign DSP margin number |
platformMargin integer | Campaign platform margin number |
userDealMargin integer | Campaign user deal margin number |
bidStrategyFlag boolean | Bid strategy allowed or not for user |
bidOptimization boolean | Optimize bid price based on analysis: true |
bidPacing boolean | Budget is spent equally every hour: true |
impressionCapping integer | Maximum impressions in one Inventory |
maxDayClicks integer | Maximum daily clicks |
totalClicks integer | Total clicks |
maxDayImpressions integer | Maximum daily impressions |
totalImpressions integer | Total impressions |
maxDayConversions integer | Maximum daily Conversions |
totalConversions integer | Total Conversions |
spentScale boolean | Spent scale on/off |
creativeIds string | Targeted Creative ids |
targetCPI integer | Target CPI for Campaign Serving |
conversionType string | User Conversion type Allowed values: install, non-install |
conversionTypeId integer | Conversion Type ID |
appURL string | If Conversion type is install, specify URL of Inventory |
targetCPI integer | Cost per install if Conversion type is install |
technologyFlag boolean | Technology enabled or disabled based on policy of user |
carriers string | Comma separated Carrier IDs for targeting |
networkType string | Network targeting. Value in form of String of comma separated IDs of targeted network(s) |
deviceType string | Comma separated Device Type IDs for targeting |
trafficType string | Comma separated Traffic Type IDs for targeting |
manufacturer string | Comma separated Manufacturer IDs for targeting |
os string | Comma separated OS IDs for targeting |
osVersion string | OS version targeting. Value in form of String of comma separated IDs of targeted OS version based on targeted OS |
exchanges string | Comma separated Exchanges IDs for targeting |
prebidAudienceSegmentIdList array of integers | Prebid Audience Segment IDs to attach Campaign to segment IDs |
device string | Targeted devices as string |
publisherAdCategory string | Comma separated Publisher Ad Category IDs for targeting |
userDealId string | User specific deal IDs. Value in form of String of comma separated deal IDs |
groupDealId string | Group of selected deals. Value in form of String of comma separated deal IDs |
politicalAdvertiserClientId integer | ID of political Advertiser in case of Campaign is political Campaign |
stateIds string | Comma separated State IDs for targeting |
locationFileIds string | Target location by uploading file. Value in form of String of comma separated csv file ids.(pre uploaded) |
ageRangeIds string | Comma separated Age Range IDs for targeting |
genderIds string | Comma separated Gender IDs for targeting |
interestIds string | Comma separated Interest IDs for targeting |
incomeRangeIds string | Comma separated Income Range IDs for targeting |
languageIds string | Comma separated Language IDs for targeting |
ethnicityIds string | Comma separated Ethnicity IDs for targeting |
schedule string | key as [0 to 6] maps to [Monday to Sunday] & values [['hh:mm:ss','hh:mm:ss'], ...] |
campaignIabCategoryIds string | Target IAB categories. Value in form of a string of comma-separated ID. Only super user can update IAB categories |
isAdvanceAudioVideoTargeted boolean | To indicate if the advance targeting is enabled if this is true, 'creativeAdvanceTargeting' is optional and it is assumed that every video Creative segment is targeted |
isBidShading boolean | To indicate if the bid shading is enabled |
creativeAdvanceTargeting JSON | String to Integer Map of Creative advanced targeting group to list of Creative advance targeting segment ids. |
campaignEstimatorMetaData JSON | Campaign Estimator data with reachMeta, landScapeMeta and sliderMeta |
Response Properties
data integer | Campaign ID |
message string | Success message |
status string | Campaign status |
- JSON
- TypeScript
{
"campaignName": "Sample Campaign name ",
"isAgreementChecked": true,
"advertiserDomain": "https://www.example.com",
"creativeType": 14,
"budgetTotal": 100,
"startTime": 1598427074,
"budgetDay": 18,
"timezone": 105,
"creativeIds": "100027,100028",
"maxBid": 10,
"bidOptimization": false,
"bidPacing": true,
"isBidShading": true,
"impressionCapping": 2,
"conversionType": "install",
"conversionTypeId": 1,
"appURL": "https://www.example.com",
"totalBudgetPacing": false,
"carriers": "293,294",
"networkType": "13",
"deviceType": "15",
"trafficType": "11",
"manufacturer": "451,155",
"os": "11,14",
"osVersion": "11,12,13",
"exchanges": "27,21",
"prebidAudienceSegmentIdList": [
10,
11,
12
],
"publisherAdCategory": "112",
"userDealId": "1,2,b",
"countryId": 246,
"politicalAdvertiserClientId": 17,
"locationFileIds": "1011,1010",
"campaignEstimatorMetaData": {
"reachMeta": {},
"landScapeMeta": {},
"sliderMeta": {}
},
"stateIds": "30200031,30200032",
"isAdvanceAudioVideoTargeted": true,
"creativeAdvanceTargeting": {
"placementType": [
20600001
],
"rollPosition": [
20700001
],
"playerSize": [
20800001
],
"skippability": [
20900001
],
"playbackMethod": [
21000001
]
}
}
{
"statusCode": 201,
"responseObject": {
"data": 123456,
"message": "Campaign saved successfully.",
"status": "pending"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: number;
message: string;
status: string;
}
}
};
};
}
function editCampaignPatch(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v2/cmp/campaign/{campaignId}',
params: {
path: {
campaignId: `number`
}
},
requestBody: {
content: {
"application/json": {
advertiserId?: `number`,
dspId?: `number`,
owId?: `number`,
uowId?: `number`,
id?: `number`,
campaignName?: `string`,
advertiserDomain?: `string`,
creativeType?: `number`,
campaignType?: `number`,
totalBudgetPacing?: `boolean`,
budgetDay?: `number`,
budgetTotal?: `number`,
maxBid?: `number`,
timezone?: `number`,
startTime?: `number`,
endTime?: `number`,
status?: `string`,
created?: `number`,
excludeFromPlatformServing?: `boolean`,
forTest?: `boolean`,
modifiedDate?: `string`,
dspMarginJson?: `string`,
platformMarginJson?: `string`,
dspMargin?: `number`,
platformMargin?: `number`,
userDealMargin?: `number`,
isAgreementChecked?: `boolean`,
spentScale?: `boolean`,
creativeIds?: `string`,
targetCPI?: `number`,
conversionType?: `string`,
conversionTypeId?: `number`,
appURL?: `string`,
bidOptimization?: `boolean`,
bidPacing?: `boolean`,
impressionCapping?: `number`,
maxDayImpressions?: `number`,
maxDayClicks?: `number`,
maxDayConversions?: `number`,
totalImpressions?: `number`,
totalClicks?: `number`,
totalConversions?: `number`,
bidStrategyFlag?: `boolean`,
ioId?: `number`,
prebidAudienceSegmentIdList?: `array of numbers`,
isBidShading?: `boolean`,
carriers?: `string`,
networkType?: `string`,
deviceType?: `string`,
trafficType?: `string`,
manufacturer?: `string`,
device?: `string`,
os?: `string`,
osVersion?: `string`,
technologyFlag?: `boolean`,
exchanges: `string`,
advancedFlag?: `boolean`,
userDealId?: `string`,
groupDealId?: `string`,
publisherAdCategory: `string`,
campaignIabCategoryIds?: `string`,
stateIds?: `string`,
countryId?: `number`,
dmaIds?: `string`,
zipcodes?: `string`,
locationFileIds?: `string`,
inventoryKeywords?: `array of strings`,
inventoryUrls?: `array of strings`,
pmpDealIds?: `array of numbers`,
politicalAdvertiserClientId?: `number`,
scheduling?: {
[key: `string`]: `Record<string, never>`,
},
ageRangeIds?: `string`,
genderIds?: `string`,
languageIds?: `string`,
incomeRangeIds?: `string`,
ethnicityIds?: `string`,
interestIds?: `string`,
demographicTargetingFlag?: `boolean`,
conversionIds?: `string`,
creativesPlacementMapping?: {
[key: `string`]: `number`,
},
isTvAd?: `boolean`,
creativeAdvanceTargeting?: {
[key: `string`]: `array of numbers`
},
budgetTypeId?: `number`,
campaignEstimatorMetaData?: {
reachMeta?: {
[key: string]: Record<string, never>;
};
landScapeMeta?: {
[key: string]: Record<string, never>;
};
sliderMeta?: {
[key: string]: Record<string, never>;
},
},
customAudienceTargeted?: `boolean`,
advanceAudioVideoTargeted?: `boolean`,
isAdvanceAudioVideoTargeted?: `boolean`,
};
};
};
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create New PG Campaign
POST /api/v3/cmp/pg/campaigns/addPOST /api/v3/cmp/pg/campaigns/draft/add
Create a new PG Campaign for Advertiser.
| Request Schema | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pgCampaignInfo object | Campaign information details | |||||||||||||||||||||||
| ||||||||||||||||||||||||
campaignName string | Name of Campaign |
ioId integer | Insertion Order ID |
timeZoneId integer | Timezone ID |
totalImpressions integer optional | Targeted impressions for impression-based Campaign as budget, use if not a dollars-based Campaign |
budgetTotal integer optional | Total budget of the Campaign for dollars-based Campaign, use if not an impressions-based Campaign |
maxBid integer | Maximum allowed bid price for Campaign |
startTime integer | Unix epoch start time of Campaign, in milliseconds |
endTime integer | Unix epoch end time of Campaign, in milliseconds |
budgetTypeId integer | Budget Type ID of given Campaign (impression-based or dollar-based) |
campaignTypeId integer | Campaign Type ID |
advertiserDomain string | Domain of the Advertiser user |
creativeTargeting object
creativeTargeting object properties
creativeTypeId integer | Creative Type ID |
creativeIds array of integers | Creative IDs to attach to this Campaign |
inventoryTargeting object
inventoryTargeting object properties
pgDealIds array of integers | PG Deal IDs to attach to this Campaign |
conversionTargeting object
conversionTargeting object properties
conversionTypeId integer | Conversion Type ID to attach to this Campaign |
conversionIds array of integers | Conversion IDs to attach to this Campaign |
politicalAdvertiserClientId integer
countryId integer
Response Properties
campaignId integer | Campaign ID |
message string | Success message |
- JSON
- TypeScript
{
"pgCampaignInfo": {
"campaignName": "test imps PG campaign",
"ioId": 95179,
"timeZoneId": 29,
"totalImpressions": 12345,
"maxBid": 8,
"startTime": 1715662337,
"endTime": 1717128000,
"budgetTypeId": 2,
"campaignTypeId": 2,
"advertiserDomain": "https://www.xyz.com"
},
"creativeTargeting": {
"creativeTypeId": 11,
"creativeIds": [
644506
]
},
"inventoryTargeting": {
"pgDealIds": [
30,
12
]
},
"conversionTargeting": {
"conversionTypeId": 1,
"conversionIds": [
465,
687,
987
]
},
"politicalAdvertiserClientId": 989898,
"countryId": 23
}
{
"success": true,
"data": {
"message": "PG Campaign Created successfully",
"campaignId": 2
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Invalid campaign Type provided"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
message: string;
campaignId: number
}
}
};
};
422: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string
}
}
};
};
}
function addPGCampaign(): Promise<Responses> {
/*
*or
*
*function saveDraftCampaign(): Promise<Responses> {
*/
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/pg/campaigns/add',
/*
*or
*
* url: 'https://api.iqm.com/api/v2/cmp/campaigns/draft/add',
*/
requestBody: {
content: {
"application/json": {
countryId?: `number`,
politicalAdvertiserClientId?: `number`,
conversionTargeting?: {
conversionTypeId?: `number`,
conversionIds: `array of numbers`,
},
creativeTargeting: {
creativeTypeId: `number`,
creativeIds: `array of numbers`,
},
inventoryTargeting: {
pgDealIds: `array of numbers`,
paymentTypeId?: `number`,
},
pgCampaignInfo: {
campaignName: `string`,
timeZoneId: `number`,
spendingBudget?: `number`,
maxBid: `number`,
startTime: `number`,
endTime?: `number`,
totalImpressions?: `number`,
advertiserDomain: `string`,
ioId: `number`,
budgetTypeId: `number`,
campaignTypeId?: `number`,
owId?: `number`,
uowId?: `number`,
creativeTypeId?: `number`,
status?: `string`,
configObj?: `string`,
totalBudget?: `number`,
pgFeesPercentage?: `number`,
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update PG Campaign
PATCH /api/v3/cmp/pg/campaigns/{campaignId}PATCH /api/v3/cmp/pg/campaigns/draft/{campaignId}
Update properties of a created or draft PG Campaign by Campaign ID.
Supported properties
pgCampaignInfo object | Campaign information details | |||||||||||||||||||||||
| ||||||||||||||||||||||||
campaignName string | Name of Campaign |
ioId integer | Insertion Order ID |
timeZoneId integer | Timezone ID |
totalImpressions integer optional | Targeted impressions for impression-based Campaign as budget, use if not a dollars-based Campaign |
budgetTotal integer optional | Total budget of the Campaign for dollars-based Campaign, use if not an impressions-based Campaign |
maxBid integer | Maximum allowed bid price for Campaign |
startTime integer | Unix epoch start time of Campaign, in milliseconds |
endTime integer | Unix epoch end time of Campaign, in milliseconds |
budgetTypeId integer | Budget Type ID of given Campaign (impression-based or dollar-based) |
campaignTypeId integer | Campaign Type ID |
advertiserDomain string | Domain of the Advertiser user |
creativeTargeting object
creativeTargeting object properties
creativeTypeId integer | Creative Type ID |
creativeIds array of integers | Creative IDs to attach to this Campaign |
inventoryTargeting object
inventoryTargeting object properties
pgDealIds array of integers | PG Deal IDs to attach to this Campaign |
conversionTargeting object
conversionTargeting object properties
conversionTypeId integer | Conversion Type ID attached to this Campaign |
conversionIds array of integers | Conversion IDs attached to this Campaign |
politicalAdvertiserClientId integer
countryId integer
Response Properties
campaignId integer | Campaign ID |
message string | Success message |
- JSON
- TypeScript
{
"pgCampaignInfo": {
"campaignName": "test imps PG campaign",
"timeZoneId": 29,
"totalImpressions": 12345,
"maxBid": 8,
"startTime": 1715662337,
"endTime": 1717128000,
"advertiserDomain": "https://www.xyz.com"
},
"creativeTargeting": {
"creativeTypeId": 11,
"creativeIds": "[644506]"
},
"inventoryTargeting": {
"pgDealIds": "[30,12]"
},
"conversionTargeting": {
"conversionTypeId": 1,
"conversionIds": "[465,687,987]"
},
"politicalAdvertiserClientId": 989898,
"countryId": 23
}
{
"success": true,
"data": {
"message": "PG Campaign Updated successfully",
"campaignId": 2
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
message: string;
campaignId: number
}
}
};
};
422: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string
}
}
};
};
}
function editPGCampaign(): Promise<Responses> {
/*
*or
*
*function editDraftPGCampaign(): Promise<Responses> {
*/
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/pg/campaigns/{campaignId}',
/*
*or
*
* url: 'https://api.iqm.com/api/v2/cmp/campaigns/draft/{campaignId}',
*/
params: {
path: {
campaignId: `number`
}
},
requestBody: {
content: {
"application/json": {
countryId?: `number`,
politicalAdvertiserClientId?: `number`,
conversionTargeting?: {
conversionTypeId?: `number`,
conversionIds: `array of numbers`,
},
creativeTargeting: {
creativeTypeId: `number`,
creativeIds: `array of numbers`,
},
inventoryTargeting: {
pgDealIds: `array of numbers`,
paymentTypeId?: `number`,
},
pgCampaignInfo: {
campaignName: `string`,
timeZoneId: `number`,
spendingBudget?: `number`,
maxBid: `number`,
startTime: `number`,
endTime?: `number`,
totalImpressions?: `number`,
advertiserDomain: `string`,
ioId: `number`,
budgetTypeId: `number`,
campaignTypeId?: `number`,
owId?: `number`,
uowId?: `number`,
creativeTypeId?: `number`,
status?: `string`,
configObj?: `string`,
totalBudget?: `number`,
pgFeesPercentage?: `number`,
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Change Campaign Name
PATCH /api/v3/cmp/campaign/update-name/{campaign_Id}Change the name of a Campaign.
| Path Parameters | |
|---|---|
campaign_Id integer | Campaign ID |
| Request Schema | |
|---|---|
campaignName string | New name for Campaign |
Response Properties
message string | Success message |
- JSON
- TypeScript
{
"campaignName": "New Campaign Name"
}
{
"success": true,
"data": {
"message": "campaignName updated successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
message: string;
};
};
};
};
}
function UpdateCampaignName(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/campaign/update-name/{campaign_id}',
params: {
path: {
campaign_id: `string`
}
},
requestBody: {
content: {
"application/json": {
campaignName: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Change Campaign End Date
PUT /api/v2/cmp/campaigns/update-end-dateChange the end date of multiple Campaigns.
| Request Schema | |
|---|---|
endDate integer | Unix timestamp of desired end date |
campaignIds string | Comma separated Campaign IDs to change end date for |
Response Properties
status boolean | Success status |
- JSON
- TypeScript
{
"endDate": 1632132540,
"campaignIds": "192476"
}
{
"statusCode": 200,
"responseObject": {
"status": true
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
status: boolean;
};
};
};
};
}
function Campaignenddateupdate(): Promise<Responses> {
const options = {
method: 'PUT',
url: 'https://api.iqm.com/api/v2/cmp/campaigns/update-end-date',
params: {
header: {
"X-IAA-HOST": `string`
}
},
requestBody: {
content: {
"application/json": {
endDate: `number`,
campaignIds: `number`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Change Campaign Budget
PUT /api/v2/cmp/campaigns/update-budgetUpdate the total budget, daily budget, and max bid of multiple Campaigns.
| Request Schema | |
|---|---|
campaignIds string | Comma separated Campaign IDs |
maxBid integer | Max bid of Campaign |
totalBudget integer | Total budget of Campaign |
dailyBudget integer | Daily Budget of Campaign |
totalBudgetUpdateType string | Used in the case of a total budget update. There are three possibilities for this parameter. change: Replace total budget with given value. addition: Add budget to the current total budget. distribution: Distribute given total budget in selected Campaigns equally. Default value: change |
Response Properties
reason object | Reason details | |||||||
| ||||||||
errorMessage string | Error message |
id integer | Campaign ID |
campaignName string | Campaign name |
modified_data object
See Request Schema for supported values
status boolean
- JSON
- TypeScript
{
"totalBudgetUpdateType": "change",
"campaignIds": "192476",
"dailyBudget": 1001
}
{
"statusCode": 200,
"responseObject": {
"reason": [
{
"errorMessage": "max bid cannot be less than minimum bid 3.0",
"id": "4120",
"campaignName": "test cust aud dev"
},
{
"errorMessage": "For given campaign_type max bid cannot be less than 1.00 or greater than 1000.",
"id": "4121",
"campaignName": "Vast copy"
}
],
"modified_data": [
{
"campaingId": 1,
"maxBid": 34,
"totalBudget": 35,
"dailyBudget": 36,
"endDate": 12312312312
}
],
"status": false
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
reason: {
errorMessage: string;
id: string;
campaignName: string;
}[];
modified_data: {
campaingId: number;
maxBid: number;
totalBudget: number;
dailyBudget: number;
endDate: number;
}[];
status: boolean;
};
};
};
};
}
function Campaignbudgetupdate(): Promise<Responses> {
const options = {
method: 'PUT',
url: 'https://api.iqm.com/api/v2/cmp/campaigns/update-budget',
params: {
header: {
"X-IAA-HOST": `string`
}
},
requestBody: {
content: {
"application/json": {
totalBudgetUpdateType: `string`,
campaignIds: `number`,
dailyBudget: `number`,
maxBid: `number`,
totalBudget: `number`
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Assign Conversions to Campaigns
POST /api/v3/cmp/target/conversionAssign Conversions to Campaigns.
| Request Schema | |
|---|---|
conversionIds string | Comma separated Conversion IDs |
campaignIds string | Campaign IDs to target |
Response Properties
message string | Success message |
- JSON
- TypeScript
{
"conversionIds": "123, 321",
"campaignIds": "276417, 356234"
}
{
"success": true,
"data": {
"message": "1 Conversions assigned to campaigns successfully."
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "invalid Conversion ids"
}
]
}
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: {
message: string;
}
}
}
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
}
}
};
}
function createCampaignConversionTargeting(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/target/conversion',
requestBody: {
content: {
"application/json": {
conversionIds?: `string`,
campaignIds?: `string`,
conversionTypeId?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Audience Targeting in Campaigns
POST /api/v3/cmp/target/audienceUpdate the Audience targeting in a given Campaigns list. Supports include, exclude, and remove Audiences.
PG Campaigns cannot be used for Audience targeting.
| Request Schema | |
|---|---|
{campaignId} string | Campaign ID for which to pass includedAudienceList, excludedAudienceList, and removeAudience |
includedAudienceList array of integers | Audience IDs to include in targeting |
excludedAudienceList array of integers | Audience IDs to exclude from targeting |
removeAudience array of integers | Audience IDs to remove |
Response Properties
message string | Success message |
failedCampaigns object | Failed Campaigns list: Name-Value pairs of CampaignId and failure description |
- JSON
- TypeScript
{
"477717": {
"includedAudienceList": [
1064656,
1060603
],
"excludedAudienceList": [
1064000,
1060111
],
"removeAudienceList": [
106422,
106033
],
}
}
{
"success": true,
"data": {
"message": "Your changes have been successfully saved."
}
}
{
"success": false,
"data": {
"message": "Your changes have been successfully saved.",
"failedCampaigns": {
"477717": "Can not target more than 20 audiences."
}
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "One or more campaigns are PG campaigns and cannot be used for audience targeting: [529192, 506992, 506991]"
}
]
}
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: {
message: string
}
}
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success?: boolean;
errorObjects?: {
error?: string;
reason?: string;
field?: string;
}[];
data?: Record<string, never>;
};
};
};
}
function CampaignAudienceTargetingList(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/target/audience',
requestBody: {
content: {
"application/json": {
[key: `string`]: {
includedAudienceList?: `array of numbers`,
excludedAudienceList ?: `array of numbers`,
removedAudienceList ?: `array of numbers`,
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Inventory Group Targeting
POST /api/v2/cmp/inventorygroups/{groupId}/includeExcludeTarget Inventories by including or excluding Inventory groups from your Campaigns advertising strategies.
Review the Inventory API to Create a New Inventory Group.
| Path Parameter | |
|---|---|
groupId integer | Inventory Group ID |
| Request Schema | |
|---|---|
campaignIds string | Comma separated Campaign IDs |
isExcluded boolean | Include Campaigns in Group: 0 Exclude Campaigns from Group: 1 |
Response Properties
message string | Success message |
- JSON
- TypeScript
{
"campaignIds": "172813,177146",
"isExcluded": 0
}
{
"statusCode": 200,
"responseObject": {
"message": "Inventory Group excluded successfully."
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
message: string;
};
};
};
};
}
function Inventorygrouptargeting(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/inventorygroup/{groupid}/includeExclude',
requestBody: {
content: {
"application/json": {
excludedCampaigns: `string`,
includedCampaigns: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Assign PMP Deals
PATCH /api/v3/cmp/pmp/campaigns/mappingsAssign or remove multiple PMP deals to/from Campaigns.
| Request Schema | |
|---|---|
operations array of objects | Operations specifying the action, Campaign IDs and PMP deal IDs |
action string | Action to perform: assign or deassign |
campaignIds array of integers | Campaign IDs to assign deals or remove deals from |
pmpDealIds array of integers | PMP Deal IDs to assign/de-assign to/from Campaigns |
Response Properties
success boolean | Indicates Deals were assigned succesfully: true |
data string | Success message |
- JSON
- TypeScript
{
"operations": [
{
"action": "assign",
"campaignIds": [
201,
203
],
"pmpDealIds": [
101,
102
]
},
{
"action": "deassign",
"campaignIds": [
202
],
"pmpDealIds": [
102
]
}
]
}
{
"success": true,
"data": "PMP deal campaign mappings updated successfully"
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "PMP deal id/s is/are invalid or not accessible for logged-in user"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success?: boolean;
errorObjects?: {
error?: string;
reason?: string;
field?: string;
}[];
data?: Record<string, never>;
};
};
};
403: {
content: {
"application/json": {
success?: boolean;
errorObjects?: {
error?: string;
reason?: string;
field?: string;
}[];
data?: Record<string, never>;
};
};
};
422: {
content: {
"application/json": {
success?: boolean;
errorObjects?: {
error?: string;
reason?: string;
field?: string;
}[];
data?: Record<string, never>;
};
};
};
}
function managePMPDealCampaignMappings(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/pmp/campaigns/mappings',
requestBody: {
content: {
"application/json": {
operations: [
{
action: `string`,
campaignIds: `array of numbers`,
pmpDealIds: `array of numbers`,
}
]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Assign PG Deals
PATCH /api/v3/cmp/pg/campaigns/mappingsAssign or remove multiple PG deals to/from Campaigns.
| Request Schema | |
|---|---|
operations array of objects | Operations specifying the action, Campaign IDs and PMP deal IDs |
action string | Action to perform: assign or deassign |
campaignIds array of integers | Campaign IDs to assign deals or remove deals from |
pgDealIds array of integers | PG Deal IDs to assign/remove to/from Campaigns |
Response Properties
success boolean | Indicates Deals were assigned succesfully: true |
message string | Success message |
- JSON
- TypeScript
{
"operations": [
{
"action": "assign",
"campaignIds": [
201,
203
],
"pgDealIds": [
101,
102
]
},
{
"action": "assign",
"campaignIds": [
202
],
"pgDealIds": [
103
]
},
{
"action": "deassign",
"campaignIds": [
202
],
"pgDealIds": [
102
]
}
]
}
{
"success": true,
"data": "PG deal Campaigns mappings updated successfully"
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "Campaign ID 506992 exceeds the maximum limit of 25 deals"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success?: boolean;
errorObjects?: {
error?: string;
reason?: string;
field?: string;
}[];
data?: Record<string, never>;
};
};
};
403: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string
}
}
};
};
422: {
content: {
"application/json": {
success?: boolean;
errorObjects?: {
error?: string;
reason?: string;
field?: string;
}[];
data?: Record<string, never>;
};
};
};
}
function managePgDealCampaignMappings(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/pg/campaigns/mappings',
requestBody: {
content: {
"application/json": {
operations: [
{
action: `string`,
campaignIds: `array of numbers`,
pmpDealIds: `array of numbers`,
}
]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Resend Email to Set Margin
POST /api/v3/cmp/email-reminder/set-margin| Request Schema | |
|---|---|
owId integer | Organization Workspace ID |
Response Properties
success boolean | Indicates Email was sent succesfully: true |
message string | Success message |
- JSON
- TypeScript
{
"success": true,
"data": "Email reminder resend successfully to set margin."
}
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: string;
}
}
};
}
function Resendemailremindertosetmargin(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/email-reminder/set-margin',
requestBody: {
content: {
"application/json": {
owId: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Resend Email Reminder to Set Invoice Template
POST /api/v3/cmp/email-reminder/set-invoice-template| Request Schema | |
|---|---|
owId integer | Organization Workspace ID |
Response Properties
success boolean | Indicates Email was sent succesfully: true |
message string | Success message |
- JSON
- TypeScript
{
"success": true,
"data": "Email reminder resend successfully to set invoice template."
}
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: string;
}
}
};
}
function Resendemailremindertosetinvoicetemplate(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/email-reminder/set-invoice-template',
requestBody: {
content: {
"application/json": {
owId: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Insertion Order Details
Insertion Orders specify the parameters or details of an advertising Campaign.
Insertion Order Resource Properties
| Basic IO Resource Properties | |
|---|---|
ioId integer | Insertion Order ID |
ioName string | Insertion Order name |
owId integer | Organization Workspace ID |
createdByUowId integer | User Organization Workspace ID associated with IO creation |
modifiedByUowId integer | User Organization Workspace ID associated with IO modification |
ioStartTime integer | Unix epoch timestamp (in milliseconds) of IO start time |
ioEndTime integer | Unix epoch timestamp (in milliseconds) of IO end time |
ioTotalBudget integer | Budget of IO |
ioTimeZoneId integer | Timezone ID for Insertion Order |
isAutoSumIoTotalBudget boolean | If true Keeps IO budget same as total budget of all included Campaigns |
ioBudgetDistributionMethodId integer | Budget Distribution Method ID |
ioBudgetTypeId integer | Budget Type ID |
ioTotalImpression integer | Number of impressions |
ioStatusID integer | Status ID |
ioNextPerformanceCheck integer | Unix epoch timestamp (in milliseconds) of next performance check |
ioLastPriorityShift integer | Unix epoch timestamp (in milliseconds) |
ioCurrentPriority integer | Current IO Campaign priority |
isIoPrioritise integer | All child Campaigns will be considered with or without priority |
Advanced IO Resource Properties
prebidCost integer | Data cost of Pre-bid Audiences |
clicks integer | The number of times a user clicked on an ad |
totalCount integer | The number of records available in response as per the filtering applied in the request |
winRate integer | Percentage of impressions bid on and won |
logoUrl string | Logo URL |
avatarUrl string | Avatar URL |
budgetDay integer | Daily budget for Campaign serving daily |
budgetSpent integer | Budget spent |
ioTotalBudget integer | Insertion Order total budget |
budgetTotal integer | Campaign total budget Note: can be null if fixed daily budget, start time, and end time are provided |
dataCost integer | Data cost applied on Campaigns of given Customer |
mediaBudget integer | Media budget |
owId integer | Organization Workspace ID |
orgId integer | Organization ID |
impressions integer | Impressions |
industry integer | Industry ID |
mediaSpent integer | Actual amount spent by an Advertiser (does not include dataCost or prebidCost |
spent integer | Amount spent |
workspaceSpent integer | Workspace spent |
platformSpent integer | Platform spent |
customerSpent integer | Customer spent |
platformMediaEarning integer | Platform media earning |
platformBidShadingEarning integer | Platform bid shading earning |
platformTotalEarning integer | Platform total earning |
workspaceMediaEarning integer | Workspace media earning |
workspaceBidShadingEarning integer | Workspace bid shading earning |
workspaceTotalEarning integer | Workspace total earning |
organizationName integer | Organization name |
companySize integer | Company size ID |
workspaceName integer | Workspace name |
workspaceId integer | Workspace ID |
workspaceDomain integer | Workspace domain |
workspaceOrganizationName integer | Workspace Organization name |
bidImpressions integer | Bid on impressions count |
startCount integer | Ad viewing metric, video start |
firstCount integer | Ad viewing metric, video first quarter |
midCount integer | Ad viewing metric, video midpoint |
thirdCount integer | Ad viewing metric, video last quarter |
completeCount integer | Ad viewing metric, video completed |
audioVideoActualBids integer | Audio/video actual bids |
audioVideoActualImpressions integer | Audio/video actual impressions |
eCPC integer | Effective cost per click |
eCPM integer | Effective cost per mille |
eCPI integer | Effective cost per install |
eCPCV integer | Effective cost per completed view |
eCPV integer | Effective cost per visit |
totalAttributedConversion integer | The number of Conversions that are attributed to a specific Campaign based on the Attribution model |
totalAttributedViewThroughConversion integer | The number of Conversions that occurred after a user viewed an ad but did not click on it |
totalAttributedClickThroughConversion integer | The number of Conversions that occurred after a user clicked on an ad |
costPerAttributedConversion integer | Cost per attributed Conversion |
totalAttributedConversionRate integer | Total attributed Conversion rate |
reach integer | The number of unique individuals exposed to an ad, does not count repeat views |
frequency integer | The average number of times each user was exposed to an ad |
date integer | Date |
campaignId integer | Campaign ID |
campaignName string | Campaign name |
maxBid integer | Max bid of budget for serving |
baseBid integer | Base value on which bid modifiers are applied |
startTime integer | Unix epoch timestamp, in milliseconds |
endTime integer | Unix epoch timestamp, in milliseconds |
ioStartTime integer | Unix epoch timestamp of IO start time, in milliseconds |
ioEndTime integer | Unix epoch timestamp of IO end time, in milliseconds |
campaignType string | Campaign Type ID |
status string | Status |
campaignTimezone string | Campaign timezone |
creativeType string | Creative type |
budgetPacing boolean | Budget is spent equally every hour: true |
isCampaignFromNewPlatform boolean | Indicates if Campaign is from the old platform |
percentageOfTotalSpent integer | Percentage of total spent |
uowId integer | User Organization Workspce ID |
audioVideoViewed integer | Audio/video viewed |
ioId integer | Insertion Order ID |
ioName string | Insertion Order name |
ioTimezone integer | Insertion Order timezone |
ioBudgetTypeId integer | Insertion Order Budget Type ID |
ioStatusId integer | Insertion Order status ID |
ioBudgetDistributionMethod integer | IO Budget Distribution Method |
pacingPercentage integer | Pacing percentage |
actualSpent integer | Actual spent |
expectedSpent integer | Expected spent |
campaignDuration integer | Campaign duration |
remainingDuraion integer | Campaign remaining duration |
dailyPacingPercentage integer | Daily pacing percentage |
expectedDailySpent integer | Expected daily spent |
actualDailySpent integer | Actual daily spent |
budgetTypeId integer | Budget Type ID |
campaignTypeId integer | Campaign Type ID |
isEligibleForVLDInsightsReport boolean | Indicates whether Campaign is eligible for VLD Insights Report: true |
targetImpression integer | Impressions target |
dailyImpression integer | Daily impression count |
creativesCount integer | Creatives count |
campaignsCount integer | Number of Campaigns associated with IO |
ioTotalImpressions integer | IO total impressions |
ioPacingPercentage integer | IO pacing percentage |
ioActualSpent integer | IO actual spent |
ioExpectedSpent integer | IO expected spent |
ioDuration integer | IO duration |
ioRemainingDuraiton integer | IO remaining duration |
exchangeId integer | Exchange ID |
exchangeName string | Exchange name |
autoSumIoTotalBudget boolean | If true Keeps IO budget same as total budget of all included Campaigns |
isAutoSumIoTotalBudget boolean | If true Keeps IO budget same as total budget of all included Campaigns |
budgetTotalCombined integer | Combined total budgets of all Campaigns associated with an IO |
budgetDayCombined integer | Combined daily budgets of all Campaigns associated with an IO |
ioTotalBudgetCombined integer | Combined total budgets of selected IOs |
campaignPriority integer | Campaign priority |
bidModelDataId integer | Bid Model data ID |
workspaceVLDInsightsEarnings integer | Workspace VLD Insights earnings |
platformVLDInsightsEarnings integer | Platform VLD Insights earnings |
vldInsightsCost integer | VLD Insights cost |
ioTimeZoneName string | IO timezone name |
CTRinteger | Click-through rate |
VCR integer | Video completion rate |
CVR integer | Conversion rate |
Get Insertion Order Details
POST /api/v3/cmp/io/basic/listGet a list of Insertion Order (IO) details.
An Insertion Order ioId can be used to query Insertion Order details endpoints or to perform various actions in Insertion Order Management.
| Request Schema | |
|---|---|
owIdList array of integers | List of Organization Workspace IDs for which IO details required |
ioIdList array of integers | List of Insertion Order IDs for which IO details required |
ioBudgetTypeIdsList array of integers | List of Budget Type IDs for which IO details are required |
ioStatusIdsList array of integers | List of Insertion Order Status IDs for which IO details are required |
ids array of integers | Prioritizes specified IO IDs before others in returned data |
isAllOWIds boolean | Filters records with all allowed OW IDs if true, prioritizes records over owIds |
pageNo integer | page number for required data |
noOfEntries integer | Number of records per page |
searchField string | Name of search field (supported values: name and id) |
sortBy string | Comma separated names of the sorting field. Sorts by ascending (id) or descending (-) Supported values: ioId, ioName, ioStartTime, ioEndTime, ioTotalBudget |
offset integer | Offset is alternative of page number. Offset is number of records to be skipped |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 20,
"ioIdList": [
12,
34
],
"ids": [
2
],
"searchField": "io name",
"sortBy": "-ioId",
"ioBudgetTypeIdsList": [
2
],
"ioStatusIdsList": [
1,
2,
3
],
"offset": 1
}
{
"success": true,
"data": {
"totalRecords": 3,
"ioBasicDetailsList": [
{
"ioId": 1630,
"ioName": "phase 2 test",
"ioStartTime": 1792179297123,
"ioEndTime": 1793179297123,
"ioTimeZoneId": 29,
"ioTotalBudget": 0,
"ioBudgetDistributionMethodId": 1,
"ioBudgetTypeId": 2,
"ioStatusId": 1,
"ioTotalImpressions": 0,
"isBudgetAutoSum": true
},
{
"ioId": 741,
"ioName": "testdatasync",
"ioStartTime": 1692860161542,
"ioEndTime": 1696226400000,
"ioTimeZoneId": 21,
"ioTotalBudget": 100001,
"ioBudgetDistributionMethodId": 1,
"ioBudgetTypeId": 2,
"ioTotalImpressions": 0,
"ioStatusId": 1,
"isBudgetAutoSum": true
},
{
"ioId": 738,
"ioName": "IO Bharat",
"ioStartTime": 1693251767612,
"ioEndTime": 1693353600000,
"ioTimeZoneId": 29,
"ioTotalBudget": 1100,
"ioBudgetDistributionMethodId": 1,
"ioBudgetTypeId": 2,
"ioStatusId": 2,
"ioTotalImpressions": 0,
"isBudgetAutoSum": true
}
],
"filteredRecords": 3
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
ioBasicDetailsList: {
ioId: number;
ioName: string;
ioStartTime: number;
ioEndTime: number;
ioTimeZoneId: number;
ioTotalBudget: number;
ioBudgetDistributionMethodId: number;
ioBudgetTypeId: number;
ioStatusId: number;
ioTotalImpressions: number;
isBudgetAutoSum: boolean
}[]
}
}
};
};
}
function getIOBasicDetailsList(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/basic/list',
requestBody: {
content: {
"application/json": {
searchBy?: `array of strings`,
owIdList?: `array of numbers`,
ids?: `array of numbers`,
ioIdList?: `array of numbers`,
ioBudgetTypeIdsList?: `array of numbers`,
ioStatusIdsList?: `array of numbers`,
allOWIds?: `boolean`,
allOwIds?: `boolean`,
pagination?: `string`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ],
offset?: `number`,
isAllOwIds?: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Advanced Insertion Order Details
GET /api/v3/cmp/io/advanced/listGet an advanced list of Insertion Order details.
| Query Parameters | |
|---|---|
pageNo integer | page number for returned data |
pageSize integer | Number of records per page |
searchField string | Name of search field Supported values: name and id |
sortBy string | Sorts by ascending (+) or descending (-), default: -ioId |
offset integer | Offset is alternative of page number. Offset is number of records to be skipped |
startDate integer | Unix epoch timestamp of start date for returned data, in milliseconds |
endDate integer | Unix epoch timestamp of end date for returned data, in milliseconds |
budgetTypeIds string | Comma separated Budget Type IDs to include in data |
ioStatusIds string | Comma separated Status IDs to include in data |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 2,
"filteredRecords": 2,
"recordsTotal": {
"prebidCost": 0.0,
"clicks": 0,
"totalCount": 2,
"winRate": 0.0,
"logoURL": null,
"avatarURL": null,
"budgetDay": 0.0,
"budgetSpent": 0.0,
"budgetTotal": 0.0,
"dataCost": 0.0,
"mediaBudget": 0.0,
"owId": 0,
"orgId": 0,
"impressions": 0,
"industry": 0,
"mediaSpent": 0.0,
"spent": 0.0,
"organizationBidShadingSaving": null,
"workspaceSpent": 0.0,
"platformSpent": 0.0,
"customerSpent": 0.0,
"platformMediaEarning": 0.0,
"platformBidShadingEarning": 0.0,
"platformTotalEarning": 0.0,
"workspaceMediaEarning": 0.0,
"workspaceBidShadingEarning": 0.0,
"workspaceTotalEarning": 0.0,
"organizationName": null,
"companySize": 0,
"workspaceName": null,
"workspaceId": 0,
"workspaceDomain": null,
"workspaceOrganizationName": null,
"bidImpressions": 0,
"startCount": 0,
"firstCount": 0,
"midCount": 0,
"thirdCount": 0,
"completeCount": 0,
"audioVideoActualBids": 0,
"audioVideoActualImpressions": 0,
"eCPC": 0.0,
"eCPM": 0.0,
"eCPI": 0.0,
"eCPCV": 0.0,
"eCPV": 0.0,
"totalAttributedConversion": null,
"totalAttributedViewThroughConversion": null,
"totalAttributedClickThroughConversion": null,
"costPerAttributedConversion": null,
"totalAttributedConversionRate": null,
"reach": null,
"frequency": null,
"date": null,
"campaignId": 0,
"campaignName": null,
"maxBid": null,
"startTime": 0,
"endTime": 0,
"campaignType": null,
"status": null,
"mappingDataCost": 0.0,
"mappingSpent": 0.0,
"campaignTimezone": null,
"creativeType": null,
"budgetPacing": false,
"isCampaignFromNewPlatform": false,
"percentageOfTotalSpent": 0.0,
"uowId": 0,
"audioVideoViewed": 0.0,
"ioId": 0,
"ioName": null,
"ioTimezone": 0,
"ioBudgetDistributionMethod": 0,
"ioStartTime": 0,
"ioEndTime": 0,
"ioTotalBudget": 59900.0,
"isAutoSumIoTotalBudget": false,
"ioBudgetTypeId": 0,
"ioTotalImpressions": null,
"ioStatusId": 0,
"exchangeId": 0,
"exchangeName": null,
"budgetTypeId": 0,
"targetImpression": null,
"dailyImpression": null,
"creativesCount": null,
"campaignsCount": 0,
"pacingPercentage": null,
"actualSpent": null,
"expectedSpent": null,
"campaignDuration": null,
"remainingDuration": null,
"dailyPacingPercentage": null,
"expectedDailySpent": null,
"actualDailySpent": null,
"ioPacingPercentage": null,
"ioActualSpent": 0.0,
"ioExpectedSpent": 0.0,
"ioDuration": null,
"ioRemainingDuration": 0,
"budgetTotalCombined": null,
"budgetDayCombined": null,
"ioTotalBudgetCombined": null,
"campaignPriority": null,
"bidModelDataId": null,
"baseBid": null,
"campaignTypeId": null,
"workspaceVLDInsightsEarnings": null,
"platformVLDInsightsEarnings": null,
"isEligibleForVLDInsightsReport": null,
"vldInsightsCost": null,
"ioTimeZoneName": null,
"CTR": 0.0,
"VCR": 0.0,
"CVR": 0.0
},
"recordsList": [
{
"prebidCost": 0.0,
"clicks": 0,
"totalCount": 0,
"winRate": 0.0,
"logoURL": null,
"avatarURL": null,
"budgetDay": 0.0,
"budgetSpent": 0.0,
"budgetTotal": 0.0,
"dataCost": 0.0,
"mediaBudget": 0.0,
"owId": 203578,
"orgId": 0,
"impressions": 0,
"industry": 0,
"mediaSpent": 0.0,
"spent": 0.0,
"organizationBidShadingSaving": null,
"workspaceSpent": 0.0,
"platformSpent": 0.0,
"customerSpent": 0.0,
"platformMediaEarning": 0.0,
"platformBidShadingEarning": 0.0,
"platformTotalEarning": 0.0,
"workspaceMediaEarning": 0.0,
"workspaceBidShadingEarning": 0.0,
"workspaceTotalEarning": 0.0,
"organizationName": "Conor's Org",
"companySize": 0,
"workspaceName": null,
"workspaceId": 0,
"workspaceDomain": null,
"workspaceOrganizationName": null,
"bidImpressions": 0,
"startCount": 0,
"firstCount": 0,
"midCount": 0,
"thirdCount": 0,
"completeCount": 0,
"audioVideoActualBids": 0,
"audioVideoActualImpressions": 0,
"eCPC": 0.0,
"eCPM": 0.0,
"eCPI": 0.0,
"eCPCV": 0.0,
"eCPV": 0.0,
"totalAttributedConversion": null,
"totalAttributedViewThroughConversion": null,
"totalAttributedClickThroughConversion": null,
"costPerAttributedConversion": null,
"totalAttributedConversionRate": null,
"reach": 0,
"frequency": 0.0,
"date": null,
"campaignId": 0,
"campaignName": null,
"maxBid": null,
"startTime": 0,
"endTime": 0,
"campaignType": null,
"status": null,
"mappingDataCost": 0.0,
"mappingSpent": 0.0,
"campaignTimezone": null,
"creativeType": null,
"budgetPacing": false,
"isCampaignFromNewPlatform": false,
"percentageOfTotalSpent": 0.0,
"uowId": 0,
"audioVideoViewed": 0.0,
"ioId": 15844,
"ioName": "Test2",
"ioTimezone": 29,
"ioBudgetDistributionMethod": 1,
"ioStartTime": 1726517280000,
"ioEndTime": 0,
"ioTotalBudget": 50000.0,
"isAutoSumIoTotalBudget": true,
"ioBudgetTypeId": 1,
"ioTotalImpressions": null,
"ioStatusId": 1,
"exchangeId": 0,
"exchangeName": null,
"budgetTypeId": 1,
"targetImpression": null,
"dailyImpression": null,
"creativesCount": null,
"campaignsCount": 1,
"pacingPercentage": null,
"actualSpent": null,
"expectedSpent": null,
"campaignDuration": null,
"remainingDuration": null,
"dailyPacingPercentage": null,
"expectedDailySpent": null,
"actualDailySpent": null,
"ioPacingPercentage": 0.0,
"ioActualSpent": 0.0,
"ioExpectedSpent": 0.0,
"ioDuration": null,
"ioRemainingDuration": 0,
"budgetTotalCombined": null,
"budgetDayCombined": null,
"ioTotalBudgetCombined": 50000.0,
"campaignPriority": null,
"bidModelDataId": null,
"baseBid": null,
"campaignTypeId": null,
"workspaceVLDInsightsEarnings": null,
"platformVLDInsightsEarnings": null,
"isEligibleForVLDInsightsReport": null,
"vldInsightsCost": null,
"ioTimeZoneName": "US/Eastern",
"CTR": 0.0,
"VCR": 0.0,
"CVR": 0.0
},
{
"prebidCost": 0.0,
"clicks": 0,
"totalCount": 0,
"winRate": 0.0,
"logoURL": null,
"avatarURL": null,
"budgetDay": 0.0,
"budgetSpent": 0.0,
"budgetTotal": 0.0,
"dataCost": 0.0,
"mediaBudget": 0.0,
"owId": 203578,
"orgId": 0,
"impressions": 0,
"industry": 0,
"mediaSpent": 0.0,
"spent": 0.0,
"organizationBidShadingSaving": null,
"workspaceSpent": 0.0,
"platformSpent": 0.0,
"customerSpent": 0.0,
"platformMediaEarning": 0.0,
"platformBidShadingEarning": 0.0,
"platformTotalEarning": 0.0,
"workspaceMediaEarning": 0.0,
"workspaceBidShadingEarning": 0.0,
"workspaceTotalEarning": 0.0,
"organizationName": "Conor's Org",
"companySize": 0,
"workspaceName": null,
"workspaceId": 0,
"workspaceDomain": null,
"workspaceOrganizationName": null,
"bidImpressions": 0,
"startCount": 0,
"firstCount": 0,
"midCount": 0,
"thirdCount": 0,
"completeCount": 0,
"audioVideoActualBids": 0,
"audioVideoActualImpressions": 0,
"eCPC": 0.0,
"eCPM": 0.0,
"eCPI": 0.0,
"eCPCV": 0.0,
"eCPV": 0.0,
"totalAttributedConversion": null,
"totalAttributedViewThroughConversion": null,
"totalAttributedClickThroughConversion": null,
"costPerAttributedConversion": null,
"totalAttributedConversionRate": null,
"reach": 0,
"frequency": 0.0,
"date": null,
"campaignId": 0,
"campaignName": null,
"maxBid": null,
"startTime": 0,
"endTime": 0,
"campaignType": null,
"status": null,
"mappingDataCost": 0.0,
"mappingSpent": 0.0,
"campaignTimezone": null,
"creativeType": null,
"budgetPacing": false,
"isCampaignFromNewPlatform": false,
"percentageOfTotalSpent": 0.0,
"uowId": 0,
"audioVideoViewed": 0.0,
"ioId": 15688,
"ioName": "Test1",
"ioTimezone": 29,
"ioBudgetDistributionMethod": 1,
"ioStartTime": 1727755200000,
"ioEndTime": 0,
"ioTotalBudget": 9900.0,
"isAutoSumIoTotalBudget": true,
"ioBudgetTypeId": 1,
"ioTotalImpressions": null,
"ioStatusId": 1,
"exchangeId": 0,
"exchangeName": null,
"budgetTypeId": 1,
"targetImpression": null,
"dailyImpression": null,
"creativesCount": null,
"campaignsCount": 1,
"pacingPercentage": null,
"actualSpent": null,
"expectedSpent": null,
"campaignDuration": null,
"remainingDuration": null,
"dailyPacingPercentage": null,
"expectedDailySpent": null,
"actualDailySpent": null,
"ioPacingPercentage": 0.0,
"ioActualSpent": 0.0,
"ioExpectedSpent": 0.0,
"ioDuration": null,
"ioRemainingDuration": 0,
"budgetTotalCombined": null,
"budgetDayCombined": null,
"ioTotalBudgetCombined": 9900.0,
"campaignPriority": null,
"bidModelDataId": null,
"baseBid": null,
"campaignTypeId": null,
"workspaceVLDInsightsEarnings": null,
"platformVLDInsightsEarnings": null,
"isEligibleForVLDInsightsReport": null,
"vldInsightsCost": null,
"ioTimeZoneName": "US/Eastern",
"CTR": 0.0,
"VCR": 0.0,
"CVR": 0.0
}
]
}
}
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;
recordsTotal: {
prebidCost: number;
clicks: number;
totalCount: number;
winRate: number;
logoURL: string;
avatarURL: string;
budgetDay: number;
budgetSpent: number;
budgetTotal: number;
dataCost: number;
mediaBudget: number;
owId: number;
orgId: number;
impressions: number;
industry: number;
mediaSpent: number;
spent: number;
organizationBidShadingSaving: null;
workspaceSpent: number;
platformSpent: number;
customerSpent: number;
platformMediaEarning: number;
platformBidShadingEarning: number;
platformTotalEarning: number;
workspaceBidShadingEarning: number;
workspaceTotalEarning: number;
organizationName: string;
companySize: number;
workspaceName: string;
workspaceId: number;
workspaceDomain: null;
workspaceOrganizationName: string;
bidImpressions: number;
startCount: number;
firstCount: number;
midCount: number;
thirdCount: number;
completeCount: number;
audioVideoActualBids: number;
audioVideoActualImpressions: number;
eCPC: number;
eCPM: number;
eCPI: number;
eCPCV: number;
eCPV: number;
totalAttributedConversion: number;
totalAttributedViewThroughConversion: number;
totalAttributedClickThroughConversion: number;
costPerAttributedConversion: number;
totalAttributedConversionRate: number;
reach: null;
frequency: null;
date: null;
campaignId: number;
campaignName: string;
maxBid: null;
startTime: number;
endTime: number;
campaignType: null;
status: null;
mappingDataCost: number;
mappingSpent: number;
campaignTimezone: null;
creativeType: null;
budgetPacing: boolean;
isCampaignFromNewPlatform: boolean;
percentageOfTotalSpent: number;
uowId: number;
audioVideoViewed: number;
ioId: number;
ioName: null;
ioTimezone: number;
ioBudgetDistributionMethod: number;
ioStartTime: number;
ioEndTime: number;
ioTotalBudget: number;
isAutoSumIoTotalBudget: boolean;
ioBudgetTypeId: number;
ioTotalImpressions: null;
ioStatusId: number;
exchangeId: number;
exchangeName: string;
budgetTypeId: number;
targetImpression: null;
dailyImpression: null;
creativesCount: number;
campaignsCount: number;
pacingPercentage: number;
actualSpent: number;
expectedSpent: number;
campaignDuration: null;
remainingDuration: null;
dailyPacingPercentage: null;
expectedDailySpent: null;
actualDailySpent: null;
ioPacingPercentage: null;
ioActualSpent: number;
ioExpectedSpent: number;
ioDuration: null;
ioRemainingDuration: number;
budgetTotalCombined: null;
budgetDayCombined: null;
ioTotalBudgetCombined: null;
campaignPriority: null;
bidModelDataId: null;
baseBid: null;
campaignTypeId: null;
workspaceVLDInsightsEarnings: null;
platformVLDInsightsEarnings: null;
isEligibleForVLDInsightsReport: null;
vldInsightsCost: null;
ioTimeZoneName: null;
CTR: number;
VCR: number;
CVR: number;
}
recordsList: {
prebidCost: number;
clicks: number;
totalCount: number;
winRate: number;
logoURL: null;
avatarURL: null;
budgetDay: number;
budgetSpent: number;
budgetTotal: number;
dataCost: number;
mediaBudget: number;
owId: number;
orgId: number;
impressions: number;
industry: number;
mediaSpent: number;
spent: number;
organizationBidShadingSaving: null;
workspaceSpent: number;
platformSpent: number;
customerSpent: number;
platformMediaEarning: number;
platformBidShadingEarning: number;
platformTotalEarning: number;
workspaceBidShadingEarning: number;
workspaceTotalEarning: number;
organizationName: string;
companySize: number;
workspaceName: string;
workspaceId: number;
workspaceDomain: null;
workspaceOrganizationName: string;
bidImpressions: number;
startCount: number;
firstCount: number;
midCount: number;
thirdCount: number;
completeCount: number;
audioVideoActualBids: number;
audioVideoActualBids: number;
eCPC: number;
eCPM: number;
eCPI: number;
eCPCV: number;
eCPV: number;
totalAttributedConversion: number;
totalAttributedViewThroughConversion: number;
totalAttributedClickThroughConversion: number;
costPerAttributedConversion: number;
totalAttributedConversionRate: number;
reach: null;
frequency: null;
date: null;
campaignId: number;
campaignName: string;
maxBid: null;
startTime: number;
endTime: number;
campaignType: null;
status: null;
mappingDataCost: number;
mappingSpent: number;
campaignTimezone: null;
creativeType: null;
budgetPacing: boolean;
isCampaignFromNewPlatform: boolean;
percentageOfTotalSpent: number;
uowId: number;
audioVideoViewed: number;
ioId: number;
ioName: null;
ioTimezone: number;
ioBudgetDistributionMethod: number;
ioStartTime: number;
ioEndTime: number;
ioTotalBudget: number;
isAutoSumIoTotalBudget: boolean;
ioBudgetTypeId: number;
ioTotalImpressions: null;
ioStatusId: number;
exchangeId: number;
exchangeName: string;
budgetTypeId: number;
targetImpression: null;
dailyImpression: null;
creativesCount: number;
campaignsCount: number;
pacingPercentage: number;
actualSpent: number;
expectedSpent: number;
campaignDuration: null;
remainingDuration: null;
dailyPacingPercentage: null;
expectedDailySpent: null;
actualDailySpent: null;
ioPacingPercentage: null;
ioActualSpent: number;
ioExpectedSpent: number;
ioDuration: null;
ioRemainingDuration: number;
budgetTotalCombined: null;
budgetDayCombined: null;
ioTotalBudgetCombined: null;
campaignPriority: null;
bidModelDataId: null;
baseBid: null;
campaignTypeId: null;
workspaceVLDInsightsEarnings: null;
platformVLDInsightsEarnings: null;
isEligibleForVLDInsightsReport: null;
vldInsightsCost: null;
ioTimeZoneName: null;
CTR: number;
VCR: number;
CVR: number;
}[]
}
}
};
};
};
function getIOListWithReportData(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/cmp/io/advanced/list',
parameters: {
query?: {
searchField?: `string`,
pageSize?: `number`,
offset?: `number`,
pageNo?: `number`,
sortBy?: `string`,
startDate?: `number`,
endDate?: `number`,
budgetTypeIds?: `string`,
timeZoneId?: `number`,
ioStatusIds?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Download Advanced IO Details
POST /api/v3/cmp/io/advanced/list/downloadDownload advanced IO details as CSV or XLSX file.
| Request Schema | |
|---|---|
pageNo integer | Page number for returned data |
noOfEntries integer | Number of records per page |
searchField string | Name of search field Supported values: name and id |
sortBy string | Sorts by ascending (+) or descending (-), default: -ioId |
searchField string | Filter data by search |
ioIdsList array of integers | IO IDs to include in data |
timezoneId integer | Timezone ID |
ioStatusIdsList array of integers | Status IDs to include in data |
budgetTypeIdList array of integers | Budget Type IDs to include in data |
columns string | Column names to display in Report as specified by label and value properties |
startDate integer | Unix epoch timestamp of start date for returned data, in milliseconds |
endDate integer | Unix epoch timestamp of end date for returned data, in milliseconds |
fileType string | File type to download: csv or xlsx |
fileName string | File name |
owIds string | Download file will only contain data for comma separated customer OW IDs |
Response Properties
url string | File download URL |
- JSON
- TypeScript
{
"startDate": "1698638400000",
"endDate": "1698724799000",
"timezoneId": 29,
"searchField": "",
"sortBy": "impressions",
"order": "DESC",
"owIds": "",
"ioIdsList": [],
"ioStatusIdsList": [
1,
2
],
"fileType": "xlsx",
"fileName": "IO",
"budgetTypeIdList": [
1,
2
],
"columns": [
{
"label": "Insertion Order ID",
"value": "ioId"
},
{
"label": "Insertion Order Name",
"value": "ioName"
},
{
"label": "Status",
"value": "ioStatus"
},
{
"label": "Start date",
"value": "ioStartTime"
},
{
"label": "End date",
"value": "ioEndTime"
},
{
"label": "Impressions",
"value": "targetImpression"
},
{
"label": "Clicks",
"value": "clicks"
}
]
}
{
"success": true,
"data": {
"url": "https://tmpd3vsekqsh1zre3k8n-stage.s3.amazonaws.com/"
}
}
See TypeScript Prerequisites for usage.
Get IO Campaign Budget and Details
GET /api/v3/cmp/io/campaign/budget-impression/infoGet an IO's Campaigns budget and spending details.
| Query Parameters | |
|---|---|
ioId integer | Insertion Order ID to retreive details for |
Response Properties
totalAllocatedBudget integer | Total budget allocated to IO's Campaigns |
totalSpentBudget integer | Total budget spent by IO's Campaigns |
totalAllocatedImpression integer | Total impressions allocated to IO's Campaigns |
totalSpentImpression integer | Total impressions spent by IO's Campaigns |
totalImpressions integer | Total impressions count of IO's Campaigns |
totalBudget integer | Total budget of IO's Campaigns |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalAllocatedBudget": 0.01154397815666,
"totalSpentBudget": 0.01154397815666,
"totalAllocatedImpression": 0,
"totalSpentImpression": 0,
"totalImpressions": 0,
"totalBudget": 0.011543
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalAllocatedBudget: number;
totalSpentBudget: number;
totalAllocatedImpression: number;
totalSpentImpression: number;
totalImpressions: number;
totalBudget: number;
}
}
};
};
};
function getBudgetAndImpressionInfoByIOId(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/cmp/io/campaign/budget-impression/info',
parameters: {
query: {
ioId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaign Details Grouped by Insertion Order ID
POST /api/v3/cmp/io/campaign/basic/listGet a list of Campaigns details grouped by Insertion Order ID with supported filters.
Optional parameters to filter/sort results
| Request Schema | |
|---|---|
pageNo integer | Page number for the data, default: 1 |
noOfEntries integer | Maximum number of entries returned, default: 20 |
sortBy string | Sorts by ascending (+) or descending (-) Supported values: ioId, ioName, ioStartTime, ioEndTime, ioTotalBudget, campaignId, isRecordTargeted |
searchField string | Search the result by keyword |
ioIdsList array of integers | Filter by Insertion Order IDs. Records matching provided IDs will be returned first, before others |
campaignTypeIds array of integers | Filter results by Campaign Type IDs |
ids array of integers | Filters for Campaign IDs |
ioIds array of integers | Filters for Insertion Order IDs |
status array of strings | Filters for types of Campaign Status |
creativeTypeIds array of integers | Filters for Creative Type IDs |
ioBudgetTypeIds array of integers | Filters for Budget Type IDs |
owIds array of integers | Filters for Customer Organization Workspace IDs |
offset integer | Offset is alternative of page number. Offset is number of records to be skipped |
- JSON
- TypeScript
{
"creativeTypeIds": [
11,
14
],
"owIds": [
201427
],
"ids": [
321743
],
"searchField": "default",
"pageNo": 1,
"noOfEntries": 20,
"sortBy": "+ioId",
"status": [
"running",
"pending"
],
"ioIds": [
363
],
"campaignTypeIds": [
1
],
"ioBudgetTypeIds": [
1
],
"offset": 1
}
{
"success": true,
"data": {
"totalRecords": 272,
"ioCampaignsList": [
{
"ioId": 4091,
"ioName": "Future start date",
"ioBudgetTypeId": 1,
"ioStatusId": 1,
"created": 1700726026913,
"lastModified": 1700726065000,
"owId": 201353,
"uowId": 8776,
"campaignCount": 1,
"campaigns": [
{
"id": 450700,
"campaignId": 450700,
"name": "future date campaign",
"creativeTypeId": 11,
"campaignTypeId": 1,
"status": "running",
"startTime": 1732690800,
"endTime": 1767164400,
"createdAt": 1701078853,
"modifiedAt": 1707091200000,
"owId": 201353,
"timezoneId": 21,
"targetedAudienceIds": [
1010324,
1054144,
1060433,
1063317
]
}
]
},
{
"ioId": 3979,
"ioName": "Test IO for campaign popup",
"ioBudgetTypeId": 1,
"ioStatusId": 1,
"created": 1700476689502,
"lastModified": 1701248369000,
"owId": 201353,
"uowId": 8776,
"campaignCount": 1,
"campaigns": [
{
"id": 451031,
"campaignId": 451031,
"name": "no end date",
"creativeTypeId": 11,
"campaignTypeId": 1,
"status": "running",
"startTime": 1701249000,
"createdAt": 1701248369,
"modifiedAt": 1707091200000,
"owId": 201353,
"timezoneId": 21,
"targetedAudienceIds": [
1010324,
1054144,
1060433,
1063317
]
}
]
},
{
"ioId": 225,
"ioName": "Beatrice King",
"ioBudgetTypeId": 1,
"ioStatusId": 2,
"created": 1677925263000,
"lastModified": 1700888400000,
"owId": 201353,
"uowId": 112037,
"campaignCount": 1,
"campaigns": [
{
"id": 450277,
"campaignId": 450277,
"name": "prod-campaign-20935 copy",
"creativeTypeId": 11,
"campaignTypeId": 1,
"status": "running",
"startTime": 1700819565,
"endTime": 1709182800,
"createdAt": 1700818673,
"modifiedAt": 1707177600000,
"owId": 201353,
"timezoneId": 29,
"targetedAudienceIds": null
}
]
},
{
"ioId": 48,
"ioName": "UAW",
"ioBudgetTypeId": 1,
"ioStatusId": 1,
"created": 1665500839000,
"lastModified": 1704704810000,
"owId": 201353,
"uowId": 8776,
"campaignCount": 1,
"campaigns": [
{
"id": 20731,
"campaignId": 20731,
"name": "prod-campaign-20731",
"creativeTypeId": 11,
"campaignTypeId": 1,
"status": "running",
"startTime": 1676700273,
"endTime": 1711857600,
"createdAt": 1676700278,
"modifiedAt": 1707177600000,
"owId": 201353,
"timezoneId": 29,
"targetedAudienceIds": null
}
]
}
],
"filteredRecords": 4
}
}
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;
ioCampaignsList: {
ioId: number;
ioname: string;
ioBudgetTypeId: number;
created: number;
lastModified: number;
owId: number;
uowId: number;
campaignCount: number;
campaigns: {
id: number;
campaignId: number;
name: string;
creativeTypeId: number;
campaignTypeId: number;
status: string;
startTime: number;
endTime: number;
createdAt: number;
modifiedAt: number;
owId: number;
timezoneId: number;
targetedAudienceIds: number[];
}[]
}[]
}
}
}
};
};
function getIoMappedWithCampaignsDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/campaign/basic/list',
requestBody: {
content: {
"application/json": {
searchBy?: `array of strings`,
status?: `array of strings`,
creativeTypeIds?: `array of numbers`,
owIds?: `array of numbers`,
ioIds?: `array of numbers`,
ids?: `array of numbers`,
campaignIds?: `array of numbers`,
campaignTypeIds?: `array of numbers`,
ioBudgetTypeIds?: `array of numbers`,
paymentTypeId?: `number`,
includeTargetedAudienceList?: `boolean`,
campaignExpiredAfterEpoch?: `number`,
allOwIds?: `boolean`,
pagination?: `string`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ],
offset?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaign Details Grouped by IO ID With Filters
POST /api/v3/cmp/io/campaign/served/listGet a list of Insertion Order details along with Campaigns details attached to that IO based on filters.
| Request Schema | |
|---|---|
pageNo integer | Page number for the data, default: 1 |
noOfEntries integer | Maximum number of entries returned, default: 20 |
sortBy string | Sorts by ascending (+) or descending (-) Supported values: ioId, ioName, ioStartTime, ioEndTime, ioTotalBudget, campaignId, isRecordTargeted |
searchField string | Search the result by keyword |
ioIds array of integers | Filter by Insertion Order IDs. Records matching provided IDs will be returned first, before others |
campaignIds array of integers | Filters results by provided Campaign IDs |
status array of strings | Filters for types of Campaign Status |
creativeTypeIds array of integers | Filters for Creative Type IDs |
owIds array of integers | Filters for Customer Organization Workspace IDs |
isAllOwIds object | Filters records with all allowed OW IDs if true, prioritizes records over owIds |
startDate integer required | Returns IOs with start date greater than date provided (should not be older than a year) |
endDate integer required | Returns IOs with start date less than date provided (should not be older than a year) |
- JSON
- TypeScript
{
"creativeTypeIds": [
11,
14
],
"status": [
"expired"
],
"owIds": [
201427
],
"ioIds": [
5437
],
"campaignIds": [
456354
],
"isAllOwIds": false,
"searchField": "c",
"pageNo": 0,
"noOfEntries": 20,
"offset": 1,
"sortBy": "ioId",
"startDate": 1676472364000,
"endDate": 1708008364000
}
{
"success": true,
"data": {
"ioCampaignsList": [
{
"ioId": 363,
"ioName": "Default Insertion Order",
"ioBudgetTypeId": 2,
"ioStatusId": 1,
"created": 1691588961000,
"lastModified": 1691588961000,
"owId": 201427,
"uowId": 9489,
"campaignCount": 3,
"campaigns": [
{
"creativeTypeId": 11,
"id": 321743,
"name": "Campaign For Shoes",
"owId": 201427,
"status": "running",
"lastModified": 1690329600000,
"uowId": 9483,
"organizationName": "Organisation Name",
"organizationLogo": "https://webs.jpg"
},
{
"creativeTypeId": 17,
"id": 326679,
"name": "Cricket Campaign",
"owId": 201427,
"status": "running",
"lastModified": 1690329600000,
"uowId": 9485,
"organizationName": "Organisation Name",
"organizationLogo": "https://webs.jpg"
},
{
"creativeTypeId": 11,
"id": 323919,
"name": "Shirt Campaign",
"owId": 201427,
"status": "pending",
"lastModified": 1692144000000,
"uowId": 1,
"organizationName": "Organisation Name",
"organizationLogo": "https://webs.jpg"
}
]
}
],
"totalRecords": 1477,
"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: {
ioCampaignsList: {
ioId: number;
ioName: string;
ioBudgetTypeId: number;
ioStatusId: number;
created: number;
lastModified: number;
owId: number;
uowId: number;
campaignCount: number;
campaigns: {
creativeTypeId: number;
id: number;
name: string;
owId: number;
status: string;
lastModified: number;
uowId: number;
organizationName: string;
organizationLogo: string;
}[]
}
}
totalRecords: number;
filteredRecords: number;
}
};
};
};
function getServedIoMappedWithCampaignsDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/campaign/served/list',
requestBody: {
content: {
"application/json": {
searchBy?: `array of strings`,
status?: `array of strings`,
creativeTypeIds?: `array of numbers`,
owIds?: `array of numbers`,
ioIds?: `array of numbers`,
ids?: `array of numbers`,
campaignIds?: `array of numbers`,
campaignTypeIds?: `array of numbers`,
ioBudgetTypeIds?: `array of numbers`,
paymentTypeId?: `number`,
includeTargetedAudienceList?: `boolean`,
campaignExpiredAfterEpoch?: `number`,
startDate?: `number`,
endDate?: `number`,
allOwIds?: `boolean`,
pagination?: `string`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ],
offset?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaigns and Report Details by Insertion Order ID
POST /api/v3/cmp/io/campaigns/listGet a list of Campaigns with detailed Report by Insertion Order ID (ioId) with supported filters.
| Request Schema | |
|---|---|
pageNo integer | Page number for the data, default: 1 |
noOfEntries integer | The maximum number of returned results per page, default: 20 |
sortBy string | Sorts by ascending (+) or descending (-) (See supported values in collapsible section below table.) |
searchField string | Search the result by keyword |
ioIdsList array of integers | Filter by Insertion Order IDs. Records matching provided IDs will be returned first, before others |
budgetTypeIdList array of integers | Filters for selected Budget Type IDs e.g. "impression based" or "budget based". Records matching the provided IDs will be returned |
campaignIds array of integers | Filters for selected Campaign IDs. Records matching the provided IDs will be returned first, before others |
timeZoneId integer | Filters Campaigns for specified Timezone ID |
campaignStatusList array of strings | Filters Campaigns by specified Campaign Status |
creativeTypeIds string | Filters Campaigns by specified Creative Type ID |
owIds string | Filters Campaigns by specified Customer Organization Workspace ID |
Supported sortBy Values
clicksimpressionsbidImpressionsstartCountfirstCountmidCountthirdCountcompleteCountdataCostspentmediaSpentwinRateVCReCPCeCPMeCPICTRCVReCPCVeCPVbudgetDaybudgetTotalcampaignIdcampaignNamemaxBidstartTimeendTimecampaignTypestatusbudgetDaybudgetTotalreachfrequencymappingDataCostmappingSpentpercentageOfTotalSpentorganizationNameaudioVideoViewedcampaignTimezonepixalateViewAbilityioNameioIdtargetImpressioncreativesCountpacingPercentagedailyPacingPercentageprebidCostioTotalImpressionsdailyImpressionscampaignPrioritytotalAttributedConversiontotalAttributedViewThroughConversiontotalAttributedClickThroughConversioncostPerAttributedConversiontotalAttributedConversionRate
- JSON
- TypeScript
{
"campaignStatusList": [
"running"
],
"timezoneId": 29,
"owIds": "200425,201427",
"ids": [
1,
2
],
"ioIdsList": [
1,
2,
38
],
"budgetTypeIdList": [
1
],
"campaignIds": "1,2,3",
"sortBy": "+campaignName",
"creativeTypeIds": "14",
"searchField": "campaign"
}
{
"success": true,
"data": {
"totalRecords": 2,
"filteredRecords": 2,
"recordsTotal": {
"clicks": 0,
"totalCount": 1,
"winRate": 0,
"logoURL": null,
"avatarURL": null,
"budgetDay": 0,
"budgetSpent": 0,
"budgetTotal": 56.339999999999904,
"dataCost": 0,
"mediaBudget": 0,
"owId": 0,
"orgId": 0,
"impressions": 0,
"industry": 0,
"mediaSpent": 0,
"spent": 0,
"workspaceSpent": 0,
"platformSpent": 0,
"customerSpent": 0,
"platformEarning": 0,
"workspaceEarning": 0,
"organizationName": null,
"companySize": 0,
"workspaceName": null,
"workspaceId": 0,
"workspaceDomain": null,
"workspaceOrganizationName": null,
"bidImpressions": 0,
"startCount": 0,
"firstCount": 0,
"midCount": 0,
"thirdCount": 0,
"completeCount": 0,
"audioVideoActualBids": 0,
"audioVideoActualImpressions": 0,
"eCPC": 0,
"eCPM": 0,
"eCPI": 0,
"eCPCV": 0,
"eCPV": 0,
"totalAttributedConversion": 0,
"totalAttributedViewThroughConversion": 0,
"totalAttributedClickThroughConversion": 0,
"costPerAttributedConversion": 0,
"totalAttributedConversionRate": 0,
"reach": 0,
"frequency": 0,
"date": null,
"campaignId": 0,
"campaignName": null,
"maxBid": 0,
"startTime": 0,
"endTime": 0,
"campaignType": null,
"status": null,
"mappingDataCost": 0,
"mappingSpent": 0,
"campaignTimezone": null,
"creativeType": null,
"budgetPacing": false,
"isCampaignFromNewPlatform": false,
"percentageOfTotalSpent": 0,
"uowId": 0,
"audioVideoViewed": 0,
"ioId": 0,
"ioName": null,
"ioTimezone": 0,
"ioBudgetDistributionMethod": 0,
"ioStartTime": 0,
"ioEndTime": 0,
"ioTotalBudget": 0,
"isAutoSumIoTotalBudget": false,
"ioBudgetTypeId": 0,
"ioTotalImpressions": null,
"pacingPercentage": null,
"actualSpent": 0,
"expectedSpent": 0,
"campaignDuration": null,
"remainingDuration": 0,
"dailyPacingPercentage": null,
"expectedDailySpent": 0,
"actualDailySpent": 0,
"ioStatusId": 0,
"exchangeId": 0,
"creativesCount": null,
"exchangeName": null,
"budgetTypeId": 0,
"targetImpression": null,
"dailyImpression": 0,
"budgetTotalCombined": 100,
"budgetDayCombined": 10,
"campaignPriority": null,
"ioTotalBudgetCombined": 1000,
"CTR": 0,
"VCR": 0,
"CVR": 0
},
"recordsList": [
{
"clicks": 0,
"totalCount": 0,
"winRate": 0,
"logoURL": null,
"avatarURL": null,
"budgetDay": 5,
"budgetSpent": 0,
"budgetTotal": 13,
"dataCost": 0,
"mediaBudget": 0,
"owId": 201427,
"orgId": 0,
"impressions": 0,
"industry": 0,
"mediaSpent": 0,
"spent": 0,
"workspaceSpent": 0,
"platformSpent": 0,
"customerSpent": 0,
"platformEarning": 0,
"workspaceEarning": 0,
"organizationName": "Organisation Name",
"companySize": 0,
"workspaceName": null,
"workspaceId": 0,
"workspaceDomain": null,
"workspaceOrganizationName": null,
"bidImpressions": 0,
"startCount": 0,
"firstCount": 0,
"midCount": 0,
"thirdCount": 0,
"completeCount": 0,
"audioVideoActualBids": 0,
"audioVideoActualImpressions": 0,
"eCPC": 0,
"eCPM": 0,
"eCPI": 0,
"eCPCV": 0,
"eCPV": 0,
"totalAttributedConversion": 0,
"totalAttributedViewThroughConversion": 0,
"totalAttributedClickThroughConversion": 0,
"costPerAttributedConversion": 0,
"totalAttributedConversionRate": 0,
"reach": 0,
"frequency": 0,
"date": null,
"campaignId": 445615,
"campaignName": "Campaign For Child",
"maxBid": 4,
"startTime": 1698445456,
"endTime": 1698739200,
"campaignType": "cpv",
"status": "pending",
"mappingDataCost": 0,
"mappingSpent": 0,
"campaignTimezone": "US/Alaska",
"creativeType": "Video",
"budgetPacing": true,
"isCampaignFromNewPlatform": true,
"percentageOfTotalSpent": 0,
"uowId": 9480,
"audioVideoViewed": 0,
"ioId": 2991,
"ioName": "Insertion Order For Donation",
"ioTimezone": 420,
"ioBudgetDistributionMethod": 0,
"ioStartTime": 1698446340000,
"ioEndTime": 1698739200000,
"ioTotalBudget": 26415,
"isAutoSumIoTotalBudget": true,
"ioBudgetTypeId": 0,
"ioTotalImpressions": null,
"pacingPercentage": 12.31,
"actualSpent": 123,
"expectedSpent": 212,
"campaignDuration": 5,
"remainingDuration": 2,
"dailyPacingPercentage": null,
"expectedDailySpent": 123,
"actualDailySpent": 0,
"ioStatusId": 1,
"exchangeId": 0,
"creativesCount": 2,
"exchangeName": null,
"budgetTypeId": 1,
"targetImpression": null,
"dailyImpression": 0,
"budgetTotalCombined": 100,
"budgetDayCombined": 10,
"campaignPriority": 1,
"ioTotalBudgetCombined": 1000,
"CTR": 0,
"VCR": 0,
"CVR": 0
}
],
"totalCount": 2
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
filteredRecords: number;
recordsTotal: {
clicks: number;
totalCount: number;
winRate: number;
logoURL: string;
avatarURL: string;
budgetDay: number;
budgetSpent: number;
budgetTotal: number;
dataCost: number;
mediaBudget: number;
owId: number;
orgId: number;
impressions: number;
industry: number;
mediaSpent: number;
workspaceSpent: number;
platformSpent: number;
customerSpent: number;
platformEarning: number;
workspaceEarning: number;
organizationName: string;
companySize: number;
workspaceName: string;
workspaceId: number;
workspaceDomain: null;
workspaceOrganizationName: string;
bidImpressions: number;
startCount: number;
firstCount: number;
midCount: number;
thirdCount: number;
completeCount: number;
audioVideoActualBids: number;
audioVideoActualImpressions: number;
eCPC: number;
eCPM: number;
eCPI: number;
eCPCV: number;
eCPV: number;
totalAttributedConversion: number;
totalAttributedViewThroughConversion: number;
totalAttributedClickThroughConversion: number;
costPerAttributedConversion: number;
totalAttributedConversionRate: number;
reach: number;
frequency: number;
date: null;
campaignId: number;
campaignName: string;
maxBid: null;
startTime: number;
endTime: number;
campaignType: null;
status: null;
mappingDataCost: number;
mappingSpent: number;
campaignTimezone: null;
creativeType: null;
budgetPacing: boolean;
isCampaignFromNewPlatform: boolean;
percentageOfTotalSpent: number;
uowId: number;
audioVideoViewed: number;
ioId: number;
ioName: null;
ioTimezone: number;
ioBudgetDistributionMethod: number;
ioStartTime: number;
ioEndTime: number;
ioTotalBudget: number;
isAutoSumIoTotalBudget: boolean;
ioBudgetTypeId: number;
ioTotalImpressions: null;
ioStatusId: number;
exchangeId: number;
exchangeName: string;
budgetTypeId: number;
targetImpression: null;
dailyImpression: null;
creativesCount: number;
pacingPercentage: number;
actualSpent: number;
expectedSpent: number;
campaignDuration: null;
remainingDuration: null;
dailyPacingPercentage: null;
expectedDailySpent: null;
actualDailySpent: null;
budgetTotalCombined: null;
budgetDayCombined: null;
ioTotalBudgetCombined: null;
campaignPriority: null;
CTR: number;
VCR: number;
CVR: number;
}
recordsList: {
clicks: number;
totalCount: number;
winRate: number;
logoURL: string;
avatarURL: string;
budgetDay: number;
budgetSpent: number;
budgetTotal: number;
dataCost: number;
mediaBudget: number;
owId: number;
orgId: number;
impressions: number;
industry: number;
mediaSpent: number;
spent: number;
workspaceSpent: number;
platformSpent: number;
customerSpent: number;
platformEarning: number;
workspaceEarning: number;
organizationName: string;
companySize: number;
workspaceName: string;
workspaceId: number;
workspaceDomain: null;
workspaceOrganizationName: string;
bidImpressions: number;
startCount: number;
firstCount: number;
midCount: number;
thirdCount: number;
completeCount: number;
audioVideoActualBids: number;
audioVideoActualImpressions: number;
eCPC: number;
eCPM: number;
eCPI: number;
eCPCV: number;
eCPV: number;
totalAttributedConversion: number;
totalAttributedViewThroughConversion: number;
totalAttributedClickThroughConversion: number;
costPerAttributedConversion: number;
totalAttributedConversionRate: number;
reach: number;
frequency: number;
date: null;
campaignId: number;
campaignName: string;
maxBid: null;
startTime: number;
endTime: number;
campaignType: null;
status: null;
mappingDataCost: number;
mappingSpent: number;
campaignTimezone: null;
creativeType: null;
budgetPacing: boolean;
isCampaignFromNewPlatform: boolean;
percentageOfTotalSpent: number;
uowId: number;
audioVideoViewed: number;
ioId: number;
ioName: null;
ioTimezone: number;
ioBudgetDistributionMethod: number;
ioStartTime: number;
ioEndTime: number;
ioTotalBudget: number;
isAutoSumIoTotalBudget: boolean;
ioBudgetTypeId: number;
ioTotalImpressions: null;
pacingPercentage: number;
actualSpent: number;
expectedSpent: number;
campaignDuration: number;
remainingDuration: number;
dailyPacingPercentage: number;
expectedDailySpent: number;
actualDailySpent: number;
ioStatusId: number;
exchangeId: number;
creativesCount: number;
exchangeName: string;
budgetTypeId: number;
targetImpression: null;
dailyImpression: number;
budgetTotalCombined: number;
budgetDayCombined: number;
campaignPriority: number;
ioTotalBudgetCombined: number;
CTR: number;
VCR: number;
CVR: number;
}[]
}
};
};
};
function getCampaignIODetailsByIoId(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/campaigns/list',
requestBody: {
content: {
"application/json": {
ioIdsList?: `array of numbers`,
campaignStatusList?: `array of strings`,
creativeTypeIds?: `string`,
owIds?: `string`,
campaignIds?: `string`,
ids?: `array of numbers`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
timeZoneId: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Download CSV/XLSX File for IO-based Campaign Details
POST /api/v3/cmp/io/campaigns/list/downloadCreate a downloadable Report of Campaign details based on Insertion Order.
| Request Schema | |
|---|---|
searchField string | Filters results by keyword |
noOfEntries integer | Maximum number of entries returned |
pageNo integer | Page number for the data, default: 1 |
sortBy string | Sorts by ascending (+) or descending (-) |
owIds array of integers | Filter results by Organization Workspace IDs |
ioIds array of integers | Report will include provided Campaign IO IDs |
campaignIds string | Comma separated Campaign IDs to include in Report |
timeZoneId integer | Filters data in Report for provided Timezone ID |
campaignStatus string | Comma separated Campaign statuses to include in Report |
creativeTypeIds string | Filters Report for provided Creative type IDs only |
columns object required | Column names to display in Report as specified by label and value properties |
startDate integer required | Unix epoch start date for data in Report, in milliseconds |
endDate integer required | Unix epoch end date for data in Report, in milliseconds |
fileType string required | Specifies file type for download: csv or xlsx |
fileName string required | Specifies file name for download |
Response Properties
url string | File download URL |
- JSON
- TypeScript
{
"startDate": "1698984000000",
"endDate": "1699070399000",
"timezoneId": 29,
"campaignStatus": "pending,running",
"creativeTypeIds": "",
"searchField": "",
"sortBy": "+impressions",
"owIds": "",
"ioIdsList": [],
"campaignIds": "",
"conversionIds": "",
"fileType": "csv",
"fileName": "Campaigns",
"columns": [
{
"label": "ID",
"value": "campaignId"
},
{
"label": "Campaign Name",
"value": "campaignName"
},
{
"label": "Insertion Order Name",
"value": "ioName"
},
{
"label": "Start date",
"value": "startTime"
},
{
"label": "End date",
"value": "endTime"
},
{
"label": "Max Bid($)",
"value": "maxBid"
},
{
"label": "Daily Budget($)",
"value": "budgetDay"
},
{
"label": "Total Budget($)",
"value": "budgetTotal"
},
{
"label": "Total Spent($)",
"value": "spent"
},
{
"label": "Budget Completion(%)",
"value": "percentageOfTotalSpent"
},
{
"label": "Target Impressions",
"value": "targetImpression"
},
{
"label": "Impressions",
"value": "impressions"
},
{
"label": "Clicks",
"value": "clicks"
},
{
"label": "CTR(%)",
"value": "CTR"
},
{
"label": "eCPM($)",
"value": "eCPM"
},
{
"label": "VCR(%)",
"value": "VCR"
},
{
"label": "WinRate(%)",
"value": "winRate"
}
]
}
{
"success": true,
"data": {
"url": "https://tmpd3vsekqsh1zre3k8n-stage.s3.amazonaws.com/"
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Invalid sortBy value."
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
url: string
}
}
};
};
422: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[]
}
};
};
};
function downloadCampaignsReport(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/campaigns/list/download',
requestBody: {
content: {
"application/json": {
startDate?: `number`,
endDate?: `number`,
ioIdsList?: `array of numbers`,
timezoneId?: `number`,
campaignStatus?: `string`,
creativeTypeIds?: `string`,
owIds?: `string`,
conversionIds?: `string`,
fileType?: `string`,
fileName?: `string`,
campaignIds?: `string`,
owIdsList?: `array of numbers`,
campaignTypeIds?: `array of numbers`,
pagination?: `string`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ],
offset?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of IO Start/End Dates
POST /api/v3/cmp/io/startDate/listPOST /api/v3/cmp/io/endDate/list
| Request Schema | |
|---|---|
noOfEntries integer | Maximum number of entries returned, default: 300 |
pageNo integer | Page number for the data, default: 1 |
sortBy string | Sorts by ascending (+) or descending (-), default: -ioDate |
owIds array of integers | Filter results by Organization Workspace IDs |
isAllOwIds boolean | Filters records with all allowed OW IDs if true, prioritizes records over owIds |
ids array of integers | Prioritizes results of provided IDs over other records |
startDate string | Filters for IOs with start date greater than the one specified |
endDate string | Filters for IOs with a date less than the one specified |
Response Properties
ioStartDateList array of strings | List of IO start dates |
- JSON
- TypeScript
{
"noOfEntries": 30,
"pageNo": -1,
"searchField": "",
"sortBy": "-Date",
"startDate": "08/17/2023",
"endDate": "11/17/2023"
}
{
"success": true,
"data": {
"ioStartDateList": [
"02/21/2023",
"01/27/2023",
"01/20/2023",
"01/11/2023",
"01/06/2023",
"01/05/2023",
"12/29/2022",
"12/28/2022",
"12/23/2022",
"12/22/2022"
],
"totalRecords": 16,
"filteredRecords": 10
}
}
See TypeScript Prerequisites for usage.v
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
ioStartDateList: string[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getIOStartDateList(): Promise<Responses> {
/*
* or
*
* function getIOEndDateList(): Promise<Responses> {
*/
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/startDate/list',
/*
* or
*
* url: 'https://api.iqm.com/api/v3/cmp/io/endDate/list',
*/
requestBody: {
content: {
"application/json": {
owIds?: `array of numbers`,
isAllOwIds?: `boolean`,
ids?: `array of strings`,
startDate?: `string`,
endDate?: `string`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ],
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Insertion Order Management
Create an Insertion Order
POST /api/v3/cmp/io/addCreate an Insertion Order with the following minimum required fields:
ioNameioStartTimeioEndTimeioBudgetTypeId
- JSON
- TypeScript
{
"ioName": "IO Name 1",
"ioStartTime": 1690898148000,
"ioEndTime": 1690898888000,
"ioTotalBudget": 1000,
"ioTimeZoneId": 29,
"isAutoSumIoTotalBudget": true,
"ioBudgetTypeId": 1,
"ioBudgetDistributionMethodId": 1
}
{
"success": true,
"data": {
"ioId": 6,
"ioName": "IO Name 1",
"ioStartTime": 1690898148000,
"ioEndTime": 1690898888000,
"ioTotalBudget": 0,
"ioTimeZoneId": 29,
"ioBudgetTypeId": 1,
"ioBudgetDistributionMethodId": 1,
"isAutoSumIoTotalBudget": true,
"ioTotalImpressions": null
}
}
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: {
ioId: number;
ioName: string;
ioStartTime: number;
ioEndTime: number;
ioTotalBudget: number;
ioTimeZoneId: number;
ioBudgetTypeId: number;
ioBudgetDistributionMethodId: number;
isAutoSumIoTotalBudget: boolean;
ioTotalImpressions: number
}
}
};
};
};
function createCampaignIO(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/add',
requestBody: {
content: {
"application/json": {
ioId?: `number`,
ioName: `string`,
owId?: `number`,
createdByUowId?: `number`,
modifiedByUowId?: `number`,
ioStartTime?: `number`,
ioEndTime?: `number`,
ioTotalBudget?: `number`,
ioTimeZoneId?: `number`,
isAutoSumIoTotalBudget?: `boolean`,
ioBudgetDistributionMethodId?: `number`,
ioBudgetTypeId?: `number`,
ioTotalImpressions?: `number`,
ioStatusId?: `number`,
ioNextPerformanceCheck?: `number`,
ioLastPriorityShift?: `number`,
ioCurrentPriority?: `number`,
isIoPrioritise?: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Insertion Order Details
PATCH /api/v3/cmp/io/{ioId}Update various properties of a given Insertion Order.
| Path Parameters | |
|---|---|
ioId integer | Insertion Order ID |
| Request Schema | |
|---|---|
ioName string | Update Insertion Order name |
ioStartTimeinteger | Unix epoch timestamp (in milliseconds) of IO start time |
ioEndTime integer | Unix epoch timestamp (in milliseconds) of IO end time |
ioTotalBudget integer | Budget of IO |
ioTimeZoneId integer | Timezone ID |
ioTotalImpressions integer | Number of impressions |
isAutoSumIoTotalBudget boolean | If true Keeps IO budget same as total budget of all included Campaigns |
Response Properties
success boolean | Indicates IO was succesfully updated: true |
data string | Success message |
- JSON
- TypeScript
{
"ioName": "IO Name 1",
"ioStartTime": 1690898148000,
"ioEndTime": 1690898888000,
"ioTotalBudget": 1000,
"ioTotalImpressions": 0,
"ioTimeZoneId": 29,
"ioBudgetTypeId": 1,
"isAutoSumIoTotalBudget": true
}
{
"success": true,
"data": "IO Name 1 saved successfully."
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string
}
};
};
};
function editIODetails(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/io/{ioId}',
params: {
path: {
ioId: `number`
}
},
requestBody: {
content: {
"application/json": {
ioName?: `string`,
ioEndTime?: `number`,
ioStartTime?: `number`,
ioTotalBudget?: `number`,
isAutoSumIoTotalBudget?: `boolean`,
ioTimeZoneId?: `number`,
ioTotalImpressions?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update End Date for Multiple IOs
PATCH /api/v3/cmp/io/update-end-dateUpdate the end date for a list of IOs from either an Advertiser profile or a workspace.
| Request Schema | |
|---|---|
ioIdsList array of integers | IO IDs to update |
ioEndTime integer | Unix epoch timestamp of end time, in milliseconds |
ioTimezoneId integer | Timezone ID |
ioOwId integer optional | Insertion Order Workspace ID (if updating as a workspace profile) |
Response Properties
success boolean | Indicates IO was succesfully updated: true |
data string | Success message |
- JSON
- TypeScript
{
"ioIdsList": [
1,
2,
3
],
"ioEndTime": 1690898148000,
"ioTimezoneId": 29,
"ioOwId": 201427
}
{
"success": true,
"data": "EndDate updated successfully"
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "IO IDs list can not be empty."
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string
}
};
};
403: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[]
}
};
};
422: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string
}[]
}
};
};
};
function updateIOEndDate(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/io/update-end-date',
requestBody: {
content: {
"application/json": {
ioIdsList?: `array of numbers`,
ioEndTime?: `number`,
ioTimezoneId?: `number`,
ioOwId?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Budget for Multiple IOs
PATCH /api/v3/cmp/io/update-budgetUpdate budget for a given list of IOs for either a dollar-based budget or an impressions-based budget.
| Request Schema | |
|---|---|
ioIdsList array of integers | IO IDs to update with either budget or ioTotalImpressions |
budget integer | Dollars-based budget amount |
ioTotalImpressions integer | Impressions-based budget amount |
budgetUpdateType string | set or add dollars-based budget type |
ioOwId integer optional | Insertion Order Workspace ID (if updating as a workspace profile) |
Response Properties
success boolean | Indicates IO was succesfully updated: true |
data string | Success message |
- JSON
- TypeScript
{
"ioIdsList": [
1,
2,
3
],
"ioTotalImpressions": 10023,
"budgetUpdateType": "set",
"ioOwId": 201427
}
{
"success": true,
"data": "Budget updated successfully"
}
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: string
}
};
};
};
function updateIOBudgetByIOList(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/io/update-budget',
requestBody: {
content: {
"application/json": {
ioIdsList?: `array of numbers`,
budget?: `number`,
budgetUpdateType?: `string`,
ioOwId?: `number`,
ioBudgetTypeId?: `number`,
ioTotalImpressions?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Duplicate an Insertion Order
POST /api/v3/cmp/io/duplicateDuplicate a single IO, and all Campaigns within that IO.
| Request Schema | |
|---|---|
ioExistingCampaignIds array of integers | Campaign IDs within specified IO (ioId) |
ioId integer | Specified IO to duplicate |
ioTimeZoneId integer | Timezone ID |
ioEndTime integer | Unix epoch of IO end time |
ioStartTime integer | Unix epoch of IO start time |
Response Properties
duplicatedCampaignIds array of integers | Duplicated Campaign IDs |
duplicatedIOId integer | Duplicated IO ID |
- JSON
- TypeScript
{
"ioStartTime": 1698295604000,
"ioEndTime": 1698258600000,
"ioId": 223,
"ioTimeZoneId": 105,
"ioExistingCampaignIds": [
12345,
67890,
21345
]
}
{
"success": true,
"data": {
"duplicatedCampaignIds": [
12345,
54321
],
"duplicatedIOId": 271
}
}
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: {
duplicatedCampaignIds: number[];
duplicatedIOId: number
}
}
};
};
};
function duplicateIO(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/cmp/io/duplicate',
requestBody: {
content: {
"application/json": {
ioExistingCampaignIds?: `array of numbers`,
ioId?: `number`,
ioTimeZoneId?: `number`,
ioEndTime?: `number`,
ioStartTime?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Delete an Insertion Order
DELETE /api/v3/cmp/io/deleteDelete one or multiple IOs and all Campaigns attached to them.
| Request Schema | |
|---|---|
ioIdsList array of integers | Insertion Order IDs |
Response Properties
success boolean | Indicates IO was succesfully updated: true |
data string | Success message |
- JSON
- TypeScript
{
"ioIdsList": [
1,
2,
3
]
}
{
"success": true,
"data": "3 Insertion Orders deleted successfully"
}
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: string
}
};
};
};
function updateIOStatusToDelete(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/cmp/io/delete',
requestBody: {
content: {
"application/json": {
ioIdsList: `array of numbers`,
owIdsList?: `array of numbers`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get More Details
Get IO Status List
GET /api/v3/cmp/static/io/status/listGet list of IO statuses and their corresponding details.
| Status IDs | |
|---|---|
1 | Active |
2 | Expired |
3 | Deleted |
- JSON
- TypeScript
{
"success": true,
"data": {
"ioStatusList": [
{
"name": "active",
"id": 1,
"label": "Active",
"order": 1
},
{
"name": "expired",
"id": 2,
"label": "Expired",
"order": 2
},
{
"name": "deleted",
"id": 3,
"label": "Deleted",
"order": 3
}
],
"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: {
ioStatusList: {
name: string;
id: number;
label: string;
order: number
}[];
totalRecords: number;
filteredRecords: number
}
}
};
};
};
function getIOStatusTypeList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/cmp/io/status/list',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Campaign Budget Types
GET /api/v3/cmp/static/campaign/budget-typeGet list of budget types.
| Properties | |
|---|---|
1 Budget | Campaigns/Insertion Orders with set budget amount. To learn more see our Help Center articles |
2 Impression | Campaigns/Insertion Orders with set target for impressions to generate. To learn more see our Help Center articles |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 2,
"filteredRecords": 2,
"budgetTypeData": [
{
"id": 1,
"name": "budget",
"label": "Budget",
"order": 1
},
{
"id": 2,
"name": "impression",
"label": "Impression",
"order": 2
}
]
}
}
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: {
totalRecords: number;
filteredRecords: number;
budgetTypeData: {
id: number;
name: string;
label: string;
order: number;
}[]
}
}
};
};
};
function getBudgetTypeList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/cmp/static/campaign/budget-type',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Budget Distribution Methods
GET /api/v3/cmp/static/budget-distribution-method/listGet list of budget distribution methods.
| Status IDs | |
|---|---|
1 | Manual |
2 | Auto |
- JSON
- TypeScript
{
"success": true,
"data": {
"budgetDistributionMethodData": [
{
"name": "manual",
"id": 1,
"label": "Manual",
"order": 1
},
{
"name": "auto",
"id": 2,
"label": "Auto",
"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: {
budgetDistributionMethodData: {
name: string;
id: number;
label: string;
order: number;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getStaticBudgetDistributionList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/cmp/static/budget-distribution-method/list',
parameters: {
query?: {
budgetDistributionMethod?: `number`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}