Planner API
Overview
The planner API allows users to draft an ad strategy proposal that meets their client's requirements while also achieving Campaign goals.
Planner proposals offer insight summaries for reach and impression parameters that can then be applied to Campaigns to pre-optimize their success. The planner API can also apply audience and targeting details to a Campaign.
Once a proposal is drafted the Planner API can generate an Insertion Order and Campaign while also validating the proposal details.
This page covers the common endpoints and methods associated with the Planner API.
Learn more about the planner and proposals with our Help Center articles.
Authentication
Use the following header parameters for all requests:
Headers | |
---|---|
Authentication string required | Authentication bearer token See Authentication Guide |
X-IAA-OW-ID integer required | Organization Worskpace ID Header |
Proposal Details
Get Proposal Details by ID
GET /api/v3/plan/proposal/{proposalId}Get proposal details by ID.
Path Parameters | |
---|---|
proposalId integer | Proposal ID |
- JSON
- TypeScript
{
"success": true,
"data":
{
"id": 14,
"name": "sample",
"startTime": 1730658720000,
"endTime": 1733250720000,
"status": 2,
"politicalAdvertiserId": 0,
"marginValue": null,
"owId": 202500,
"proposalTargeting":
{
"location":
{
"country": 1,
"states":
[
1,
2,
3
],
"dma":
[
1,
2,
3
],
"city":
[
1,
2,
3
],
"county":
[
1,
2,
3
],
"congressionalDistricts":
[
1,
2,
3
],
"stateHouse":
[
1,
2,
3
],
"stateSenate":
[
1,
2,
3
],
"zipCodes": null,
"locationAdvanceTargeted":
[
"city",
"state"
],
"advanceTargeted": false
},
"audience":
{
"audienceSegmentIds":
[
6387630,
6387631,
6387632,
6387633,
6387634
],
"advanceTargeted": false
},
"creative":
{
"creativeTypeIds":
[
13
],
"tvAutoBuying": false
},
"inventory":
{
"openExchangeInventory":
{
"iabCategories":
[
1,
2
],
"exchanges":
[
11,
16,
19
]
},
"inventoryGroupIds":
[],
"advanceTargeted": false
},
"device":
{
"deviceTypesTargetedIds":
[],
"channelTypesTargetedIds":
[],
"deviceTypesAdvanceTargetedIds":
[
1,
2
],
"advanceTargeted": false
}
}
}
}
{
"success": "true",
"data":
{
"id": 14,
"name": "sample",
"startTime": 1730658720000,
"endTime": 1733250720000,
"status": 3,
"targetedReach": 2147483646,
"targetedImpressions": 2147483646,
"maxTargetedReach": 2147483646,
"maxTargetedImpressions": 2147483646,
"budget": 0.0,
"maxBudget": 0.0,
"owId": 202500,
"proposedCampaigns":
[
{
"id": 1234,
"name": "Demo_Campaign_For_proposal",
"startTime": 1730658720000,
"endTime": 1733250720000,
"strategy": "strategy",
"creativeTypeId": 1,
"duration": 30,
"modelType": "cpm",
"targetedReach": 1234,
"maxTargetedReach": 12345566,
"frequencyCap": 3,
"targetedImpressions": 123,
"maxTargetedImpressions": 12345,
"cpm": 5.0,
"minCpm": 3.5,
"maxCpm": 1000.0,
"budget": 1000.0,
"maxBudget": 1000.0
}
]
}
}
{
"success": false,
"errorObjects": [
{
"error": "Requested Resource is not accessible for the user"
}
]
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
name: string;
startTime: number;
endTime: number;
status: number;
politicalAdvertiserId: number;
marginValue: number;
owId: number;
proposalTargeting: {
location: {
country: number;
states: number[];
dma: number[];
city: number[];
county: number[];
congressionalDistricts: number[];
stateHouse: number[];
stateSenate: number[];
zipCodes: string;
locationAdvanceTargeted: string[];
advanceTargeted: boolean;
};
audience: {
audienceSegmentIds: number[];
advanceTargeted: boolean;
};
creative: {
creativeTypeIds: number[];
tvAutoBuying: boolean;
};
inventory: {
openExchangeInventory: {
iabCategories: number[];
exchanges: number[];
};
inventoryGroupIds: number[];
advanceTargeted: boolean;
};
device: {
deviceTypesTargetedIds: number[];
channelTypesTargetedIds: number[];
deviceTypesAdvanceTargetedIds: number[];
advanceTargeted: boolean;
}
}
};
};
};
};
}
function getProposalDetailsById(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/plan/proposal/{proposalId}',
params: {
path: {
proposalId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
name: string;
startTime: number;
endTime: number;
status: number;
targetedReach: number;
targetedImpresions: number;
maxTargetedReach: number;
maxTargetedImpressions: number;
budget: number;
maxBudget: number;
owId: number;
proposedCampaigns: {
id: number;
name: string;
startTime: number;
endTime: number;
strategy: string;
creativeTypeId: number;
duration: number;
modelType: string;
targetedReach: number;
maxTargetedReach: number;
frequencyCap: number;
targetedImpressions: number;
maxTargetedImpressions: number;
cpm: number;
minCpm: number;
maxCpm: number;
budget: number;
maxBudget: number;
}[];
};
};
};
};
}
function getProposalDetailsById(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/plan/proposal/{proposalId}',
params: {
path: {
proposalId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Proposals
GET /api/v3/plan/proposals- JSON
- TypeScript
{
"success": true,
"data": {
"proposalDetailList": [
{
"id": 6,
"name": "planner-proposal-2",
"statusId": 2,
"createdOn": 1234567,
"userAvatarUrl": "https://sample-c92d6b6cbde1.s3.com/avatar/sample.png",
"reach": 4567,
"impression": 345678,
"ioId": null,
"budget": 23423,
"startDate": 1728890609000,
"endDate": 1728990609000,
"createdBy": "user1"
},
{
"id": 7,
"name": "planner-proposal-3",
"statusId": 1,
"createdOn": 1234567,
"userAvatarUrl": "https://sample-c92d6b6cbde1.s3.com/avatar/sample.png",
"reach": 4567,
"impression": 345678,
"ioId": 1,
"budget": 23423,
"startDate": 1728890609000,
"endDate": 1728990609000,
"createdBy": "user2"
}
],
"totalRecords": 7,
"filteredRecords": 7,
"recordsTotal": {
"totalBudget": 23,
"totalImpressions": 3865464
}
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
proposalDetailList: {
id: number;
name: string;
statusId: number;
createdOn: number;
userAvaturUrl: string;
reach: number;
impressions: number;
ioId: number;
budget: number;
startDate: number;
endDate: number;
createdBy: string;
}[];
totalRecords: number;
filteredRecords: number;
recordsTotal: {
totalBudget: number;
totalImpressions: number;
}
};
};
};
};
}
function proposalDetailList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/plan/proposals',
params: {
query: {
searchField?: `string`,
noOfEntries?: `number`,
pageNo?: `number`,
sortBy?: `string`,
statusIds?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Proposal Reach and Impressions Summary
POST /api/v3/plan//proposal-summary/reach-impressionsGet summary of maximum reach and impressions for different targeting parameters in a proposal based on statistics and historical serving data.
Request Schema | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
location object | Location data | |||||||||||||||||||
|
country array of integers | Country ID |
states array of integers | States ID |
dma array of integers | DMA ID |
city array of integers | City ID |
county array of integers | County ID |
congressionalDistricts array of integers | Congressional district ID |
stateHouse array of integers | State house ID |
stateSenate array of integers | State senate ID |
zipCodes string | Comma separated Zip Code IDs |
audience
object
audience
object properties
audienceSegmentIds array of integers | Audience segment ID |
creative
object
creative
object properties
creativeTypeIds array of integers | Creative type ID |
inventory
object
inventory
object properties
openExchangeInventory object | Open exchange Inventory data | ||||
|
iabCategories array of integers | IAB category ID |
exchanges array of integers | Exchange ID |
inventoryGroupIds
array of integers
device
object
device
object properties
deviceTypesTargetedIds array of integers | Targeted Device Type IDs |
channelTypesTargetedIds array of integers | Targeted Channel Type IDs |
- JSON
- TypeScript
{
"location": {
"country": 30100001,
"states": [
30200001,
30200002,
30200003
],
"dma": [
30900001,
30900002
],
"city": [
30400001,
30400002,
30400003
],
"county": [
30300001,
30300002,
30300003
],
"congressionalDistricts": [
30600001
],
"stateHouse": [
30800001,
30800002
],
"stateSenate": [
30700001,
30700002,
30700003
],
"zipCodes": "167820,78656"
},
"audience": {
"audienceSegmentIds": [
6387630,
6387631,
6387632,
6387633,
6387634
]
},
"creative": {
"creativeTypeIds": [
11,
13,
14
]
},
"inventory": {
"openExchangeInventory": {
"iabCategories": [
1,
2
],
"exchanges": [
11,
16,
19,
1
]
},
"inventoryGroupIds": [
134523,
134522,
134436
]
},
"device": {
"deviceTypesTargetedIds": [
20300001,
20300002,
20300002,
20300004
],
"channelTypesTargetedIds": [
11,
12
]
}
}
{
"success": true,
"data": {
"impressions": 105409776517,
"reach": 210368111
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
impressions: number;
reach: number;
};
};
};
};
}
function getReachAndImpressions(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal-summary/reach-impressions',
requestBody: {
content: {
"application/json": {
proposalId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Proposal Device Type Summary
POST /api/v3/plan/proposal-summary/device-typeGet summary of impressions distribution for different device types targeted in proposal.
Request Schema | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
location object | Location data | |||||||||||||||||||
|
country array of integers | Country ID |
states array of integers | States ID |
dma array of integers | DMA ID |
city array of integers | City ID |
county array of integers | County ID |
congressionalDistricts array of integers | Congressional district ID |
stateHouse array of integers | State house ID |
stateSenate array of integers | State senate ID |
zipCodes string | Comma separated Zip Code IDs |
audience
object
audience
object properties
audienceSegmentIds array of integers | Audience segment ID |
creative
object
creative
object properties
creativeTypeIds array of integers | Creative type ID |
inventory
object
inventory
object properties
openExchangeInventory object | Open exchange Inventory data | ||||
|
iabCategories array of integers | IAB category ID |
exchanges array of integers | Exchange ID |
inventoryGroupIds
array of integers
device
object
device
object properties
deviceTypesTargetedIds array of integers | Targeted Device Type IDs |
channelTypesTargetedIds array of integers | Targeted Channel Type IDs |
- JSON
- TypeScript
{
"location": {
"country": 30100001,
"states": [
30200001,
30200002,
30200003
],
"dma": [
30900001,
30900002
],
"city": [
30400001,
30400002,
30400003
],
"county": [
30300001,
30300002,
30300003
],
"congressionalDistricts": [
30600001
],
"stateHouse": [
30800001,
30800002
],
"stateSenate": [
30700001,
30700002,
30700003
],
"zipCodes": "167820,78656"
},
"audience": {
"audienceSegmentIds": [
6387630,
6387631,
6387632,
6387633,
6387634
]
},
"creative": {
"creativeTypeIds": [
11,
13,
14
]
},
"inventory": {
"openExchangeInventory": {
"iabCategories": [
1,
2
],
"exchanges": [
11,
16,
19,
1
]
},
"inventoryGroupIds": [
134523,
134522,
134436
]
},
"device": {
"deviceTypesTargetedIds": [
20300001,
20300002,
20300002,
20300004
],
"channelTypesTargetedIds": [
11,
12
]
}
}
{
"success": true,
"data": {
"deviceTypes": [
{
"device": "Mobile",
"percentage": 38.86,
"impressions": 21402990540
},
{
"device": "Desktop",
"percentage": 11.63,
"impressions": 6399597393
},
{
"device": "CTV",
"percentage": 47.89,
"impressions": 26376959052
},
{
"device": "Tablet",
"percentage": 1.63,
"impressions": 898221564
}
]
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
deviceTypes: {
device: string;
percentage: number;
impressions: number;
}[];
};
};
};
};
}
function getDeviceTypeData(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal-summary/device-type',
requestBody: {
content: {
"application/json": {
proposalId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Proposal Channel Type Summary
POST /api/v3/plan/proposal-summary/channel-typeGet summary of impressions distribution for different channel types targeted in proposal.
Request Schema | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
location object | Location data | |||||||||||||||||||
|
country array of integers | Country ID |
states array of integers | States ID |
dma array of integers | DMA ID |
city array of integers | City ID |
county array of integers | County ID |
congressionalDistricts array of integers | Congressional district ID |
stateHouse array of integers | State house ID |
stateSenate array of integers | State senate ID |
zipCodes string | Comma separated Zip Code IDs |
audience
object
audience
object properties
audienceSegmentIds array of integers | Audience segment ID |
creative
object
creative
object properties
creativeTypeIds array of integers | Creative type ID |
inventory
object
inventory
object properties
openExchangeInventory object | Open exchange Inventory data | ||||
|
iabCategories array of integers | IAB category ID |
exchanges array of integers | Exchange ID |
inventoryGroupIds
array of integers
device
object
device
object properties
deviceTypesTargetedIds array of integers | Targeted Device Type IDs |
channelTypesTargetedIds array of integers | Targeted Channel Type IDs |
- JSON
- TypeScript
{
"location": {
"country": 30100001,
"states": [
30200001,
30200002,
30200003
],
"dma": [
30900001,
30900002
],
"city": [
30400001,
30400002,
30400003
],
"county": [
30300001,
30300002,
30300003
],
"congressionalDistricts": [
30600001
],
"stateHouse": [
30800001,
30800002
],
"stateSenate": [
30700001,
30700002,
30700003
],
"zipCodes": "167820,78656"
},
"audience": {
"audienceSegmentIds": [
6387630,
6387631,
6387632,
6387633,
6387634
]
},
"creative": {
"creativeTypeIds": [
11,
13,
14
]
},
"inventory": {
"openExchangeInventory": {
"iabCategories": [
1,
2
],
"exchanges": [
11,
16,
19,
1
]
},
"inventoryGroupIds": [
134523,
134522,
134436
]
},
"device": {
"deviceTypesTargetedIds": [
20300001,
20300002,
20300002,
20300004
],
"channelTypesTargetedIds": [
11,
12
]
}
}
{
"success": true,
"data": {
"channelTypes": [
{
"channel": "App",
"percentage": 22.36,
"impressions": 12314443086
},
{
"channel": "Web",
"percentage": 29.65,
"impressions": 16326324495
},
{
"channel": "CTV",
"percentage": 47.89,
"impressions": 26376959052
},
{
"channel": "OTT",
"percentage": 0.11,
"impressions": 60041916
}
]
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
channelTypes: {
channel: string;
percentage: number;
impressions: number;
}[];
};
};
};
};
}
function getChannelTypeData(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal-summary/channel-type',
requestBody: {
content: {
"application/json": {
proposalId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Proposal Bid Landscape Summary
POST /api/v3/plan/proposal-summary/bid-landscapeGet summary of impressions distribution for different bid landscapes targeted in proposal.
Request Schema | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
location object | Location data | |||||||||||||||||||
|
country array of integers | Country ID |
states array of integers | States ID |
dma array of integers | DMA ID |
city array of integers | City ID |
county array of integers | County ID |
congressionalDistricts array of integers | Congressional district ID |
stateHouse array of integers | State house ID |
stateSenate array of integers | State senate ID |
zipCodes string | Comma separated Zip Code IDs |
audience
object
audience
object properties
audienceSegmentIds array of integers | Audience segment ID |
creative
object
creative
object properties
creativeTypeIds array of integers | Creative type ID |
inventory
object
inventory
object properties
openExchangeInventory object | Open exchange Inventory data | ||||
|
iabCategories array of integers | IAB category ID |
exchanges array of integers | Exchange ID |
inventoryGroupIds
array of integers
device
object
device
object properties
deviceTypesTargetedIds array of integers | Targeted Device Type IDs |
channelTypesTargetedIds array of integers | Targeted Channel Type IDs |
- JSON
- TypeScript
{
"location": {
"country": 30100001,
"states": [
30200001,
30200002,
30200003
],
"dma": [
30900001,
30900002
],
"city": [
30400001,
30400002,
30400003
],
"county": [
30300001,
30300002,
30300003
],
"congressionalDistricts": [
30600001
],
"stateHouse": [
30800001,
30800002
],
"stateSenate": [
30700001,
30700002,
30700003
],
"zipCodes": "167820,78656"
},
"audience": {
"audienceSegmentIds": [
6387630,
6387631,
6387632,
6387633,
6387634
]
},
"creative": {
"creativeTypeIds": [
11,
13,
14
]
},
"inventory": {
"openExchangeInventory": {
"iabCategories": [
1,
2
],
"exchanges": [
11,
16,
19,
1
]
},
"inventoryGroupIds": [
134523,
134522,
134436
]
},
"device": {
"deviceTypesTargetedIds": [
20300001,
20300002,
20300002,
20300004
],
"channelTypesTargetedIds": [
11,
12
]
}
}
{
"success": true,
"data": {
"HTML": [
{
"percentile": 0,
"cpm": 0,
"impressions": 0
},
{
"percentile": 10,
"cpm": 0.001,
"impressions": 2719219
},
{
"percentile": 20,
"cpm": 0.01,
"impressions": 27192810
},
{
"percentile": 100,
"cpm": 3.0072,
"impressions": 271029139123
}
],
"Video": [
{
"percentile": 0,
"cpm": 0,
"impressions": 0
},
{
"percentile": 10,
"cpm": 0.003,
"impressions": 2719219
},
{
"percentile": 20,
"cpm": 0.05,
"impressions": 27192810
},
{
"percentile": 100,
"cpm": 10.372,
"impressions": 271029139123
}
]
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
HTML: {
percentile: number;
cpm: number;
impressions: number;
}[];
Video: {
percentile: number;
cpm: number;
impressions: number;
}
};
};
};
};
}
function getBidLandscapeData(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal-summary/bid-landscape',
requestBody: {
content: {
"application/json": {
proposalId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Download Proposal
GET /api/v3/plan/proposal/{proposalId}/downloadGet download URL for proposals with statuses: ready, failed, converted, or expired.
Query Parameters | |
---|---|
fileType string | Type of file to download Excel: 1 CSV: 2 |
proposalId string | Proposal ID |
- JSON
- TypeScript
{
"success": true,
"data": {
"proposalReportUrl": "https://example.s3.amazonaws.com/planner/proposal/report/34567890iuhgvbhjio987654456789oijhbvbjio9876"
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
proposalReportUrl: string;
};
};
};
};
}
function generateS3LinkForDownloadProposal(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/plan/proposal/{proposalId}/download',
params: {
path: {
proposalId: `number`
},
query: {
fileType: `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Proposal Management
Create Proposal
POST /api/v3/plan/proposal/addRequest Schema | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id string | Proposal ID | |||||||||||||||||||||||
name string | Proposal name | |||||||||||||||||||||||
startTime integer | Unix epoch timestamp (in milliseconds) of start time | |||||||||||||||||||||||
endTime integer | Unix epoch timestamp (in milliseconds) of end time | |||||||||||||||||||||||
advertiserId integer | Advertiser ID | |||||||||||||||||||||||
margin integer | Margin | |||||||||||||||||||||||
location object | Location data | |||||||||||||||||||||||
|
country array of integers | Country ID |
states array of integers | States ID |
dma array of integers | DMA ID |
city array of integers | City ID |
county array of integers | County ID |
congressionalDistricts array of integers | Congressional district ID |
stateHouse array of integers | State house ID |
stateSenate array of integers | State senate ID |
zipCodes string | Comma separated Zip Code IDs |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
locationAdvanceTargeted array of integers | When true, indicates that a new Campaign must be created for advanced location targeting |
audience
object
audience
object properties
audienceSegmentIds array of integers | Audience segment ID |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
creative
object
creative
object properties
creativeTypeIds array of integers | Creative type ID |
isTvAutoBuying boolean | If true, indicates video Creative is eligible for TV Advertising |
inventory
object
inventory
object properties
openExchangeInventory object | Open exchange Inventory data | ||||
|
iabCategories array of integers | IAB category ID |
exchanges array of integers | Exchange ID |
inventoryGroupIds
array of integers
isAdvanceTargeted
boolean
device
object
device
object properties
deviceTypesTargetedIds array of integers | Targeted Device Type IDs |
channelTypesTargetedIds array of integers | Targeted Channel Type IDs |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
deviceTypesAdvanceTargetedIds array of integers | When true, indicates that a new Campaign must be created for advanced device targeting |
- JSON
- TypeScript
{
"id": "11",
"name": "sample_planner",
"startTime": 1730658720000,
"endTime": 1733250720000,
"advertiserId": 644,
"margin": 10,
"location": {
"country": 30100001,
"states": [
30200001,
30200002,
30200003
],
"dma": [
30900001,
30900002
],
"city": [
30400001,
30400002,
30400003
],
"county": [
30300001,
30300002,
30300003
],
"congressionalDistricts": [
30600001
],
"stateHouse": [
30800001,
30800002
],
"stateSenate": [
30700001,
30700002,
30700003
],
"zipCodes": "167820,78656",
"isAdvanceTargeted": true,
"locationAdvanceTargeted": [
302,
304,
309
]
},
"audience": {
"audienceSegmentIds": [
6387630,
6387631,
6387632,
6387633,
6387634
],
"isAdvanceTargeted": true
},
"creative": {
"creativeTypeIds": [
11,
13,
14
],
"isTvAutoBuying": true
},
"inventory": {
"openExchangeInventory": {
"iabCategories": [
1,
2
],
"exchanges": [
11,
16,
19,
1
]
},
"inventoryGroupIds": [
134523,
134522,
134436
],
"isAdvanceTargeted": true
},
"device": {
"deviceTypesTargetedIds": [
20300001,
20300002,
20300002,
20300004
],
"channelTypesTargetedIds": [],
"isAdvanceTargeted": true,
"deviceTypesAdvanceTargetedIds": [
20300002,
20300004
]
}
}
{
"success": true,
"data": {
"id": 11,
"message": "sample_planner generated successfully"
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
};
};
};
};
}
function createProposal(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal/add',
requestBody: {
content: {
"application/json": {
name?: `string`,
startTime?: `number`,
endTime?: `number`,
politicalAdvertiserId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
margin?: `number`,
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
id?: `number`,
reach?: `number`,
maxReach?: `number`,
impressions?: `number`,
maxImpressions?: `number`,
frequencyCap?: `number`,
budget?: `number`,
maxBudget?: `number`,
isPoliticalAdvertiser?: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create Draft Proposal
POST /api/v3/plan/proposal/draftRequest Schema | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id string | Proposal ID | |||||||||||||||||||||||
name string | Proposal name | |||||||||||||||||||||||
startTime integer | Unix epoch timestamp (in milliseconds) of start time | |||||||||||||||||||||||
endTime integer | Unix epoch timestamp (in milliseconds) of end time | |||||||||||||||||||||||
advertiserId integer | Advertiser ID | |||||||||||||||||||||||
margin integer | Margin | |||||||||||||||||||||||
location object | Location data | |||||||||||||||||||||||
|
country array of integers | Country ID |
states array of integers | States ID |
dma array of integers | DMA ID |
city array of integers | City ID |
county array of integers | County ID |
congressionalDistricts array of integers | Congressional district ID |
stateHouse array of integers | State house ID |
stateSenate array of integers | State senate ID |
zipCodes string | Comma separated Zip Code IDs |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
locationAdvanceTargeted array of integers | When true, indicates that a new Campaign must be created for advanced location targeting |
audience
object
audience
object properties
audienceSegmentIds array of integers | Audience segment ID |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
creative
object
creative
object properties
creativeTypeIds array of integers | Creative type ID |
isTvAutoBuying boolean | If true, indicates video Creative is eligible for TV Advertising |
inventory
object
inventory
object properties
openExchangeInventory object | Open exchange Inventory data | ||||
|
iabCategories array of integers | IAB category ID |
exchanges array of integers | Exchange ID |
inventoryGroupIds
array of integers
isAdvanceTargeted
boolean
device
object
device
object properties
deviceTypesTargetedIds array of integers | Device types targeted ID |
channelTypesTargetedIds array of integers | Channel types targeted ID |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
deviceTypesAdvanceTargetedIds array of integers | When true, indicates that a new Campaign must be created for advanced device targeting |
- JSON
- TypeScript
{
"id": "11",
"name": "sample_planner",
"startTime": 1730658720000,
"endTime": 1733250720000,
"advertiserId": 644,
"margin": 10,
"location": {
"country": 30100001,
"states": [
30200001,
30200002,
30200003
],
"dma": [
30900001,
30900002
],
"city": [
30400001,
30400002,
30400003
],
"county": [
30300001,
30300002,
30300003
],
"congressionalDistricts": [
30600001
],
"stateHouse": [
30800001,
30800002
],
"stateSenate": [
30700001,
30700002,
30700003
],
"zipCodes": "167820,78656",
"isAdvanceTargeted": true,
"locationAdvanceTargeted": [
302,
304,
309
]
},
"audience": {
"audienceSegmentIds": [
6387630,
6387631,
6387632,
6387633,
6387634
],
"isAdvanceTargeted": true
},
"creative": {
"creativeTypeIds": [
11,
13,
14
],
"isTvAutoBuying": true
},
"inventory": {
"openExchangeInventory": {
"iabCategories": [
1,
2
],
"exchanges": [
11,
16,
19,
1
]
},
"inventoryGroupIds": [
134523,
134522,
134436
],
"isAdvanceTargeted": true
},
"device": {
"deviceTypesTargetedIds": [
20300001,
20300002,
20300002,
20300004
],
"channelTypesTargetedIds": [],
"isAdvanceTargeted": true,
"deviceTypesAdvanceTargetedIds": [
20300002,
20300004
]
}
}
{
"success": true,
"data": {
"id": 11,
"message": "sample_planner generated successfully"
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
};
};
};
};
}
function addDraftProposal(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal/draft',
requestBody: {
content: {
"application/json": {
name?: `string`,
startTime?: `number`,
endTime?: `number`,
politicalAdvertiserId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
margin?: `number`,
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
isPoliticalAdvertiser?: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Proposal
PATCH /api/v3/plan/proposal/{proposalId}Update proposal details.
Path Parameters | |
---|---|
proposalId integer | Proposal ID |
Request Schema | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
proposalName string | Proposal name | |||||||||||||||||||
proposalStartTime integer | Unix epoch timestamp (in milliseconds) of start time | |||||||||||||||||||
proposalEndTime integer | Unix epoch timestamp (in milliseconds) of end time | |||||||||||||||||||
politicalAdvertiserId integer | Political advertiser ID | |||||||||||||||||||
proposalStatusId integer | Proposal status ID | |||||||||||||||||||
proposalReach integer | Proposal reach | |||||||||||||||||||
proposalMaxReach integer | Proposal max reach | |||||||||||||||||||
proposalImpressions integer | Proposal impressions | |||||||||||||||||||
proposalMaxImpressions integer | Location | |||||||||||||||||||
proposalBudget integer | Proposal budget | |||||||||||||||||||
proposalMaxBudget integer | Location | |||||||||||||||||||
campaigns object | Campaign data | |||||||||||||||||||
|
id integer | Campaign ID |
name string | Campaign name |
startTime integer | Unix epoch timestamp (in milliseconds) of start time |
endTime integer | Unix epoch timestamp (in milliseconds) of end time |
reach integer | Reach |
frequencyCap integer | Frequency cap |
impressions integer | Impressions |
cpm integer | CPM |
budget integer | Campaign budget |
deletedCampaignIds
array of integers
- JSON
- TypeScript
{
"proposalName": "proposalName",
"proposalStartTime": 1729449000000,
"proposalEndTime": 1730313000000,
"politicalAdvertiserId": 644,
"proposalStatusId": 6,
"proposalReach": 150000,
"proposalMaxReach": 150000,
"proposalImpressions": 112500000,
"proposalMaxImpressions": 112500000,
"proposalBudget": 1125000,
"proposalMaxBudget": 1125000,
"campaigns": [
{
"id": 1,
"name": "Proposal",
"startTime": 1729449000000,
"endTime": 1730313000000,
"reach": 150000,
"frequencyCap": 3,
"impressions": 4500000,
"cpm": 1,
"budget": 4500
}
],
"deletedCampaignIds": [
3,
4
]
}
{
"success": true,
"data": {
"message": "Proposal updated successfully"
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
message: string;
};
};
};
};
}
function editReadyProposal(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/plan/proposal/{proposalId}',
params: {
path: {
proposalId: `number`
}
},
requestBody: {
content: {
"application/json": {
proposalId?: `number`,
proposalName?: `string`,
proposalStartTime?: `number`,
proposalEndTime?: `number`,
proposalStatusId?: `number`,
proposalReach?: `number`,
proposalMaxReach?: `number`,
proposalImpressions?: `number`,
proposalMaxImpressions?: `number`,
politicalAdvertiserId?: `number`,
proposalBudget?: `number`,
proposalMaxBudget?: `number`,
proposalOwId?: `number`,
campaigns?: {
id?: `number`,
name?: `string`,
startTime?: `number`,
endTime?: `number`,
durationInDays?: `number`,
reach?: `number`,
maxReach?: `number`,
impressions?: `number`,
maxImpressions?: `number`,
cpm?: `number`,
minCpm?: `number`,
frequencyCap?: `number`,
budget?: `number`,
maxBudget?: `number`,
proposalId?: `number`,
campaignId?: `number`,
timeZoneId?: `number`,
owId?: `number`,
strategy?: `string`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`;
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
locationStrategy?: `string`,
audienceStrategy?: `string`,
inventoryStrategy?: `string`,
deviceStrategy?: `string`,
deleted?: `boolean`,
}[],
deletedCampaignIds?: `array of numbers`,
proposalMargin?: `number`,
ioId?: `number`,
proposalCreatedByUowId?: `number`,
isPoliticalAdvertiser?: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Draft Proposal
PATCH /api/v3/plan/proposal/draft/{proposalId}Update draft proposal details.
Path Parameters | |
---|---|
proposalId integer | Proposal ID |
Request Schema | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id string | Proposal ID | |||||||||||||||||||||||
name string | Proposal name | |||||||||||||||||||||||
startTime integer | Unix epoch timestamp (in milliseconds) of start time | |||||||||||||||||||||||
endTime integer | Unix epoch timestamp (in milliseconds) of end time | |||||||||||||||||||||||
advertiserId integer | Advertiser ID | |||||||||||||||||||||||
margin integer | Margin | |||||||||||||||||||||||
location object | Location data | |||||||||||||||||||||||
|
country array of integers | Country ID |
states array of integers | States ID |
dma array of integers | DMA ID |
city array of integers | City ID |
county array of integers | County ID |
congressionalDistricts array of integers | Congressional district ID |
stateHouse array of integers | State house ID |
stateSenate array of integers | State senate ID |
zipCodes string | Comma separated Zip Code IDs |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
locationAdvanceTargeted array of integers | When true, indicates that a new Campaign must be created for advanced location targeting |
audience
object
audience
object properties
audienceSegmentIds array of integers | Audience segment ID |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
creative
object
creative
object properties
creativeTypeIds array of integers | Creative type ID |
isTvAutoBuying boolean | If true, indicates video Creative is eligible for TV Advertising |
inventory
object
inventory
object properties
openExchangeInventory object | Open exchange Inventory data | ||||
|
iabCategories array of integers | IAB category ID |
exchanges array of integers | Exchange ID |
inventoryGroupIds
array of integers
isAdvanceTargeted
boolean
device
object
device
object properties
deviceTypesTargetedIds array of integers | Device types targeted ID |
channelTypesTargetedIds array of integers | Channel types targeted ID |
isAdvanceTargeted boolean | When true, indicates that a new Campaign must be created for advanced audience and Inventory targeting |
deviceTypesAdvanceTargetedIds array of integers | When true, indicates that a new Campaign must be created for advanced device targeting |
- JSON
- TypeScript
{
"name": "sample_planner",
"startTime": 1730658720000,
"endTime": 1733250720000,
"advertiserId": 644,
"margin": 10,
"location": {
"country": 30100001,
"states": [
30200001,
30200002,
30200003
],
"dma": [
30900001,
30900002
],
"city": [
30400001,
30400002,
30400003
],
"county": [
30300001,
30300002,
30300003
],
"congressionalDistricts": [
30600001
],
"stateHouse": [
30800001,
30800002
],
"stateSenate": [
30700001,
30700002,
30700003
],
"zipCodes": "167820,78656",
"isAdvanceTargeted": true,
"locationAdvanceTargeted": [
302,
304,
309
]
},
"audience": {
"audienceSegmentIds": [
6387630,
6387631,
6387632,
6387633,
6387634
],
"isAdvanceTargeted": true
},
"creative": {
"creativeTypeIds": [
11,
13,
14
],
"isTvAutoBuying": true
},
"inventory": {
"openExchangeInventory": {
"iabCategories": [
1,
2
],
"exchanges": [
11,
16,
19,
1
]
},
"inventoryGroupIds": [
134523,
134522,
134436
],
"isAdvanceTargeted": true
},
"device": {
"deviceTypesTargetedIds": [
20300001,
20300002,
20300002,
20300004
],
"channelTypesTargetedIds": [],
"isAdvanceTargeted": true,
"deviceTypesAdvanceTargetedIds": [
20300002,
20300004
]
}
}
{
"success": true,
"data": {
"id": 11,
"message": "sample_planner updated successfully"
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
};
};
};
};
}
function updateDraftProposal(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/plan/proposal/draft/{proposalId}',
params: {
path: {
proposalId: `number`
}
},
requestBody: {
content: {
"application/json": {
name?: `string`,
startTime?: `number`,
endTime?: `number`,
politicalAdvertiserId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
margin?: `number`,
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
isPoliticalAdvertiser?: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
};
};
};
};
}
function updateDraftProposal(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/plan/proposal/draft/{proposalId}',
params: {
path: {
proposalId: `number`
}
},
requestBody: {
content: {
"application/json": {
name?: `string`,
startTime?: `number`,
endTime?: `number`,
politicalAdvertiserId?: `number`,
location?: {
country: `number`,
states?: `array of numbers`,
dma?: `array of numbers`,
city?: `array of numbers`,
county?: `array of numbers`,
congressionalDistricts?: `array of numbers`,
stateHouse?: `array of numbers`,
stateSenate?: `array of numbers`,
zipCodes?: `string`,
isAdvanceTargeted?: `boolean`,
locationAdvanceTargeted?: `array of numbers`,
},
margin?: `number`,
audience?: {
audienceSegmentIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
creative?: {
creativeTypeIds?: `array of numbers`,
isTvAutoBuying?: `boolean`,
},
inventory?: {
openExchangeInventory?: {
iabCategories?: `array of numbers`,
exchanges?: `array of numbers`,
},
inventoryGroupIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
device?: {
deviceTypesTargetedIds?: `array of numbers`,
channelTypesTargetedIds?: `array of numbers`,
deviceTypesAdvanceTargetedIds?: `array of numbers`,
isAdvanceTargeted?: `boolean`,
},
isPoliticalAdvertiser?: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Generate Campaigns for Ready Proposal
POST /api/v3/plan/proposal/{proposalId}/campaignsValidate the proposal details and update its status to in-progress. An Insertion Order and Campaign will then be generated.
Path Parameters | |
---|---|
proposalId integer | Proposal ID |
- JSON
- TypeScript
{
"success": true,
"data": {
"message": "Campaign generation is in progress"
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
message: string;
};
};
};
};
}
function generateIOCampaigns(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal/{proposalId}/campaigns',
params: {
path: {
proposalId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Restore Proposal
PATCH /api/v3/plan/proposals/restoreUpdate the start time and end time of a proposal. If a proposal was expired, its status will change to ready with the updated parameters.
Request Schema | |
---|---|
proposalIds array of integers | Proposal IDs |
startTime integer | Unix epoch timestamp (in milliseconds) of start time |
endTime integer | Unix epoch timestamp (in milliseconds) of end time |
- JSON
- TypeScript
{
"proposalIds": [
2,
3
],
"startTime": 1212121212,
"endTime": 1512121212
}
{
"success": true,
"data": {
"message": "Proposal restored successfully"
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
message: string;
};
};
};
};
}
function restoreReadyProposal(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/plan/proposals/restore',
requestBody: {
content: {
"application/json": {
proposalIds: `array of numbers`,
startTime: `number`,
endTime: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Duplicate Proposal
POST /api/v3/plan/proposal/{proposalId}/duplicateDuplicate an existing proposal.
Path Parameters | |
---|---|
proposalId integer | Proposal ID |
- JSON
- TypeScript
{
"proposalName": "Copy of proposal 3",
"startTime": 1732023982000,
"endTime": 1732053982000
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
proposalName: string;
startTime: number;
endTime: number;
};
};
};
}
function createDuplicateProposal(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/plan/proposal/{proposalId}/duplicate',
params: {
path: {
proposalId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Delete Proposal
DELETE /api/v3/plan/proposalDelete an existing proposal.
Query Parameters | |
---|---|
proposalIds string | Comma separated proposal IDs |
- JSON
- TypeScript
{
"success": true,
"data": {
"message": "sampleProposal deleted successfully."
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
message: string
}
};
};
};
}
function softDeleteProposal(): Promise<Responses> {
const options = {
method: 'DELETE',
url: 'https://app.iqm.com/api/v3/plan/proposal',
params: {
query: {
proposalIds: `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
More Details
Proposal Status List
GET /api/v3/plan/static/proposal/statusGet list of proposal status IDs.
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 6,
"filteredRecords": 6,
"proposalStatusList": [
{
"name": "draft",
"id": 2,
"label": "Draft",
"order": 1
},
{
"name": "ready",
"id": 6,
"label": "Ready",
"order": 2
},
{
"name": "expired",
"id": 3,
"label": "Expired",
"order": 3
},
{
"name": "processing",
"id": 5,
"label": "Processing",
"order": 4
},
{
"name": "converted",
"id": 1,
"label": "Converted",
"order": 5
},
{
"name": "failed",
"id": 4,
"label": "Failed",
"order": 6
}
]
}
}
See prerequisites
for TypeScript 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;
proposalStatusList: {
name: string;
id: number;
label: string;
order: number;
}[];
}
};
};
};
}
function ProposalStatusList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/plan/static/proposal/status',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Proposal Summary Parameters List
GET /api/v3/plan/proposal-summary/supported-paramsGet list of supported parameters for proposal summaries.
- JSON
- TypeScript
{
"success": true,
"data": {
"bidLandscape": {
"location": {
"countryIds": true,
"cityIds": true,
"countyIds": true,
"senateDistrictIds": true,
"houseDistrictIds": true,
"congressionalDistrictIds": true,
"dmaIds": true,
"zipCodes": true
},
"deviceTypes": true,
"creativeTypes": true,
"channelTypes": true,
"segmentIds": true,
"inventory": false
},
"deviceGraph": {
"location": {
"countryIds": true,
"cityIds": true,
"countyIds": true,
"senateDistrictIds": true,
"houseDistrictIds": true,
"congressionalDistrictIds": true,
"dmaIds": true,
"zipCodes": true
},
"deviceTypes": true,
"creativeTypes": true,
"channelTypes": true,
"segmentIds": true,
"inventory": false
},
"channelGraph": {
"location": {
"countryIds": true,
"cityIds": true,
"countyIds": true,
"senateDistrictIds": true,
"houseDistrictIds": true,
"congressionalDistrictIds": true,
"dmaIds": true,
"zipCodes": true
},
"deviceTypes": true,
"creativeTypes": true,
"channelTypes": true,
"segmentIds": true,
"inventory": false
},
"reachImpressions": {
"location": {
"countryIds": true,
"cityIds": true,
"countyIds": true,
"senateDistrictIds": true,
"houseDistrictIds": true,
"congressionalDistrictIds": true,
"dmaIds": true,
"zipCodes": true
},
"deviceTypes": true,
"creativeTypes": true,
"channelTypes": true,
"segmentIds": true,
"inventory": false
}
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
bidLandscape: {
location: {
countryIds: boolean;
cityIds: boolean;
countyIds: boolean;
senateDistrictIds: boolean;
houseDistrictIds: boolean;
congressionalDistrictIds: boolean;
dmaIds: boolean;
zipCodes: boolean;
};
deviceTypes: boolean;
creativeTypes: boolean;
channelTypes: boolean;
segmentIds: boolean;
inventory: boolean;
};
deviceGraph: {
location: {
countryIds: boolean;
cityIds: boolean;
countyIds: boolean;
senateDistrictIds: boolean;
houseDistrictIds: boolean;
congressionalDistrictIds: boolean;
dmaIds: boolean;
zipCodes: boolean;
};
deviceTypes: boolean;
creativeTypes: boolean;
channelTypes: boolean;
segmentIds: boolean;
inventory: boolean;
};
channelGraph: {
location: {
countryIds: boolean;
cityIds: boolean;
countyIds: boolean;
senateDistrictIds: boolean;
houseDistrictIds: boolean;
congressionalDistrictIds: boolean;
dmaIds: boolean;
zipCodes: boolean;
};
deviceTypes: boolean;
creativeTypes: boolean;
channelTypes: boolean;
segmentIds: boolean;
inventory: boolean;
};
reachImpressions: {
location: {
countryIds: boolean;
cityIds: boolean;
countyIds: boolean;
senateDistrictIds: boolean;
houseDistrictIds: boolean;
congressionalDistrictIds: boolean;
dmaIds: boolean;
zipCodes: boolean;
};
deviceTypes: boolean;
creativeTypes: boolean;
channelTypes: boolean;
segmentIds: boolean;
inventory: boolean;
}
}
};
};
};
}
function getSupportedParameters(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/plan/proposal-summary/supported-params',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get User Access Details
GET /api/v3/plan/proposal/marginGet user access details of logged-in organization's parent organizations.
- JSON
- TypeScript
{
"success": true,
"data": {
"parentOrganisationAccess": true,
"adminOrganisationAccess": true,
"marginValue": 6
}
}
See prerequisites
for TypeScript usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
parentOrganisationAccess: boolean;
adminOrganisationAccess: boolean;
marginValue: number;
}
};
};
};
}
function getDefaultCustomerMargin(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/plan/proposal/margin',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}