Audience API
Overview
The Audience API allows you to create Audience Segments for political Campaigns. The following table describes some of the Audience types:
Type | Description |
---|---|
Matched Audience | Upload a CSV or XLSX file with Audience details which is then matched with IQM's user database to create a custom Audience segment. |
Geo-Farmed Audience | Define an Audience by a custom geographical area. |
Audience Segment | Group users by common characteristics to reach specific target Audiences. |
Contextual Audience | IQM adds users to an Audience when they visit sites featuring specified keywords or URLs. |
More resources:
- Selecting your Audiences Help Center Article
- Audience API Guidelines
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 |
Audience Details
Matched Audience Details
GET /api/v2/audience/matched/{id}Get Matched Audience details by ID.
Path Parameter | |
---|---|
id string | Matched Audience ID |
Response Properties
id integer | Audience ID |
audienceName string | Audience name |
existingColumnMatching string | Matched Audience file columns mapped with system fields in JSON serialized string format |
columnSettings string | Matched Audience columns settings as per the selected columns for matching in JSON serialized string format |
metadata string | Matched Audience sample data with system fields in JSON serialized string format |
status string | Audience status |
matchRate integer | The percentage of matched records compared to a reference set |
minEcpm integer | Minimum effective cost per mille |
maxEcpm integer | Maximum effective cost per mille |
s3FileName string | Audience file name |
included integer | Count of Campaigns including this Audience |
excluded integer | Count of Campaigns excluding this Audience |
createdDate integer | Unix epoch creation date, in milliseconds |
modifiedDate integer | Modified date |
organizationName string | Organization name |
userEmail string | User email |
userName string | User name |
expectedSpent7 integer | |
expectedSpent30 integer | |
expectedSpent60 integer | |
dataCost integer | Fees charged by the platform if the Audience is used in any Campaign |
fileTotalCount integer | Number of records updated in a Matched Audience file |
owId integer | Organization Workspace ID |
uowId integer | User Organization Workspace ID |
uniques integer | Count of unique Audiences reached |
verticalId integer | Vertical ID |
isApprovalAcces boolean | Indicates if user has access to approve |
isEditAccess boolean | Indicates if user has edit access for the requested resource |
isSingleColumnEnabled boolean | Flag to indicate if the mapping is single column enabled, if the voterId/phone/email/full-address is the primary column mapping then this should be true, and false otherwise. Default value: false |
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"id": 12345,
"audienceName": "Sample audience",
"existingColumnMatching": "{\"LALVOTERID\":\"Voters_ID\"}",
"columnSettings": "{\"Voters_ID\":\"LalVoterID\"}",
"metadata": "{\"voterIDColumn\":[\"LALVOTERID\"],\"columns\":[\"LALVOTERID\",\"Residence_Addresses_Zip\",\"Residence_Addresses_State\",\"Voters_FirstName\",\"Voters_LastName\"],\"fileName\":\"matched_audience fn-ln-st-zp.csv\",\"fileSize\":17915,\"rows\":0,\"columnValues\":{\"LALVOTERID\":[\"LALNY106413966\",\"LALNY111849285\",\"LALNY110212948\"],\"Residence_Addresses_Zip\":[\"11021\",\"11050\",\"11050\"],\"Residence_Addresses_State\":[\"NY\",\"NY\",\"NY\"],\"Voters_FirstName\":[\"Mei\",\"Carole\",\"Erin\"],\"Voters_LastName\":[\"Liu\",\"Visconti\",\"Orr\"]}}",
"status": "Processing",
"matchRate": 0,
"minEcpm": 0,
"maxEcpm": 0,
"s3FileName": "Test audience voter id",
"included": 0,
"excluded": 0,
"createdDate": 1683200348,
"modifiedDate": 1683200348,
"organizationName": "Sample orgranization name",
"userEmail": "sample@example.com",
"userName": "Dummy User",
"expectedSpent7": 0,
"expectedSpent30": 0,
"expectedSpent60": 0,
"dataCost": 0,
"fileTotalCount": 502,
"owId": 1000001,
"uowId": 10001,
"uniques": 0,
"verticalId": 8,
"isApprovalAccess": false,
"isEditAccess": true,
"isSingleColumnEnabled": true
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
id: number;
audienceName: string;
existingColumnMatching: string;
columnSettings: string;
metaData: string;
status: string;
matchRate: number;
minEcpm: number;
maxEcpm: number;
s3FileName: string;
included: number;
excluded: number;
createdDate: number;
modifiedDate: number;
organizationName: string;
userEmail: string;
expectedSpent7: number;
expectedSpent30: number;
expectedSpent60: number;
dataCost: number;
fileTotalCount: number;
owId: number;
uniques: number;
verticalId: number;
isApprovalAcces: boolean;
isEditAccess: boolean;
isSingleColumnEnabled: boolean
}[];
};
};
};
}
function getMatchedAudienceDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v2/audience/matched/{id}',
params: {
path: {
id: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Geo-Farmed Audience Details
GET /api/v3/audience/geo-farmed/{geo-farmed_audience_id}Get Geo-Farmed Audience Details by ID.
Path Parameter | |
---|---|
geo-farmed_audience_id string | Geo-Farmed Audience ID |
Response Properties
audienceName string | Audience name | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
frequency string | The frequency of visit to the geographical location, based on frequencyType | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
frequencyType string | Frequency Type ID | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
startDate integer | Unix epoch start date, in milliseconds | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
endDate integer | Unix epoch end date, in milliseconds | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeRange object | Name-Value pairs of day of the week (e.g. Monday: 1, Tuesday: 2, etc.) and an object containing a time range (see example below this table) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
removedLocationsIds array of integers | Removed location IDs, as specified in the uploaded location file | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locations object | Locations object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
country integer | Country ID | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included object | Included locations object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
locationIds array of integers | Location IDs | ||||||||||||||||||||||||||||||||||||
states array of integers | State IDs | ||||||||||||||||||||||||||||||||||||
counties array of integers | County IDs | ||||||||||||||||||||||||||||||||||||
cities array of integers | City IDs | ||||||||||||||||||||||||||||||||||||
stateSenates array of integers | State senate IDs | ||||||||||||||||||||||||||||||||||||
stateHouses array of integers | State house IDs | ||||||||||||||||||||||||||||||||||||
congressionalDistrictIds array of integers | Congressional District IDs | ||||||||||||||||||||||||||||||||||||
zipCodes array of integers | Zip code IDs | ||||||||||||||||||||||||||||||||||||
customAreas object | Custom areas | ||||||||||||||||||||||||||||||||||||
|
latitude integer | Latitude | |||||
longitude integer | Longitude | |||||
radius integer | Radius (miles) | |||||
address string | Addresses to add to custom area | |||||
locationId integer | Location ID | |||||
polypath object | A set of coordinates defining the boundary of the custom area | |||||
|
lat integer | Latitude |
lng integer | Longitude |
isIncluded
boolean
cid
string
sid
string
type
string
unit
string
cdId
integer
sdId
integer
hdId
integer
excluded
object
excluded
object properties
locationIds array of integers | Location IDs | ||||||||||||||||||||||||||||||||||||
states array of integers | State IDs | ||||||||||||||||||||||||||||||||||||
counties array of integers | County IDs | ||||||||||||||||||||||||||||||||||||
cities array of integers | City IDs | ||||||||||||||||||||||||||||||||||||
stateSenates array of integers | State senate IDs | ||||||||||||||||||||||||||||||||||||
stateHouses array of integers | State house IDs | ||||||||||||||||||||||||||||||||||||
congressionalDistrictIds array of integers | Congressional District IDs | ||||||||||||||||||||||||||||||||||||
zipCodes array of integers | Zip code IDs | ||||||||||||||||||||||||||||||||||||
customAreas object | Custom areas | ||||||||||||||||||||||||||||||||||||
|
latitude integer | Latitude | |||||
longitude integer | Longitude | |||||
radius integer | Radius (miles) | |||||
address string | Address | |||||
locationId integer | Location ID | |||||
polypath object | A set of coordinates defining the boundary of the custom area | |||||
|
lat integer | Latitude |
lng integer | Longitude |
isIncluded
boolean
cid
string
sid
string
type
string
unit
string
cdId
integer
sdId
integer
hdId
integer
locationFileIds
array of integers
- JSON
- TypeScript
{
"success": true,
"data": {
"id": 0,
"name": "string",
"status": "string",
"type": 0,
"includedCount": 0,
"excludedCount": 0,
"createdOn": 0,
"organizationName": "string",
"owId": 0,
"createdByUowId": 0,
"createdByUser": "string",
"uniques": 0,
"frequency": 0,
"frequencyType": 0,
"startDate": 0,
"endDate": 0,
"timezone": 0,
"timeRange": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"locations": {
"included": {
"states": [
30200028,
30200041
],
"cities": [
30430094,
30430093,
30445951
],
"counties": [
30315199,
30315203,
30322340
],
"stateSenates": [
30714553,
30721606
],
"stateHouses": [
30802998,
30802999
],
"congressionalDistricts": [
30613735
],
"zipCodes": [
27513,
27502
],
"customAreas": [
{
"latitude": 35.406129635621866,
"longitude": -78.33474172529601,
"radius": 0.5,
"address": "Four Oaks, NC 27524, USA",
"locationId": 0,
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "circle",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.43298954844131,
"longitude": -78.3107305901947,
"radius": 0.5,
"address": "Smithfield, NC 27577, USA",
"locationId": 0,
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "circle",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.43904739191802,
"longitude": -78.20096345526908,
"radius": 3.41,
"address": "Princeton, NC 27569, USA",
"locationId": 0,
"polypath": [
{
"lat": 35.45918892465155,
"lng": -78.23392243964408
},
{
"lat": 35.465900156326505,
"lng": -78.16525788886283
},
{
"lat": 35.41890977772045,
"lng": -78.17624421698783
},
{
"lat": 35.41219462750953,
"lng": -78.23666902167533
}
],
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "custom",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
}
],
"locationIds": [
50488,
50487
]
},
"excluded": {
"states": null,
"cities": [
30430078,
30430028
],
"counties": [
30322361
],
"stateSenates": [
30714556
],
"stateHouses": [
30804307,
30804308
],
"congressionalDistricts": [
30613736,
30620347
],
"zipCodes": [
27519
],
"customAreas": [
{
"latitude": 35.406129635621866,
"longitude": -78.33474172529601,
"radius": 0.5,
"address": "Four Oaks, NC 27524, USA",
"locationId": 0,
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "circle",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.47596252362811,
"longitude": -78.08560700995658,
"radius": 4.56,
"address": "Pikeville, NC 27863, USA",
"locationId": 0,
"polypath": [
{
"lat": 35.45247713304938,
"lng": -78.12680574042533
},
{
"lat": 35.49944791420684,
"lng": -78.04440827948783
}
],
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "square",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
}
],
"locationIds": [
50486,
50485
]
},
"locationFileIds": [
1656
],
"country": 30100001
},
"bulkLocationDetails": {
"additionalProp1": {
"fileName": "bulk-addresses-example (1)(2).csv",
"fileType": "address",
"validLocations": [
{
"latitude": 35.8440009,
"longitude": -78.65798,
"radius": 1.2,
"address": "4604 Gramercy Ct,Raleigh,NC,27609",
"locationId": 50485,
"isIncluded": false,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.8074803,
"longitude": -78.6582902,
"radius": 1.5,
"address": "2612 Dover Rd,Raleigh,NC,27608",
"locationId": 50486,
"isIncluded": false,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7803352,
"longitude": -78.53267629999999,
"radius": 1.34,
"address": "1002 Lyndhurst Falls Ln,Knightdale,NC,27545",
"locationId": 50487,
"isIncluded": true,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7831443,
"longitude": -78.6388985,
"radius": 0.5,
"address": "16 West Jones Street,Raleigh,NC,27601",
"locationId": 50488,
"isIncluded": true,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
}
],
"id": 1656
},
"additionalProp2": {
"fileName": "bulk-addresses-example (1)(2).csv",
"fileType": "address",
"validLocations": [
{
"latitude": 35.8440009,
"longitude": -78.65798,
"radius": 1.2,
"address": "4604 Gramercy Ct,Raleigh,NC,27609",
"locationId": 50485,
"isIncluded": false,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.8074803,
"longitude": -78.6582902,
"radius": 1.5,
"address": "2612 Dover Rd,Raleigh,NC,27608",
"locationId": 50486,
"isIncluded": false,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7803352,
"longitude": -78.53267629999999,
"radius": 1.34,
"address": "1002 Lyndhurst Falls Ln,Knightdale,NC,27545",
"locationId": 50487,
"isIncluded": true,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7831443,
"longitude": -78.6388985,
"radius": 0.5,
"address": "16 West Jones Street,Raleigh,NC,27601",
"locationId": 50488,
"isIncluded": true,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
}
],
"id": 1656
},
"additionalProp3": {
"fileName": "bulk-addresses-example (1)(2).csv",
"fileType": "address",
"validLocations": [
{
"latitude": 35.8440009,
"longitude": -78.65798,
"radius": 1.2,
"address": "4604 Gramercy Ct,Raleigh,NC,27609",
"locationId": 50485,
"isIncluded": false,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.8074803,
"longitude": -78.6582902,
"radius": 1.5,
"address": "2612 Dover Rd,Raleigh,NC,27608",
"locationId": 50486,
"isIncluded": false,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7803352,
"longitude": -78.53267629999999,
"radius": 1.34,
"address": "1002 Lyndhurst Falls Ln,Knightdale,NC,27545",
"locationId": 50487,
"isIncluded": true,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.7831443,
"longitude": -78.6388985,
"radius": 0.5,
"address": "16 West Jones Street,Raleigh,NC,27601",
"locationId": 50488,
"isIncluded": true,
"cid": "US",
"sid": "NC",
"cdId": 0,
"sdId": 0,
"hdId": 0
}
],
"id": 1656
}
},
"editAccess": true
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
name: string;
status: string;
type: number;
includedCount: number;
excludedCount: number;
createdOn: number;
organizationName: string;
owId: number;
createdByUowId: number;
createdByUser: string;
uniques: number;
frequency: number;
frequencyType: number;
startDate: number;
endDate: number;
timezone: number;
timeRange: {
[key: string]: string;
};
locations: {
included: {
locationIds: number[];
states: number[];
counties: number[];
cities: number[];
stateSenates: number[];
stateHouses: number[];
congressionalDistricts: number[];
zipCodes: number[];
customAreas: {
latitude: number;
longitude: number;
radius: number;
address: string;
locationId: number;
isIncluded: boolean;
cid: string;
sid: string;
type: string;
unit: string;
cdId: number;
sdId: number;
hdId: number;
polypath?: {
lat: number;
lng: number;
}[];
}[];
};
excluded: {
states: string | null;
cities: number[];
counties: number[];
stateSenates: number[];
stateHouses: number[];
congressionalDistricts: number[];
zipCodes: number[];
customAreas: {
latitude: number;
longitude: number;
radius: number;
address: string;
locationId: number;
isIncluded: boolean;
cid: string;
sid: string;
type: string;
unit: string;
cdId: number;
sdId: number;
hdId: number;
polypath?: {
lat: number;
lng: number;
}[];
}[];
locationIds: number[];
};
locationFileIds: number[];
country: number;
};
bulkLocationDetails: {
[key: string]: {
fileName: string;
fileType: string;
validLocations: {
latitude: number;
longitude: number;
radius: number;
address: string;
locationId: number;
isIncluded: boolean;
cid: string;
sid: string;
cdId: number;
sdId: number;
hdId: number;
}[];
id: number;
};
};
editAccess: boolean;
};
};
};
};
}
function GetGeo-FarmedAudienceDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/geo-farmed/{geo-farmed_audience_Id}',
params: {
path: {
geo-farmed_audience_Id: `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Contextual Audience Details
GET /api/v3/audience/contextual/{audienceId}Get Contextual Audience details by ID.
Path Parameter | |
---|---|
audienceId string | Audience ID |
Response Properties
id integer | Audience ID |
name string | Audience name |
status string | Audience status |
type integer | Audience Type ID |
includedCount integer | Count of Campaigns including this Audience |
excludedCount integer | Count of Campaigns excluding this Audience |
createdOn integer | Unix epoch creation date, in milliseconds |
organizationName string | Organization name |
owId integer | Organization Workspace ID |
createdByUowId integer | Created by User Organization Workspace ID |
createdByUser string | Created by user name |
uniques integer | Count of unique Audiences reached |
dataCost integer | Fees charged by the platform if the Audience is used in any Campaign |
keywords string | Keywords |
urls integer | URLs |
startDate integer | Unix epoch start date, in milliseconds |
endDate integer | Unix epoch end date, in milliseconds |
frequency integer | Frequency |
editAccess boolean | Indicates if user has edit access for the requested resource |
- JSON
- TypeScript
{
"success": true,
"data": {
"id": 1078361,
"name": "USA",
"status": "Processing",
"type": 5,
"includedCount": 0,
"excludedCount": 0,
"createdOn": 1719382932,
"organizationName": "IQM Corporation",
"owId": 202314,
"createdByUowId": 117790,
"createdByUser": "Neeraj Khatri",
"createdByUserEmail": null,
"uniques": 0,
"dataCost": 1.5,
"keywords": "law,act,actions",
"urls": "",
"startDate": 1718873084000,
"endDate": 1719229978000,
"frequency": 2,
"editAccess": true
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
name: string;
status: string;
type: number;
includedCount: number;
excludedCount: number;
createdOn: number;
organizationName: string;
owId: number;
createdByUowId: number;
createdByUser: string;
createdByUserEmail: string;
uniques: number;
dataCost: number;
keywords: string;
urls: string;
startDate: number;
endDate: number;
frequency: number;
editAccess: boolean
};
};
};
};
}
function getContextualAudience(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/contextual/{audienceId}',
params: {
path: {
audienceId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Audience Segment Details
Audience Segment Details
GET /api/v3/audience/segment/{audienceId}Get Audience Segment details by ID.
Path Parameter | |
---|---|
audienceId string | Audience ID |
Response Properties
id integer | Audience ID | |||||||||||||||||||||||
name string | Audience name | |||||||||||||||||||||||
status string | Audience status | |||||||||||||||||||||||
type integer | Audience Type ID | |||||||||||||||||||||||
includedCount integer | Count of Campaigns including this Audience | |||||||||||||||||||||||
excludedCount integer | Count of Campaigns excluding this Audience | |||||||||||||||||||||||
createdOn integer | Unix epoch creation date, in milliseconds | |||||||||||||||||||||||
organizationName string | Organization name | |||||||||||||||||||||||
owId integer | Organization Workspace ID | |||||||||||||||||||||||
createdByUowId integer | Created by User Organization Workspace ID | |||||||||||||||||||||||
createdByUser string | Created by user name | |||||||||||||||||||||||
uniques integer | Count of unique Audiences reached | |||||||||||||||||||||||
dataCost integer | Fees charged by the platform if the Audience is used in any Campaignt | |||||||||||||||||||||||
segmentsList array of objects | Array of Audience Segments | |||||||||||||||||||||||
|
segmentId integer | Audience Segment ID |
taxonomyId string | Taxonomy category ID |
taxonomyValue string | Value assocaited with taxonomy category |
description string | Description |
pathKey string | A hierarchichal key representing the taxonomy's path or structure |
cpm integer | Cost per mille |
lastUpdatedDate string | Date last updated |
totalReach integer | Total number of reach in terms of devices |
reachMetadata string | Reach metadata, such as breakdown by device, IP, coookies, etc. |
dataAvailable boolean | Indicates whether relevant data is available for this taxonomy |
leafNode boolean | Indicates whether this taxonomy is a final node (i.e. it has no subcategories) |
segmentPartnerName
string
segmentPartnerId
integer
segmentPartnerLogo
string
equation
string
segmentIdList
array of integers
editAccess
boolean
- JSON
- TypeScript
{
"success": true,
"data": {
"id": 1076846,
"name": "Test kishan 19,04:50",
"status": "Processing",
"type": 2,
"includedCount": 0,
"excludedCount": 0,
"createdOn": 1718796428,
"organizationName": "Stage Shared Advertiser",
"owId": 201427,
"createdByUowId": 153431,
"createdByUser": "Kishan Akbari",
"createdByUserEmail": null,
"uniques": 0,
"dataCost": 1.5,
"segmentsList": [
{
"segmentId": 14005,
"taxonomyId": "1000143856",
"taxonomyValue": "Western Samoa",
"description": null,
"pathKey": "LiveRamp > L2 Political > L2 Voter Data > Individual Demographics > Ethnicity > Ethnic Description > Western Samoa",
"cpm": 1.5,
"lastUpdatedDate": "2021-06-08 08:45:50.979634",
"totalReach": 0,
"reachMetadata": null,
"dataAvailable": false,
"leafNode": true
},
{
"segmentId": 5586112,
"taxonomyId": "1007595031",
"taxonomyValue": "South Dakota-13",
"description": "30 day full data refresh: Individuals living in the South Dakota-13 state senate district. For political use only.",
"pathKey": "LiveRamp > 123Push > Optimized for CTV > Voters > State Senate District > South Dakota-13",
"cpm": 0.75,
"lastUpdatedDate": "2021-06-08 08:45:50.979634",
"totalReach": 14800,
"reachMetadata": null,
"dataAvailable": false,
"leafNode": true
},
{
"segmentId": 6450431,
"taxonomyId": "1000037244",
"taxonomyValue": "Voted In the 2004 Primary Election",
"description": "This Segment contains users who voted in the General Election of this election year",
"pathKey": "LiveRamp > Porch Group Media (fka V12) > V12 > NEW VOTER & INCOME > Voted In the 2004 Primary Election",
"cpm": 0.5,
"lastUpdatedDate": "2024-05-07 09:52:51.191186",
"totalReach": 5100000,
"reachMetadata": {
"iosDevicesReach": 2200000,
"androidDevicesReach": 2900000,
"cookiesReach": 0
},
"dataAvailable": false,
"leafNode": true
}
],
"segmentPartnerName": "LiveRamp",
"segmentPartnerId": 1,
"segmentPartnerLogo": "https://s3.amazonaws.com/advp0had0vuj7rad3niaw1eus2/data_partner/liveramp.png",
"equation": "((5586112|6450431)&(14005))",
"segmentIdList": [
14005,
5586112,
6450431
],
"editAccess": true
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
name: string;
status: string;
type: number;
includedCount: number;
excludedCount: number;
createdOn: number;
organizationName: string;
owId: number;
createdByUowId: number;
createdByUserEmail: string;
uniques: number;
dataCost: number;
segmentsList: {
segmentId: number;
taxonomyId: number;
taxonomyValue: number;
description: string;
pathKey: string;
cpm: number;
lastUpdatedDate: string;
totalReach: number;
reachMetadata: string;
dataAvailable: boolean;
leafNode: boolean;
}[];
segmentPartnerName: string;
segmentPartnerId: number;
segmentPartnerLogo: string;
equation: string;
segmentIdList: number[];
editAccess: boolean;
}
};
};
};
}
function getSegmentAudienceGroup(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/segment/{audienceId}',
params: {
path: {
audienceId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Search Audience Segment
POST /api/v2/audience/segment/searchSearch Audience Segments by specified parameters.
Request Schema | |
---|---|
providerIds string | Comma separated Provider IDs |
referenceId string | Comma separated Reference IDs |
searchField string | Filters results by keyword |
Response Properties
description string | Description |
cpm integer | Cost per mille |
isLeaf boolean | Indicates that an Audience Segment is a leaf node in a hierarchical Audience structure: true |
margin integer | Margin |
pathKey string | A hierarchichal key representing the taxonomy's path or structure |
id string | Audience Segment ID |
taxonomy_value string | Taxonomy value |
- JSON
- TypeScript
{
"providerIds": "a6ff7585-dbb4-43cd-8022-8046883bbad5,7735f885-717e-4bd6-b924-f9552ff987ba,267fdd70-8655-4ad2-ad2b-538be580b139,4a163538-1dcb-4c42-909a-256c542e8820,ff6ae965-bd75-4809-b3c3-ed5c568a39b3,efe627d6-25fe-47c1-9dc6-1005c5e8afe5",
"referenceId": "ea5f5d49-cbd2-49df-bda1-f3d8f2d14223,6449205f-3be6-419b-924f-817f68b42ca9,63b762fc-a5f4-47ac-ba08-1991fbb29bcb",
"searchField": "rocks"
}
{
"statusCode": 200,
"responseObject": {
"0d5fcaea-0fe3-4b10-ba62-168f3dcb0281": [
{
"description": "Sample discription",
"cpm": 1.15,
"isLeaf": 1,
"margin": 0,
"pathKey": "StatSocial > StatSocial > Statsocial > Digital Tribes > Gamers Not Lamers",
"id": "68da1011-aa51-48f3-9d55-45c9e63b9f99",
"taxonomy_value": "Gamers Not Lamers"
},
{
"description": "Sample discription.",
"cpm": 1.15,
"isLeaf": 1,
"margin": 0,
"pathKey": "StatSocial > StatSocial > Statsocial > Earned Audiences > B2C > Style & Fashion > Makeup and Skincare",
"id": "d1e94b51-be6a-4ed7-9ad0-8b0b87bc3500",
"taxonomy_value": "Makeup and Skincare"
},
{
"description": "Sample discription",
"cpm": 1.15,
"isLeaf": 1,
"margin": 0,
"pathKey": "StatSocial > StatSocial > Statsocial > Earned Audiences > B2C > Video Games & Mobile Apps > Grand Theft Auto",
"id": "a3ce828a-d33e-4391-a588-42c8b1332adf",
"taxonomy_value": "Grand Theft Auto"
},
{
"description": "Sample discription",
"cpm": 1.15,
"isLeaf": 1,
"margin": 0,
"pathKey": "StatSocial > StatSocial > Statsocial > Earned Audiences > B2C > Video Games & Mobile Apps > Red Dead Redemption",
"id": "20574ff2-264f-42cc-940b-9356b35637d7",
"taxonomy_value": "Red Dead Redemption"
},
{
"description": "Sample discription",
"cpm": 1.15,
"isLeaf": 1,
"margin": 0,
"pathKey": "StatSocial > StatSocial > Statsocial > Earned Audiences > CPG > Candy (Non-Chocolate)",
"id": "6dc06bea-938a-4725-b177-da9a861540ea",
"taxonomy_value": "Candy (Non-Chocolate)"
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
statusCode: number;
responseObject: {
"0d5fcaea-0fe3-4b10-ba62-168f3dcb0281": {
description: string;
cpm: number;
isLeaf: number;
margin: number;
pathKey: string;
id: string;
taxonomy_value: string;
}[];
};
};
};
};
}
function GetSegmentSearchResult(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v2/audience/segment/search',
requestBody: {
content: {
"application/json": {
providerIds: `string`,
referenceId: `string`,
searchField: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Segment Partner Provider List
GET /api/v3/audience/segment/partner-provider/listGet a list of partners and providers with basic Audience information.
Response Properties
partnerProviderList array of objects | Array of partner and provider details | ||||||||||||||||||||||||||||||||||||||
|
partnerId integer | Partner ID | |||||||||||||
partnerReferenceUuid string | Partner reference Universally Unique Identifier | |||||||||||||
partnerName string | Partner name | |||||||||||||
partnerLogoUrl string | Partner logo URL | |||||||||||||
partnerDescription string | Partner description | |||||||||||||
order integer | Order | |||||||||||||
verticalIdList array of integers | List of Vertical IDs | |||||||||||||
seatId integer | Seat ID | |||||||||||||
customerPartner boolean | Customer associated partner | |||||||||||||
providerList array of objects | Array of Provider details | |||||||||||||
|
providerId integer | Provider ID |
providerReferenceUuid integer | Provider reference Universally Unique Identifier |
providerName integer | Provider name |
providerLogoUrl integer | Provider logo URL |
verticalIdList array of integers | List of Vertical IDs |
providerDescription integer | Provider description |
isPartnerPublic
boolean
- JSON
- TypeScript
{
"success": true,
"data": {
"partnerProviderList": [
{
"partnerId": 1,
"partnerReferenceUuid": "60fe05cf-ec18-120d-b408-01a8118ee02d",
"partnerName": "Sample Partner 1",
"partnerLogoUrl": "https://s3.amazonaws.com/sample/path/sample-partner-logo.png",
"partnerDescription": "This is sample partners description 1",
"order": 1,
"verticalIdList": [
1
],
"seatId": 112,
"customPartner": false,
"providerList": [
{
"providerId": 75,
"providerReferenceUuid": "483feaff-f984-4077-9dd7-a8d5fa95f346",
"providerName": "Sample Provider 1",
"providerLogoUrl": "https://s3.amazonaws.com/sample/path/sample-logo.png",
"verticalIdList": [
1
],
"providerDescription": "This is a sample provider's description"
}
],
"isPartnerPublic": false
},
{
"partnerId": 2,
"partnerReferenceUuid": "60fe05cf-ec18-120d-b408-01a8118ee02d",
"partnerName": "Sample Partner 1",
"partnerLogoUrl": "https://s3.amazonaws.com/sample/path/sample-partner-logo.png",
"partnerDescription": "This is sample partners description 1",
"order": 2,
"providerList": [],
"verticalIdList": [
1
],
"seatId": 112,
"customPartner": false,
"isPartnerPublic": false
},
{
"partnerId": 3,
"partnerReferenceUuid": "6449205f-5be6-419b-923f-817f68b42ca9",
"partnerName": "Sample Partner 3",
"partnerLogoUrl": "https://s3.amazonaws.com/sample/path/sample-partner-logo.svg",
"partnerDescription": "This is sample partners description 3",
"order": 3,
"verticalIdList": [
1
],
"seatId": 112,
"customPartner": false,
"providerList": [
{
"providerId": 65,
"providerReferenceUuid": "d353b25a-ed48-4158-8522-85b9e507eb47",
"providerName": "Sample provider 1",
"providerLogoUrl": null,
"verticalIdList": [
1
],
"providerDescription": "This is a sample provider's description"
},
{
"providerId": 136,
"providerReferenceUuid": "47bb6286-aa47-4664-90a0-bf2c2492319a",
"providerName": "Sample provider 2",
"providerLogoUrl": null,
"verticalIdList": [
1
],
"providerDescription": null
}
],
"isPartnerPublic": true
}
],
"totalRecords": 3,
"filteredRecords": 3
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
partnerProviderList: {
partnerId: number;
partnerReferenceUuid: string;
partnerName: string;
partnerLogoUrl: string;
partnerDescription: string;
order: number;
verticalIdList: number[];
seatId: number;
customPartner: boolean;
providerList: {
providerId: number;
providerReferenceUuid: string;
providerName: string;
providerLogoUrl: string;
verticalIdList: number[];
providerDescription: string;
}[];
isPartnerPublic: boolean;
}[];
totalRecords: number;
filteredRecords: number;
}
};
};
};
}
function getSegmentPartnerProviderList(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/segment/partner-provider/list',
requestBody: {
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Segment List by Provider/Partner IDs
GET /api/v3/audience/segment/list-by-parent-idGet a list of Segments by given provider or parent ID. If parent ID is not provided, endpoint will return all direct segments of a given provider ID.
Query Parameters | |
---|---|
partnerId integer required | Partner ID |
providerId integer required | Provider ID |
parentId integer | Parent ID, if not provided returned results will include all direct segments of provided ID |
showOnlyNonZeroSegments boolean | Returns segments with reach greater than 0: true, default: false |
showOnlyReadySegments boolean | Returns segments with "ready" status: true |
Response Properties
segmentId integer | Segment ID | |||||||
taxonomyId string | Taxonomy ID | |||||||
taxonomyValue string | Taxonomy value | |||||||
description string | Description | |||||||
pathKey string | A hierarchichal key representing the taxonomy's path or structure | |||||||
cpm integer | Cost per mille | |||||||
referenceId string | Reference ID | |||||||
lastUpdatedDate string | Date last updated | |||||||
totalReach integer | Total number of reach in terms of devices | |||||||
reachMetadata string | Reach metadata, such as breakdown by device, IP, coookies, etc. | |||||||
|
iosDevicesReach integer | IOS devices reach |
androidDevicesReach integer | Android devices reach |
cookiesReach integer | Cookies reach |
dataAvailable
boolean
leafNode
boolean
- JSON
- TypeScript
{
"success": true,
"data": [
{
"segmentId": 6192803,
"taxonomyId": "iqm-6192803",
"taxonomyValue": "Giving And Investment",
"description": null,
"pathKey": "LiveRamp > i360 > i360 > Demographics > Giving And Investment",
"cpm": 0.0,
"referenceId": "fc649c8b-6106-41cc-9b28-c287b46414b2",
"lastUpdatedDate": "2022-08-26 12:14:54.264993",
"totalReach": 0,
"reachMetadata": null,
"dataAvailable":true,
"reachMetadata":{
"iosDevicesReach":120,
"androidDevicesReach":120,
"cookiesReach":120
},
"leafNode": false
},
{
"segmentId": 6192796,
"taxonomyId": "i360-000001",
"taxonomyValue": "Ages 18 To 29",
"description": "Individuals Ages 18 And 29.",
"pathKey": "LiveRamp > i360 > i360 > Demographics > Ages 18 To 29",
"cpm": 1.0,
"referenceId": "72aac958-335d-4651-88ca-b88babc5404a",
"lastUpdatedDate": "2022-08-26 12:14:54.264993",
"totalReach": 18907067,
"reachMetadata": null,
"leafNode": true
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
segmentId: number;
taxonomyId: string;
taxonomyValue: string;
description: string;
pathKey: string;
cpm: number;
referenceId: string;
lastUpdateDate: string;
totalReach: number;
dataAvailable: boolean;
reachMetadata: {
iosDevicesReach: number;
androidDevicesReach: number;
cookiesReach: number;
};
leafNode: boolean;
}[];
};
};
};
}
function getSegmentsListByParent(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/segment/list-by-parent-id',
params: {
query: {
partnerId: `number`,
providerId: `number`,
parentId?: `number`,
showOnlyNonZeroSegments?: `boolean`,
showOnlyReadySegments?: `boolean`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Segment List by Audience IDs
GET /api/v3/audience/segment/list-by-audience-idsGet a list of Segments based on Audience IDs.
Query Parameters | |
---|---|
audienceIds string required | Audience IDs |
segmentListSize integer | Segment list size, default: 5 |
Response Properties
audienceId integer | Audience ID | |||||
totalSegments integer | Segment count | |||||
segmentDetailsResponseVOList object array | List of Audience Segments | |||||
|
segmentId integer | Segment ID |
segmentName string | Segment name |
- JSON
- TypeScript
{
"success": true,
"data": [
{
"audienceId": 900057,
"totalSegments": 6,
"segmentDetailsResponseVOList": [
{
"segmentId": 38029,
"segmentName": "Extra-Large (5000+)"
},
{
"segmentId": 38030,
"segmentName": "Fortune 500"
},
{
"segmentId": 38031,
"segmentName": "Large (1000-4999)"
},
{
"segmentId": 38032,
"segmentName": "Medium (50-249)"
},
{
"segmentId": 38033,
"segmentName": "Medium-Large (250-999)"
}
]
},
{
"audienceId": 900043,
"totalSegments": 3,
"segmentDetailsResponseVOList": [
{
"segmentId": 76370,
"segmentName": "Strong Democrat"
},
{
"segmentId": 76372,
"segmentName": "Strong Republican"
},
{
"segmentId": 76397,
"segmentName": "No"
}
]
},
{
"audienceId": 1066727,
"totalSegments": 0,
"segmentDetailsResponseVOList": []
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
audienceId: number;
totalSegments: number;
segmentDetailsResponseVOList: {
segmentId: number;
segmentName: string;
}[];
}[];
};
};
};
}
function getSegmentListByAudience(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/segment/list-by-audience-ids',
params: {
query: {
audienceIds: `string`,
segmentListSize?: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Audience Segment Insights
GET /api/v3/audience/segment/audience-insights/{audienceId}Get available Audience Insights like age, location, gender, etc.
Path Parameter | |
---|---|
audienceId integer | Audience ID |
Response Properties
audienceId string | Audience ID | ||||||||||||||||||||||
audienceName string | Audience name | ||||||||||||||||||||||
audienceDate string | Audience date | ||||||||||||||||||||||
verticalId string | Vertical ID | ||||||||||||||||||||||
vertical string | Vertical label | ||||||||||||||||||||||
widgets object | Widgets list | ||||||||||||||||||||||
|
title string | Title | |||||||||||||
type string | Type | |||||||||||||
data object | Data details | |||||||||||||
|
srNo integer | |
deviceType string | Device type |
audienceValue(Absolute) string | |
audienceValue(%) integer | |
nationalAvg(%) integer | |
delta integer |
- JSON
- TypeScript
{
"success": true,
"data": {
"audienceId": "1064660",
"audienceName": "Test Case - Is Voter, Is HL",
"audienceDate": "2024-04-29",
"verticalId": "8",
"vertical": "other",
"widgets": [
{
"title": "deviceType",
"type": "pie",
"data": [
{
"srNo": 1,
"deviceType": "Tablet",
"audienceValue(Absolute)": "10,161,882",
"audienceValue(%)": 6.09,
"nationalAvg(%)": -1,
"delta": -1
},
{
"srNo": 2,
"deviceType": "Mobile",
"audienceValue(Absolute)": "77,590,386",
"audienceValue(%)": 46.54,
"nationalAvg(%)": -1,
"delta": -1
}
]
},
{
"title": "gender",
"type": "pie",
"data": [
{
"srNo": 1,
"gender": "Male",
"audienceValue(Absolute)": "1,253",
"audienceValue(%)": 44.35,
"nationalAvg(%)": -1,
"delta": -1
},
{
"srNo": 2,
"gender": "Female",
"audienceValue(Absolute)": "1,572",
"audienceValue(%)": 55.65,
"nationalAvg(%)": -1,
"delta": -1
}
]
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
audienceId: number;
audienceName: string;
audienceDate: string;
verticalId: string;
vertical: string;
widgets: {
title: string;
type: string;
data: {
srNo: number;
deviceType: string;
audienceValue(Absolute): string;
audienceValue(%): number;
nationalAvg(%): number;
delta: number;
}[];
}[];
}
};
};
};
}
function getSegmentAudienceInsights(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/segment/audience-insights/{audienceId}',
params: {
path: {
audienceId: `number`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Audience Management
Create Matched Audience
POST /api/v2/audience/matched/addCreate a Matched Audience.
Payload (Form Data) | |
---|---|
| Matched Audience file columns mapped with system fields.
This supports a few columns mapping as follows:
|
| Matched Audience columns setting as per the selected columns for matching. Column setting should be as per the selected column as follows:
|
audienceName string (FormData) required | Name of matched audience |
metadata string (FormData) required | Matched Audience sample data with system fields |
fileTotalCount integer (FormData) required | Total number of records in the uploaded Audience file |
isSingleColumnEnabled boolean (FormData) required | Flag to indicate if the mapping is single column enabled, if the voterId/phone/email/full-address is the primary column mapping then this should be true, and false otherwise. Default value: false |
Response Properties
id integer | Audience ID |
message string | Success message |
- JSON
- TypeScript
------WebKitFormBoundary2LAoPYE0pJvRQ6mQ
Content-Disposition: form-data; name="file"; filename="matched-audience-example.csv"
Content-Type: text/csv
------WebKitFormBoundary2LAoPYE0pJvRQ6mQ
Content-Disposition: form-data; name="columns"
{"first-name":"Voters_FirstName","last-name":"Voters_LastName","zip":"Residence_Addresses_Zip","state":"Residence_Addresses_State","street-address":"Residence_Addresses_AddressLine"}
------WebKitFormBoundary2LAoPYE0pJvRQ6mQ
Content-Disposition: form-data; name="metadata"
{"columns":["registered-voter-id","l2-voter-id","targetsmart-voter-id","first-name","last-name","street-address","city","zip","zipplus4","state","full-address","phone","email","phone-sha256","email-sha256","npi-id"],"fileName":"matched-audience-example.csv","fileSize":1777,"columnValues":{"registered-voter-id":["23457","456789","34567"],"l2-voter-id":["LALNY987654","LALNY76543","LALNY54321"],"targetsmart-voter-id":["NY-000020745","NY-000032452","NY-000069778"],"first-name":["Bilbo","Frodo","Samwise"],"last-name":["Baggins","Baggins","Gamgee"],"street-address":["11 The Shire Middle Earth","22 The Shire Middle Earth","33 The Shire Middle Earth"],"city":["New York","New York","New York"],"zip":["10001","10010","10011"],"zipplus4":["1122","2233","3344"],"state":["NY","New York","NY"],"full-address":["11 The Shire Middle Earth, New York, 10001, NY","22 The Shire Middle Earth, New York, 10010, NY","33 The Shire Middle Earth, New York, 10011, NY"],"phone":["3456789012","5678901234","7890123456"],"email":["Bilbo.Baggins@lotr.com","Frodo.Baggins@lotr.com","Samwise.Gamgee@lotr.com"],"phone-sha256":["26cc49f1a2133f3784b937017f9cc86e05b5413c7f91b0b6bd6375631b68371e","2f510ce904687db4b2706fdaf33f1d0e678be13cc5fe300cf695a546befa5fc8","453fc17260d034186d92d1e58cc557fea9cafc1bf886154b472057feed950605"],"email-sha256":["43f5f8fabe82fc8dce2452267f5550bb036d0ddf33368682a9cd5da8286d63a0","ceb005d969f16f9a6a487849d27bf854fac1f0733aa61995bcbb5cb928dfc410","986c1ae0d3cef60591d3b29aa54afb5d9654406d7cfa4fcbb65c3ad45ad1ce5c"],"npi-id":["1144317652","1467478172","1275506503"]},"rows":5}
------WebKitFormBoundary2LAoPYE0pJvRQ6mQ
Content-Disposition: form-data; name="audienceName"
Matched Audience Sample
------WebKitFormBoundary2LAoPYE0pJvRQ6mQ
Content-Disposition: form-data; name="isSingleColumnEnabled"
false
------WebKitFormBoundary2LAoPYE0pJvRQ6mQ
Content-Disposition: form-data; name="fileTotalCount"
5
------WebKitFormBoundary2LAoPYE0pJvRQ6mQ--
{
"statusCode": 200,
"responseObject": {
"id": 15332,
"message": "Audience created successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
statusCode: number;
responseObject: {
id: number;
message: string;
};
};
};
};
}
function addMatchedAudience(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v2/audience/matched/add',
params: {
query: {
columns: `string`,
columnSettings?: `string`,
audienceName: `string`,
metadata: `string`,
fileTotalCount: `number`,
isSingleColumnEnabled: `boolean`,
},
},
requestBody: {
content: {
"multipart/form-data": {
file: `string`,
},
},
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Matched Audience
PATCH /api/v2/audience/matched/update/{matched_audience_id}Update a Matched Audience.
Path Parameter | |
---|---|
matched_audience_id integer | Matched Audience ID |
Request Schema | |
---|---|
audienceName string | Audience Name |
rawS3URL string | Raw S3 URL |
Response Properties
id integer | Audience ID |
message string | Success message |
- JSON
- TypeScript
{
"audienceName": "Sample audience name",
"rawS3URL": "s3://sample.url.come"
}
{
"statusCode": 200,
"responseObject": {
"id": 1,
"message": "Your changes have been saved successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
statusCode: number;
responseObject: {
id: number;
message: string;
};
};
};
};
}
function EditMatchedAudience(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v2/audience/matched/update/{matched_audience_Id}',
params: {
path: {
matched_audience_Id: `string`
}
},
requestBody: {
content: {
"application/json": {
audienceName: `string`,
rawS3URL: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create Audience Segment
POST /api/v3/audience/segment/addCreate an Audience Segment.
Using Segment IDs (from the Master API), you can build an Audience with the equation field. Segment IDs in parentheses, separated by a vertical bar (|), will be in an 'or' relationship, which will combine the sets of Segments; groups of Segments in parentheses, separated by an ampersand (&), will be in an 'and' relationship, which will build an Audience based on the intersection of those groups. You can see an example of this format in the Request Sample code block on the right-hand side of the page.
Request Schema | |
---|---|
groupName string | Audience Segment name |
segmentPartnerId integer | Partner ID of selected segments |
equation string | Equation string describing the or-and relationship between Segment groups |
Response Properties
id integer | Audience ID |
message string | Success message |
- JSON
- TypeScript
{
"equation": "((6388749|6388750)&(6388751|6402730|6392754|5776004))",
"name": "football-temp"
}
{
"success": true,
"data": {
"id": 1063316,
"message": "Audience created successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
};
};
};
};
}
function createSegmentAudienceGroup(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/audience/segment/add',
requestBody: {
content: {
"application/json": {
advertiserId?: `number`,
dspId?: `number`,
owId?: `number`,
uowId?: `number`,
name?: `string`,
equation?: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Audience Segment
PUT /api/v3/audience/segment/{audienceId}Update an Audience Segment.
Path Parameter | |
---|---|
audienceId integer | Audience ID |
Request Schema | |
---|---|
groupName string | Audience Segment name |
dataPartnerId integer | Partner ID of selected segments |
segmentIdList string | Segment IDs |
equation string | Equation string describing or-and relationship between Segment groups |
dataPartnerName string | Data partner name |
taxonomyIdList array of integers | Taxonomy ID list |
Response Properties
message string | Success message |
- JSON
- TypeScript
{
"equation": "((5613837|5638265)&(5613844))",
"name": "Segment audience - 1"
}
{
"success": true,
"data": {
"message": "Your changes have been saved successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
message: string;
};
};
};
};
}
function updateSegmentAudienceGroup(): Promise<Responses> {
const options = {
method: 'PUT',
url: 'https://app.iqm.com/api/v3/audience/segment/{audienceId}',
params: {
path: {
audienceId: `number`,
}
},
requestBody: {
content: {
"application/json": {
advertiserId?: `number`,
dspId?: `number`,
owId?: `number`,
uowId?: `number`,
name?: `string`,
equation?: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create Geo-Farmed Audience
POST /api/v3/audience/geo-farmed/addCreate a Geo-Farmed Audience.
Request Schema | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
audienceName string | Audience name | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
frequency string | The frequency of visit to the geographical location, based on frequencyType | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
frequencyType string | Frequency Type ID | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
startDate integer | Unix epoch start date, in milliseconds | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
endDate integer | Unix epoch end date, in milliseconds | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeRange object | Name-Value pairs of day of the week (e.g. Monday: 1, Tuesday: 2, etc.) and an object containing a time range (see example below this table) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
removedLocationsIds array of integers | Removed location IDs, as specified in the uploaded location file | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locations object | Locations object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
country integer | Country ID | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included object | Included locations object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
locationIds array of integers | Location IDs | ||||||||||||||||||||||||||||||||||||
states array of integers | State IDs | ||||||||||||||||||||||||||||||||||||
counties array of integers | County IDs | ||||||||||||||||||||||||||||||||||||
cities array of integers | City IDs | ||||||||||||||||||||||||||||||||||||
stateSenates array of integers | State senate IDs | ||||||||||||||||||||||||||||||||||||
stateHouses array of integers | State house IDs | ||||||||||||||||||||||||||||||||||||
congressionalDistrictIds array of integers | Congressional District IDs | ||||||||||||||||||||||||||||||||||||
zipCodes array of integers | Zip code IDs | ||||||||||||||||||||||||||||||||||||
customAreas object | Custom areas | ||||||||||||||||||||||||||||||||||||
|
latitude integer | Latitude | |||||
longitude integer | Longitude | |||||
radius integer | Radius (miles) | |||||
address string | Addresses to add to custom area | |||||
locationId integer | Location ID | |||||
polypath object | A set of coordinates defining the boundary of the custom area | |||||
|
lat integer | Latitude |
lng integer | Longitude |
isIncluded
boolean
cid
string
sid
string
type
string
unit
string
cdId
integer
sdId
integer
hdId
integer
excluded
object
excluded
object properties
locationIds array of integers | Location IDs | ||||||||||||||||||||||||||||||||||||
states array of integers | State IDs | ||||||||||||||||||||||||||||||||||||
counties array of integers | County IDs | ||||||||||||||||||||||||||||||||||||
cities array of integers | City IDs | ||||||||||||||||||||||||||||||||||||
stateSenates array of integers | State senate IDs | ||||||||||||||||||||||||||||||||||||
stateHouses array of integers | State house IDs | ||||||||||||||||||||||||||||||||||||
congressionalDistrictIds array of integers | Congressional District IDs | ||||||||||||||||||||||||||||||||||||
zipCodes array of integers | Zip code IDs | ||||||||||||||||||||||||||||||||||||
customAreas object | Custom areas | ||||||||||||||||||||||||||||||||||||
|
latitude integer | Latitude | |||||
longitude integer | Longitude | |||||
radius integer | Radius (miles) | |||||
address string | Address | |||||
locationId integer | Location ID | |||||
polypath object | A set of coordinates defining the boundary of the custom area | |||||
|
lat integer | Latitude |
lng integer | Longitude |
isIncluded
boolean
cid
string
sid
string
type
string
unit
string
cdId
integer
sdId
integer
hdId
integer
locationFileIds
array of integers
timeRange example
"timeRange": {
"0": [
[
"19:00:00",
"22:00:00"
]
],
"1": [
[
"09:00:00",
"12:00:00"
],
[
"15:00:00",
"18:00:00"
]
],
"2": [
[
"04:00:00",
"11:00:00"
]
],
"4": [
[
"06:00:00",
"12:00:00"
]
],
"6": [
[
"01:00:00",
"10:00:00"
]
]
},
Response Properties
id integer | Audience ID |
message string | Success message |
- JSON
- TypeScript
{
"audienceName": "string",
"frequency": 0,
"frequencyType": 0,
"startDate": 0,
"endDate": 0,
"timezone": 0,
"timeRange": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"removedLocationsIds": [
0
],
"locations": {
"country": 30100001,
"included": {
"locationIds": [
50488,
50487
],
"states": [
30200028,
30200041
],
"counties": [
30315199,
30315203,
30322340
],
"cities": [
30430094,
30430093,
30445951
],
"stateSenates": [
30714553,
30721606
],
"stateHouses": [
30802998,
30802999
],
"congressionalDistricts": [
30613735
],
"zipCodes": [
27513,
27502
],
"customAreas": [
{
"latitude": 35.406129635621866,
"longitude": -78.33474172529601,
"radius": 0.5,
"address": "Four Oaks, NC 27524, USA",
"locationId": 0,
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "circle",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.43298954844131,
"longitude": -78.3107305901947,
"radius": 0.5,
"address": "Smithfield, NC 27577, USA",
"locationId": 0,
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "circle",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.43904739191802,
"longitude": -78.20096345526908,
"radius": 3.41,
"address": "Princeton, NC 27569, USA",
"locationId": 0,
"polypath": [
{
"lat": 35.45918892465155,
"lng": -78.23392243964408
},
{
"lat": 35.465900156326505,
"lng": -78.16525788886283
},
{
"lat": 35.41890977772045,
"lng": -78.17624421698783
},
{
"lat": 35.41219462750953,
"lng": -78.23666902167533
}
],
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "custom",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
}
]
},
"excluded": {
"locationIds": [
50486,
50485
],
"cities": [
30430078,
30430028
],
"counties": [
30322361
],
"stateSenates": [
30714556
],
"stateHouses": [
30804307,
30804308
],
"congressionalDistricts": [
30613736,
30620347
],
"zipCodes": [
27519
],
"customAreas": [
{
"latitude": 35.406129635621866,
"longitude": -78.33474172529601,
"radius": 0.5,
"address": "Four Oaks, NC 27524, USA",
"locationId": 0,
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "circle",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
},
{
"latitude": 35.47596252362811,
"longitude": -78.08560700995658,
"radius": 4.56,
"address": "Pikeville, NC 27863, USA",
"locationId": 0,
"polypath": [
{
"lat": 35.45247713304938,
"lng": -78.12680574042533
},
{
"lat": 35.49944791420684,
"lng": -78.04440827948783
}
],
"isIncluded": true,
"cid": "246",
"sid": "4695",
"type": "square",
"unit": "mile",
"cdId": 0,
"sdId": 0,
"hdId": 0
}
]
},
"locationFileIds": [
1656
]
}
}
{
"success": true,
"data": {
"id": 1,
"message": "Geofarmed Audience created successfully."
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
};
};
};
};
}
function CreateGeo-FarmedAudience(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/audience/geo-farmed/add',
requestBody: {
content: {
"application/json": {
audienceName: `string`,
frequency: `number`,
frequencyType: `number`,
startDate: `number`,
endDate: `number`,
timezone: `number`,
timeRange: {
[key: string]: `string`,
},
removedLocationsIds: `number[]`,
locations: {
country: `number`,
included: {
locationIds: `number[]`,
states: `number[]`,
counties: `number[]`,
cities: `number[]`,
stateSenates: `number[]`,
stateHouses: `number[]`,
congressionalDistricts: `number[]`,
zipCodes: `number[]`,
customAreas: {
latitude: `number`,
longitude: `number`,
radius: `number`,
address: `string`,
locationId: `number`,
isIncluded: `boolean`,
cid: `string`,
sid: `string`,
type: `string`,
unit: `string`,
cdId: `number`,
sdId: `number`,
hdId: `number`,
polypath?: {
lat: `number`,
lng: `number`,
}[],
}[],
},
excluded: {
locationIds: `number[]`,
cities: `number[]`,
counties: `number[]`,
stateSenates: `number[]`,
stateHouses: `number[]`,
congressionalDistricts: `number[]`,
zipCodes: `number[]`,
customAreas: {
latitude: `number`,
longitude: `number`,
radius: `number`,
address: `string`,
locationId: `number`,
isIncluded: `boolean`,
cid: `string`,
sid: `string`,
type: `string`,
unit: `string`,
cdId: `number`,
sdId: `number`,
hdId: `number`,
polypath?: {
lat: `number`,
lng: `number`,
}[],
}[],
},
locationFileIds: number[],
}
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Create Contextual Audience
POST /api/v3/audience/contextual/addCreate a Contextual Audience.
Data Collection Period: Timeframe during which a user visits the publisher(s) relevant to one or more keywords or URLs added to the contextual Audience.
The start date of a Contextual Audience must be within the last 180 days.
The period between the start date and the end date cannot exceed 30 days.
Request Schema | |
---|---|
audienceName string | Audience name |
keywords string | Keywords to generate contextual Audience |
startDate integer | Unix epoch start date, in milliseconds |
endDate integer | Unix epoch start date, in milliseconds |
frequency integer | The number of times a user visits the publisher(s) relevant to one or more keywords or URLs added to the contextual Audience. Integer between 1-10 |
urls string | The publisher sites visited by a user |
Response Properties
id integer | Audience ID |
message string | Success message |
- JSON
- TypeScript
{
"audienceName": "India",
"keywords": "law,act,actions",
"startDate": 1718873084000,
"endDate": 1719305084000,
"frequency": 3,
"urls": ""
}
{
"success": true,
"data": {
"id": 1078146,
"message": "Contextual Audience created successfully"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
};
};
};
};
}
function createContextualAudiences(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/audience/contextual/add',
requestBody: {
content: {
"application/json": {
advertiserId?: `number`,
dspId?: `number`,
owId?: `number`,
uowId?: `number`,
audienceName: `string`,
keywords?: `string`,
urls?: `string`,
frequency?: `number`,
startDate?: `number`,
endDate?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
More Audience Details
Data Partners List for Matched Audience
GET /api/v3/audience/static/matched/data-partnerGet a static list of Matched Audience data partners.
Response Properties
id integer | Data partner ID |
label string | Data partner label |
keyName string | Data partner key name |
audienceColumnId integer | Audience column ID |
- JSON
- TypeScript
{
"success": true,
"data": [
{
"id": 1,
"label": "Registered Voter ID",
"keyName": "Voters_StateVoterID",
"audienceColumnId": 1
},
{
"id": 2,
"label": "L2 ID",
"keyName": "LalVoterID",
"audienceColumnId": 1
},
{
"id": 3,
"label": "i360 ID",
"keyName": "i360_id",
"audienceColumnId": 1
},
{
"id": 4,
"label": "TargetSmart ID",
"keyName": "voterbase_id",
"audienceColumnId": 1
},
{
"id": 6,
"label": "Aristotle ID",
"keyName": "aristotle_id",
"audienceColumnId": 1
},
{
"id": 7,
"label": "Healthlink ID",
"keyName": "hl_npi_id",
"audienceColumnId": 26
},
{
"id": 5,
"label": "Other ID",
"keyName": "Other",
"audienceColumnId": 1
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json;charset=UTF-8": {
success: boolean;
data: {
id: number;
label: string;
keyName: string;
audienceColumnId: number;
}[];
};
};
};
}
function getMatchedAudienceDataPartner(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/static/matched/data-partner',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Provider Details List
GET /api/v3/audience/prebid/static/providers/listGet a static list of providers details.
Response Properties
prebidSegmentData array of objects | Pre-bid Segment Data | |||||||||
|
providerId integer | Provider ID |
providerName string | Provider name |
description string | Description |
providerLogoUrl string | Provider logo URL |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 1,
"prebidSegmentData": [
{
"providerId": 1,
"providerName": "Integral Ad Science",
"description": "Segments for Brand Safety, Viewability, Fraud & IVT",
"providerLogoUrl": "http://logoUrl.com"
},
{
"providerId": 2,
"providerName": "Double Verify",
"description": "Segments for Brand Safety, Viewability, Fraud & IVT",
"providerLogoUrl": "http://logoUrl.com"
}
],
"filteredRecords": 2
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
prebidSegmentData: {
providerId: number;
providerName: string;
description: string;
providerLogoUrl: string;
}[];
filteredRecords: number;
}
};
};
};
}
function getProviders(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/audience/prebid/static/providers/list',
}
return axios.request(options).then(({ data }: { data: Responses }) => data);
}