Master API
Overview
The Master API contains static lists of data such as: geographical data, demographic data, Creative type/parameter data, and more.
Authentication
Use the following header parameters for all requests:
Headers | |
---|---|
Authentication string required | Authentication bearer token See Authentication Guide |
X-IAA-OW-ID integer required | Organization Worskpace ID Header |
Get Geographical Data
POST endpoints use the following request body schema (shown below) to retrieve paginated lists of geographical data based on provided filters:
Request Schema | |
---|---|
pageNo integer required | Page number for the required data, default: 1 |
noOfEntries integer required | The maximum number of returned results per page, default: 300 |
sortBy string optional | Sort the result set by specific field. For ascending use plus(+) sign and for descending use minus(-) sign, default: -id |
searchField string optional | Search the result by provided keyword in the searchField` search country records by name |
campaignId integer optional | Country records associated with the provided Campaign will be returned first, prioritized over other country records |
ids array of integers optional | Selected country ID List, countries with provided ids will be returned first compared to other records |
segmentIds array of integers optional | country list filter by country IDs |
Get Zip Codes and State IDs
POST /api/v3/master/segment/zipGet a list of zip codes with state IDs.
Properties | |
---|---|
id integer | Zip code ID |
name string | Zip code name |
parentId integer | State ID |
geojsonUrl string | Json geographical data URL |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30501001,
"name": "01001",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501001.geojson"
},
{
"id": 30501002,
"name": "01002",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501002.geojson"
},
{
"id": 30501003,
"name": "01003",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501003.geojson"
},
{
"id": 30501005,
"name": "01005",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501005.geojson"
},
{
"id": 30501007,
"name": "01007",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501007.geojson"
},
{
"id": 30501008,
"name": "01008",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501008.geojson"
},
{
"id": 30501009,
"name": "01009",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501009.geojson"
},
{
"id": 30501010,
"name": "01010",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501010.geojson"
},
{
"id": 30501011,
"name": "01011",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501011.geojson"
},
{
"id": 30501012,
"name": "01012",
"parentId": 30200020,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/zipdata/US/30501012.geojson"
}
],
"totalRecords": 48777,
"filteredRecords": 48777
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
parentId: number;
geojsonUrl: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getMasterSegmentZipCode(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/zip',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
zipCodes?: `array of strings`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get State segment
POST /api/v3/master/segment/stateProperties | |
---|---|
id integer | State ID |
name string | State name |
abbreviation string | State abbreviation |
parentId integer | Country ID |
geojsonUrl string | Json geographical data URL |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30200001,
"name": "Alaska",
"abbreviation": "AK",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/AK.geojson"
},
{
"id": 30200002,
"name": "Alabama",
"abbreviation": "AL",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/AL.geojson"
},
{
"id": 30200003,
"name": "Arkansas",
"abbreviation": "AR",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/AR.geojson"
},
{
"id": 30200004,
"name": "Arizona",
"abbreviation": "AZ",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/AZ.geojson"
},
{
"id": 30200005,
"name": "California",
"abbreviation": "CA",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/CA.geojson"
},
{
"id": 30200006,
"name": "Colorado",
"abbreviation": "CO",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/CO.geojson"
},
{
"id": 30200007,
"name": "Connecticut",
"abbreviation": "CT",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/CT.geojson"
},
{
"id": 30200008,
"name": "District of Columbia",
"abbreviation": "DC",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/DC.geojson"
},
{
"id": 30200009,
"name": "Delaware",
"abbreviation": "DE",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/DE.geojson"
},
{
"id": 30200010,
"name": "Florida",
"abbreviation": "FL",
"parentId": 30100001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/statedata/FL.geojson"
}
],
"totalRecords": 4964,
"filteredRecords": 4964
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
abbreviation: string;
parentId: number;
geojsonUrl: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getStatesSegmentDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/state',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Senate District segment
POST /api/v3/master/segment/senate-districtProperties | |
---|---|
id integer | Senate District ID |
name string | Senate District name |
abbreviation string | Senate District abbreviation |
parentId integer | State ID |
geojsonUrl string | Json geographical data URL |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30700001,
"name": "Alaska-A",
"abbreviation": "AK-A",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700001.geojson"
},
{
"id": 30700002,
"name": "Alaska-B",
"abbreviation": "AK-B",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700002.geojson"
},
{
"id": 30700003,
"name": "Alaska-C",
"abbreviation": "AK-C",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700003.geojson"
},
{
"id": 30700004,
"name": "Alaska-D",
"abbreviation": "AK-D",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700004.geojson"
},
{
"id": 30700005,
"name": "Alaska-E",
"abbreviation": "AK-E",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700005.geojson"
},
{
"id": 30700006,
"name": "Alaska-F",
"abbreviation": "AK-F",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700006.geojson"
},
{
"id": 30700007,
"name": "Alaska-G",
"abbreviation": "AK-G",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700007.geojson"
},
{
"id": 30700008,
"name": "Alaska-H",
"abbreviation": "AK-H",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700008.geojson"
},
{
"id": 30700009,
"name": "Alaska-I",
"abbreviation": "AK-I",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700009.geojson"
},
{
"id": 30700010,
"name": "Alaska-J",
"abbreviation": "AK-J",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/sd/AK/30700010.geojson"
}
],
"totalRecords": 1950,
"filteredRecords": 1950
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
abbreviation: string;
parentId: number;
geojsonUrl: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getSenateDistrictSegmentDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/senate-district',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get House District segment
POST /api/v3/master/segment/house-districtProperties | |
---|---|
id integer | House District ID |
name string | House District name |
abbreviation string | House District abbreviation |
parentId integer | State ID |
geojsonUrl string | Json geographical data URL |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30800073,
"name": "Alaska-1",
"abbreviation": "AK-01",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800073.geojson"
},
{
"id": 30800074,
"name": "Alaska-2",
"abbreviation": "AK-02",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800074.geojson"
},
{
"id": 30800075,
"name": "Alaska-3",
"abbreviation": "AK-03",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800075.geojson"
},
{
"id": 30800076,
"name": "Alaska-4",
"abbreviation": "AK-04",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800076.geojson"
},
{
"id": 30800077,
"name": "Alaska-5",
"abbreviation": "AK-05",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800077.geojson"
},
{
"id": 30800078,
"name": "Alaska-6",
"abbreviation": "AK-06",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800078.geojson"
},
{
"id": 30800079,
"name": "Alaska-7",
"abbreviation": "AK-07",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800079.geojson"
},
{
"id": 30800080,
"name": "Alaska-8",
"abbreviation": "AK-08",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800080.geojson"
},
{
"id": 30800081,
"name": "Alaska-9",
"abbreviation": "AK-09",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800081.geojson"
},
{
"id": 30800082,
"name": "Alaska-10",
"abbreviation": "AK-10",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/hd/AK/30800082.geojson"
}
],
"totalRecords": 4833,
"filteredRecords": 4833
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
abbreviation: string;
parentId: number;
geojsonUrl: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getHouseDistrictSegmentDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/house-district',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Gender segment
POST /api/v3/master/segment/genderProperties | |
---|---|
id integer | Gender ID |
name string | Gender name |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 3,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 10200001,
"name": "Male"
},
{
"id": 10200002,
"name": "Female"
},
{
"id": 10299999,
"name": "Unknown"
}
],
"totalRecords": 3,
"filteredRecords": 3
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
abbreviation: string;
parentId: number;
geojsonUrl: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getGenderSegmentDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/gender',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Age Segment
GET /api/v2/master/segment/ageGet list of age range IDs.
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"data": [
{
"id": 10100001,
"name": "13-17"
},
{
"id": 10100008,
"name": "18-20"
},
{
"id": 10100009,
"name": "21-24"
},
{
"id": 10100003,
"name": "25-34"
},
{
"id": 10100004,
"name": "35-44"
},
{
"id": 10100005,
"name": "45-54"
},
{
"id": 10100006,
"name": "55-64"
},
{
"id": 10100007,
"name": "65+"
},
{
"id": 10199999,
"name": "Unknown"
}
],
"totalRecords": 9,
"filteredRecords": 9
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: {
id: number;
name: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getMasterSegmentAge(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v2/master/segment/age',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Language Segment
GET /api/v2/master/segment/languageGet list of languages.
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"data": [
{
"id": 10500007,
"name": "Arabic"
},
{
"id": 10500034,
"name": "Chinese"
},
{
"id": 10500048,
"name": "English"
},
{
"id": 10500056,
"name": "French"
},
{
"id": 10500063,
"name": "German"
},
{
"id": 10500098,
"name": "Korean"
},
{
"id": 10500147,
"name": "Russian"
},
{
"id": 10500164,
"name": "Spanish"
},
{
"id": 10500170,
"name": "Tagalog"
},
{
"id": 10500190,
"name": "Vietnamese"
},
{
"id": 10599998,
"name": "Other"
},
{
"id": 10599999,
"name": "Unknown"
}
],
"totalRecords": 12,
"filteredRecords": 12
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: {
id: number;
name: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getMasterSegmentLanguage(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v2/master/segment/language',
params: {
query?: {
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
order?: `string`,
searchField?: `string`,
campaignId?: `number`,
segmentIds?: `string`,
ids?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Interest Segment
GET /api/v2/master/segment/interestGet list of interests.
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"data": [
{
"id": 10800042,
"name": "Musical instruments"
},
{
"id": 10800058,
"name": "Woodworking"
},
{
"id": 10800075,
"name": "Gardening"
},
{
"id": 10800081,
"name": "Hunting"
},
{
"id": 10800096,
"name": "Photography"
},
{
"id": 10800104,
"name": "Shooting"
},
{
"id": 10800180,
"name": "Fishing"
},
{
"id": 10800203,
"name": "Tennis"
},
{
"id": 10801317,
"name": "Crafts "
},
{
"id": 10801341,
"name": "Golf "
}
],
"totalRecords": 58,
"filteredRecords": 10
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: {
id: number;
name: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getMasterSegmentInterest(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v2/master/segment/interest',
params: {
query?: {
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
order?: `string`,
searchField?: `string`,
campaignId?: `number`,
segmentIds?: `string`,
ids?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Income Range Segment
GET /api/v2/master/segment/incomeGet list of income ranges.
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"data": [
{
"id": 10300001,
"name": "Less than $25000"
},
{
"id": 10300002,
"name": "$25001 - $50000"
},
{
"id": 10300003,
"name": "$50001 - $75000"
},
{
"id": 10300004,
"name": "$75001 - $100000"
},
{
"id": 10300005,
"name": "$100001 - $250000"
},
{
"id": 10300006,
"name": "$250000+"
},
{
"id": 10399999,
"name": "Unknown"
}
],
"totalRecords": 7,
"filteredRecords": 7
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: {
id: number;
name: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getMasterSegmentIncome(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v2/master/segment/income',
params: {
query?: {
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
order?: `string`,
searchField?: `string`,
campaignId?: `number`,
segmentIds?: `string`,
ids?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Ethnicity Segment
GET /api/v2/master/segment/ethnicityGet list of ethnicity IDs.
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"data": [
{
"id": 10600001,
"name": "Afghan",
"parentId": 10799998
},
{
"id": 10600002,
"name": "African/American",
"parentId": 10700003
},
{
"id": 10600003,
"name": "Albanian",
"parentId": 10799998
},
{
"id": 10600004,
"name": "Aleut"
},
{
"id": 10600005,
"name": "Algerian"
},
{
"id": 10600006,
"name": "American",
"parentId": 10799998
},
{
"id": 10600007,
"name": "Andorran"
},
{
"id": 10600008,
"name": "Angolan"
},
{
"id": 10600009,
"name": "Antiguans"
},
{
"id": 10600010,
"name": "Arab",
"parentId": 10799998
}
],
"totalRecords": 219,
"filteredRecords": 10
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: {
id: number;
name: string;
parentId: number;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getMasterSegmentEthnicity(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v2/master/segment/ethnicity',
params: {
query?: {
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
order?: `string`,
searchField?: `string`,
campaignId?: `number`,
segmentIds?: `string`,
ids?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Ethnicity Group Segment
GET /api/v2/master/segment/ethnicity-groupGet list of ethnicity group IDs.
- JSON
- TypeScript
{
"statusCode": 200,
"responseObject": {
"data": [
{
"id": 10700001,
"name": "European"
},
{
"id": 10700002,
"name": "Hispanic"
},
{
"id": 10700003,
"name": "African-American"
},
{
"id": 10700004,
"name": "Asian"
},
{
"id": 10799998,
"name": "Other"
},
{
"id": 10799999,
"name": "Unknown"
}
],
"totalRecords": 6,
"filteredRecords": 6
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
statusCode: number;
responseObject: {
data: {
id: number;
name: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getMasterSegmentEthnicityGroup(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v2/master/segment/ethnicity-group',
params: {
query?: {
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
order?: `string`,
searchField?: `string`,
campaignId?: `number`,
segmentIds?: `string`,
ids?: `string`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get DMA Code Segment
POST /api/v3/master/segment/dmaGet list of Designated Market Area Codes.
Properties | |
---|---|
id integer | DMA ID |
name string | DMA name |
abbreviation string | DMA code |
parentId integer | State ID |
geojsonUrl string | Json geographical data URL |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30900001,
"name": "Portland-Auburn, ME",
"abbreviation": "500",
"parentId": 30200022,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/ME/500.geojson"
},
{
"id": 30900002,
"name": "New York, NY",
"abbreviation": "501",
"parentId": 30200035,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/NY/501.geojson"
},
{
"id": 30900003,
"name": "Binghamton, NY",
"abbreviation": "502",
"parentId": 30200035,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/NY/502.geojson"
},
{
"id": 30900004,
"name": "Macon, GA",
"abbreviation": "503",
"parentId": 30200011,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/GA/503.geojson"
},
{
"id": 30900005,
"name": "Philadelphia, PA",
"abbreviation": "504",
"parentId": 30200039,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/PA/504.geojson"
},
{
"id": 30900006,
"name": "Detroit, MI",
"abbreviation": "505",
"parentId": 30200023,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/MI/505.geojson"
},
{
"id": 30900007,
"name": "Boston, MA-Manchester, NH",
"abbreviation": "506",
"parentId": 30200031,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/NH/506.geojson"
},
{
"id": 30900008,
"name": "Savannah, GA",
"abbreviation": "507",
"parentId": 30200011,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/GA/507.geojson"
},
{
"id": 30900009,
"name": "Pittsburgh, PA",
"abbreviation": "508",
"parentId": 30200039,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/PA/508.geojson"
},
{
"id": 30900010,
"name": "Ft. Wayne, IN",
"abbreviation": "509",
"parentId": 30200016,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/dmadata/geojson/US/IN/509.geojson"
}
],
"totalRecords": 210,
"filteredRecords": 210
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
abbreviation: string;
parentId: number;
geojsonUrl: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getDMACodeDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/dma',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get County Segment
POST /api/v3/master/segment/countyGet list of county segment.
Properties | |
---|---|
id integer | County ID |
name string | County name |
parentId integer | State ID |
geojsonUrl string | Json geographical data URL |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30300001,
"name": "Aleutians East, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300001.geojson"
},
{
"id": 30300002,
"name": "Aleutians West, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300002.geojson"
},
{
"id": 30300003,
"name": "Anchorage, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300003.geojson"
},
{
"id": 30300004,
"name": "Bethel, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300004.geojson"
},
{
"id": 30300005,
"name": "Bristol Bay, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300005.geojson"
},
{
"id": 30300006,
"name": "Denali, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300006.geojson"
},
{
"id": 30300007,
"name": "Dillingham, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300007.geojson"
},
{
"id": 30300008,
"name": "Fairbanks North Star, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300008.geojson"
},
{
"id": 30300009,
"name": "Haines, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300009.geojson"
},
{
"id": 30300010,
"name": "Hoonah Angoon, AK",
"parentId": 30200001,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/countydata/US/AK/geojson/30300010.geojson"
}
],
"totalRecords": 3142,
"filteredRecords": 3142
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
parentId: number;
geojsonUrl: string;
}
}
}
};
};
};
function getCountySegmentDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/county',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Country Segment
POST /api/v3/master/segment/countryGet list of country segment.
Properties | |
---|---|
id integer | County ID |
name string | County name |
abbreviation integer | Country Abbreviation |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30100001,
"name": "United States",
"abbreviation": "US"
},
{
"id": 30100002,
"name": "India",
"abbreviation": "IN"
},
{
"id": 30100011,
"name": "Afghanistan",
"abbreviation": "AF"
},
{
"id": 30100013,
"name": "Albania",
"abbreviation": "AL"
},
{
"id": 30100014,
"name": "Algeria",
"abbreviation": "DZ"
},
{
"id": 30100016,
"name": "Andorra",
"abbreviation": "AD"
},
{
"id": 30100017,
"name": "Angola",
"abbreviation": "AO"
},
{
"id": 30100020,
"name": "Antigua and Barbuda",
"abbreviation": "AG"
},
{
"id": 30100021,
"name": "Argentina",
"abbreviation": "AR"
},
{
"id": 30100022,
"name": "Armenia",
"abbreviation": "AM"
}
],
"totalRecords": 249,
"filteredRecords": 249
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
abbreviation: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getCountrySegmentDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/country',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Congressional District Segment
POST /api/v3/master/segment/congressional-districtGet list of congressional district segment.
Properties | |
---|---|
id integer | County ID |
name string | County name |
abbreviation integer | Country Abbreviation |
parentId integer | State ID |
geojsonUrl string | Json geographical data URL |
- JSON
- TypeScript
{
"pageNo": 1,
"noOfEntries": 10,
"sortBy": "+id",
"searchField": "",
"segmentIds": [],
"ids": []
}
{
"success": true,
"data": {
"data": [
{
"id": 30600502,
"name": "Alabama-1",
"abbreviation": "AL-1",
"parentId": 30200002,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AL/30600502.geojson"
},
{
"id": 30600503,
"name": "Alabama-2",
"abbreviation": "AL-2",
"parentId": 30200002,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AL/30600503.geojson"
},
{
"id": 30600504,
"name": "Alabama-3",
"abbreviation": "AL-3",
"parentId": 30200002,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AL/30600504.geojson"
},
{
"id": 30600505,
"name": "Alabama-4",
"abbreviation": "AL-4",
"parentId": 30200002,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AL/30600505.geojson"
},
{
"id": 30600506,
"name": "Alabama-5",
"abbreviation": "AL-5",
"parentId": 30200002,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AL/30600506.geojson"
},
{
"id": 30600507,
"name": "Alabama-6",
"abbreviation": "AL-6",
"parentId": 30200002,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AL/30600507.geojson"
},
{
"id": 30600508,
"name": "Alabama-7",
"abbreviation": "AL-7",
"parentId": 30200002,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AL/30600508.geojson"
},
{
"id": 30601009,
"name": "Arkansas-1",
"abbreviation": "AR-1",
"parentId": 30200003,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AR/30601009.geojson"
},
{
"id": 30601010,
"name": "Arkansas-2",
"abbreviation": "AR-2",
"parentId": 30200003,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AR/30601010.geojson"
},
{
"id": 30601011,
"name": "Arkansas-3",
"abbreviation": "AR-3",
"parentId": 30200003,
"geojsonUrl": "https://d3jme5si7t6llb.cloudfront.net/districtdata/geojson/cd/AR/30601011.geojson"
}
],
"totalRecords": 429,
"filteredRecords": 429
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
id: number;
name: string;
abbreviation: string;
parentId: number;
geojsonUrl: string;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getCongressionalDistrictSegmentDetails(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/master/segment/congressional-district',
requestBody: {
content: {
"application/json": {
segmentIds?: `array of numbers`,
parentSegmentIds?: `array of numbers`,
ids?: `array of numbers`,
campaignId?: `number`,
pageNo?: `number`,
noOfEntries?: `number`,
sortBy?: `string`,
searchField?: `string`,
order?: [ "asc" | "desc" ]
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}