Skip to main content

Create an Insights report

Create an Insights report with this in-depth tutorial using IQM's API.

The following endpoints are used to check campaigns for eligibility and create different types of Insights reports:

POST
GET
GET
GET
POST
POST
POST
POST
POST
POST
GET
POST

About IQM Insights​

Insights reports are one of IQM's analytics tools that help Advertisers quickly identify trends and apply precise adjustments to deliver better results for campaigns. With pre-defined metrics and dimensions, Insights reports can be generated for the following areas:

  • Campaign Bidding Insights reports capture rejected campaigns and segment them based on rejection reason, allowing you to assess which parameters are limiting a campaign's success.
  • Audience Insights reports provide an in-depth view of audience characteristics, interests, and behaviors to give you a deeper understanding of your target audience and create targeted and personalized advertising strategies.
  • Voter Level Data (VLD) Insights reports offer information about targeting in current or prior political campaigns. These reports include ad exposure, engagement data, demographic data, and voting-history details by voter.
  • Provider Level Data (PLD) Insights reports include details about healthcare professionals targeted in your campaigns, and provide similar details as VLD Insights reports while adhering to healthcare data privacy regulations.

More resources​

Before you begin​

To generate an Insights report, you need an account on the IQM platform (see Getting started). Once you have an account you can log in and review the eligibility requirements table for each kind of Insights report.

Log in​

POST

To log in, send the Authorization: Basic header with your Base64-encoded Client ID and Client Secret, and send the request body as form data (application/x-www-form-urlencoded). The response contains an OAuth access token.

To find the Organization Workspace IDs that you have access to, use Get list of accessible Organizations.

For further information see OAuth token.

Headers
Authorization
string required
Basic followed by your Base64-encoded client_id:client_secret.
See Sign up and authenticate.
Content-Type
string required
application/x-www-form-urlencoded. Send the request body as form data.
Request schema
grant_type
string required
password for login.
See OAuth Grant Types.
username
string required
User account email.
password
string required
User account password.
Request sample
curl -i --location 'https://api.iqm.com/api/v3/ua/oauth/token' \
--header 'accept: application/json, text/plain, */*' \
--header 'Authorization: Basic <base64 of client_id:client_secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=user@iqm.com' \
--data-urlencode 'password=<your password>'
Response 200
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIn0...",
"scope": "read write",
"token_type": "bearer",
"expires_in": 86399
}
More responses
Response 401
{
"success": false,
"errorObjects": [
{
"error": "Bad Credentials or invalid grant type"
}
]
}
Response 403
{
"error": "Client details are not provided."
}

Authentication​

Use the following header parameters for all requests after logging in:

Headers
Authorization
string required
Bearer followed by the access_token from the login response.
See Sign up and authenticate.
X-IAA-OW-ID
integer required
Organization Workspace ID header.

Eligibility requirements​

The table below outlines the eligibility requirements for each Insights report type and includes relevant resources. Click on a type to jump to the instructions for generating that Insights report.

You can also use Get eligible campaigns with reportType set to VLD or PLD to list the campaigns that meet the VLD or PLD requirements.

TypeRequirementsResources
Campaign Bidding Insights reportCampaign requirements:
  • More than 1 impression
  • Status: "running", "paused", or "expired". The report covers at most 14 days, so choose dates when the campaign was delivering
  • Type: "advanced"
Campaign API guidelines
Create new campaign
Campaign status type ID
Campaign type ID
Audience Insights reportAudience requirements:
  • Type: Matched audience
  • Status: "ready"
  • Reach: 10,000+
  • (Recommended) Creation date within the last year
Upload a Matched audience
Audience API guidelines
Audience status type ID
Audience type ID
VLD Insights reportCampaign requirements:
  • Must be a political campaign
  • Status: "running", "paused", or "expired" (within last two years)
  • Must have duration of 3 or more days
  • Creation date: Sept. 16, 2024 or later
  • Voter location: all US states (except Oregon)
  • Audience type: Matched audience
PLD Insights reportCampaign requirements:
  • Must be healthcare campaign
  • Status: "running", "expired" (within the past 90 days), or "paused" (within the past 90 days)
  • Must have duration of 7 or more days
  • Up to 50 eligible campaigns from the same insertion order (IO) per report
  • Audience type: Matched audience created from NPI IDs or from raw data. Patient Matched audiences aren't eligible
ABM audience details

Campaign Bidding Insights report​

Step 1: Check campaign for eligibility​

GET

To generate a Campaign Bidding Insights report, use the campaignId and the Get campaign details endpoint to check if the eligibility requirements are met.

The endpoint returns a JSON schema of campaign details; the relevant parameters are highlighted in the sample Response 200 code block. A campaign type of 1 means it's an "advanced" campaign. In the sample response the status is running, and the impressions count is 5. This campaign meets the eligibility requirements to generate an Insights report.

Path parameters
campaignId
integer
Campaign ID
Response 200
{
"statusCode": 200,
"responseObject": {
"owId": 203578,
"parentOrganizationName": "Signup testing 1",
"id": 537599,
"uowId": 188494,
"campaignName": "TestCampaign",
"advertiserDomain": "https://iqm.com",
"creativeType": 11,
"campaignType": 1,
"totalBudgetPacing": true,
"isTvAd": false,
"budgetDay": 1199.08,
"budgetTotal": 50000.0,
"maxBid": 15.0,
"minBid": 0.0,
"allowedMinBid": 0.0,
"timezone": 29,
"startTime": 1726518001,
"endTime": 1727668800,
"status": "running",
"dspMargin": 0,
"platformMargin": 0,
"userDealMargin": 0,
"spentScale": false,
"creativeIds": "676384",
"conversionType": "None",
"bidOptimization": true,
"bidPacing": true,
"isBidShading": false,
"impressionCapping": 999,
"frequencyCapEnabled": true,
"frequencyCapping": {
"1": {
"frequencyCapDuration": 1,
"frequencyCapValue": 999
}
},
"maxDayClicks": 0,
"maxDayConversions": 0,
"totalImpressions": 5,
"totalClicks": 0,
"totalConversions": 0,
"deviceType": "13,15,11,12",
"trafficType": "11,12",
"exchanges": "",
"isLocationWithOrFilter": true,
"countryId": "30100001",
"locationDetails": {},
"whiteListedCustomAudienceIds": "1161677",
"isCampaignFromNewPlatform": true,
"whiteListedAudienceIds": "1161677",
"campaignIabCategoryIds": "11,12,13,14,15",
"organizationName": "User's Org",
"userEmail": "user@example.com",
"userName": "Jane Smith",
"isUnapprovedAudienceTargeted": false,
"isAllAudienceUnapproved": false,
"createDate": 1726517360,
"ioId": 15844,
"ioName": "Test2",
"prebidAudienceSegmentIdList": [],
"campaignTypeId": 1,
"budgetTypeId": 1,
"isEstimatorAvailable": true,
"isAdvanceAudioVideoTargeted": false,
"isEditAccess": true,
"isParentInvoiceTemplateSet": true,
"isMarginSet": true,
"isApprovalAccess": false
}
}

Step 2: Generate Campaign Bidding Insights report​

GET

Once a campaign is determined eligible, you can generate a Campaign Bidding Insights report. Pass the campaignId in the endpoint's path and use the query parameters to specify the date range of the report (maximum two weeks). The response can take up to about two minutes for campaigns with a lot of bid traffic.

This endpoint returns a list of rejection reasons for why the campaign's bid requests were dropped. The number of bids won is also returned.

Path parameters
campaignId
integer
Campaign ID.
Query parameters
dateRangeStart
integer
Unix epoch timestamp, in milliseconds.
dateRangeEnd
integer
Unix epoch timestamp, in milliseconds.
Response properties
totalRequests
integer
Total bid requests evaluated for the campaign in the date range.
rejectionList
object
Bid rejection reasons, keyed by rejection category, e.g. locationTargeting, creativeSettings, audienceTargeting, optimizationAndDelivery, campaignBudget, inventoryTargeting, deviceTargeting, or other. Only categories with rejected bids are included.
rejectionList category object properties
title
string
Category display name.
rejectedBids
integer
Rejected bids count for the category.
description
string
Rejection description. Only present when the category has no sub-reasons.
subReasonInfo
object
Sub-reasons for the category, keyed by sub-reason name (see subReasonInfo keys below); empty when the category has no sub-reasons.
subReasonInfo object properties
title
string
Sub-reason display name.
droppedRequests
integer
Dropped bid requests count for the sub-reason.
description
string
Sub-reason description.
topMainReasons
object
Name-value pairs of rejectionList category and rejectedBids count, for the categories with the most rejected bids.
topSubReasons
object
Name-value pairs of sub-reason and droppedRequests count, for the sub-reasons with the most dropped requests.
totalBids
integer
Total bids count.
lostBids
integer
Lost bids count.
totalWins
integer
Total won bids count.

subReasonInfo keys
inactiveAccountBids dropped off because Advertiser's account with IQM is inactive.
insufficientBalanceBids dropped off because there is an insufficient balance in your account.
creativeRollPositionBids dropped off because the roll position (pre-, mid-, post-roll) didn't match the campaign's required roll position.
creativePlayerSizeBids dropped off because player size did not match campaign's required player size.
ioBudgetBids dropped off because budget on the campaign's associated IO has spent in full.
audienceUnavailableBids dropped off because audience did not match campaign's Audience targeting parameters.
creativeUnavailableBids dropped off due to the campaign's creative settings, such as creative type, dimensions, duration and others.
campaignBidPriceBids dropped off because the bid price is lower than the floor price recived from the exchange.
operatingSystemBids dropped off because Operating System did not match the campaign's Operating System requirements.
manufacturerBids dropped off because the Manufacturer did not match the campaign's Manufacturer parameters.
deviceTypeBids dropped off because the Device Type did not match the campaign's Device Type targeting parameters.
channelsBids dropped off because Channels did not match the campaign's Channel Targeting Parameters.
networkTypesBids dropped off because Network Type did not match the campaign's Network Type requirements.
carrierBids dropped off because Carrier did not match the campaign's Carrier requirements.
stateBids dropped off because the state did not match the campaign's state requirements.
creativeTypeBids dropped off because Creative Type did not match campaign's Creative Type requirements.
matchedAudienceBids dropped off because Audience did not match campaign's Matched Audience targeting parameters.
budgetAllocationConsumedBids dropped off because the allocated budget, based on pacing guidelines, has been exhausted.
Response 200
{
"success": true,
"data": {
"totalRequests": 1628200,
"rejectionList": {
"locationTargeting": {
"title": "Location Targeting",
"rejectedBids": 389204,
"subReasonInfo": {
"state": {
"title": "State",
"droppedRequests": 389204,
"description": "Bids dropped off because the state did not match the campaign's state requirements"
}
}
},
"creativeSettings": {
"title": "Creative Settings",
"rejectedBids": 62,
"subReasonInfo": {
"creativeType": {
"title": "Creative Type",
"droppedRequests": 62,
"description": "Bids dropped off because Creative Type did not match campaign's Creative Type requirements"
}
}
},
"audienceTargeting": {
"title": "Audience Targeting",
"rejectedBids": 1113949,
"subReasonInfo": {
"matchedAudience": {
"title": "Matched Audience",
"droppedRequests": 1113949,
"description": "Bids dropped off because Audience did not match campaign's Matched Audience targeting parameters"
}
}
},
"optimizationAndDelivery": {
"title": "Optimization & Delivery",
"rejectedBids": 17895,
"subReasonInfo": {
"budgetAllocationConsumed": {
"title": "Budget Allocation Consumed (Pacing/Delivery)",
"droppedRequests": 17895,
"description": "Bids dropped off because the allocated budget, based on pacing guidelines, has been exhausted"
}
}
},
"campaignBudget": {
"title": "Campaign Budget",
"rejectedBids": 9653,
"description": "Bids dropped off because the total or daily budget was fully consumed.",
"subReasonInfo": {}
},
"other": {
"title": "Other",
"rejectedBids": 96528,
"description": "Bids dropped off due to back-end bidder settings that are typically used for campaign efficiency. Please see your account manager for more information.",
"subReasonInfo": {}
}
},
"topMainReasons": {
"audienceTargeting": 1113949,
"optimizationAndDelivery": 17895,
"locationTargeting": 389204,
"creativeSettings": 62,
"campaignBudget": 9653
},
"topSubReasons": {
"matchedAudience": 1113949,
"budgetAllocationConsumed": 17895,
"state": 389204,
"creativeType": 62
},
"totalBids": 909,
"lostBids": 535,
"totalWins": 374
}
}
Response 422 (end date before start date)
{
"success": false,
"errorObjects": [
{
"error": "Date Range End must be greater than Date Range Start."
}
]
}
Response 422 (date range over two weeks)
{
"success": false,
"errorObjects": [
{
"error": "The difference between start and end date must not be greater than 2 weeks."
}
]
}

Audience Insights report​

Step 1: Check for eligible audiences​

GET

To generate an Audience Insights report, first use this endpoint to retrieve a list of eligible audiences.

Query parameters
searchField
string
Filter results by search field.
pageSize
integer
Number of entries returned per page, default: 20.
pageNo
integer
Page number of retrieved data.
sortBy
string
Sorts by ascending (+) or descending (-), default: -id.
Response properties
totalRecords
integer
Total number of eligible audiences.
filteredRecords
integer
Number of eligible audiences matching searchField.
insightsData
array of objects
Eligible audiences.
insightsData object properties
id
integer
Audience ID.
audienceName
string
Audience name.
matchRate
number
The percentage of matched records compared to a reference set.
uniques
integer
Count of unique audiences reached.
insightsStatus
integer
Insights status ID of the audience: 1 (Processing), 2 (Ready), or 3 (Failed).
Response 200
{
"success": true,
"data": {
"totalRecords": 8,
"filteredRecords": 8,
"insightsData": [
{
"id": 1183286,
"audienceName": "audience1",
"matchRate": 74.74,
"uniques": 537354,
"insightsStatus": 3
},
{
"id": 1183283,
"audienceName": "audience2",
"matchRate": 69.23,
"uniques": 163629,
"insightsStatus": 3
},
{
"id": 1183002,
"audienceName": "audience3",
"matchRate": 73.04,
"uniques": 74729,
"insightsStatus": 3
}
]
}
}

Step 2: Generate Audience Insights report​

POST

Pass the audience id (from the response data in step 1) in the Source IDs array to generate the Audience Insights report with this endpoint.

Request schema
insightsTypeId
integer
Insights type ID: 1 for Audience Insights.
sourceIds
array of integers
Audience IDs to generate insights for.
Response properties
invalidSourceIds
array of integers
Invalid source IDs list.
insightsData
array of objects
Created Audience Insights reports, one per valid source ID.
insightsData object properties
id
integer
Audience Insights ID.
typeId
integer
Insights type ID.
statusId
integer
Insights status ID.
sourceName
string
Source name.
name
string
Insights name.
sourceId
integer
Source ID.
createdAt
integer
Unix epoch timestamp of Insights creation date, in milliseconds.
Request sample
{
"insightsTypeId": 1,
"sourceIds": [
567895,
925436,
123677
]
}
Response 200
{
"success": true,
"data": {
"invalidSourceIds": [],
"insightsData": [
{
"id": 2098,
"typeId": 1,
"statusId": 1,
"sourceName": "audience1",
"name": "audience1_insights",
"sourceId": 1183285,
"createdAt": 1793036686825
}
]
}
}

Step 3: Download Audience Insights report​

POST

Pass the Insights id (from the response data in step 2) in the insightsId form field, along with your desired file type, to generate a download link for your Audience Insights report.

Request schema (multipart/form-data)
insightsId
integer required
Your Insights ID (id from step 2).
fileType
string required
File type of report: pdf or xlsx.
customLogoFile
file
Optional logo image to show on the report.
Response properties
insightsReportUrl
string
Audience Insights report URL.
Request sample
curl -X POST https://api.iqm.com/api/v3/ins/insights/download \
-H "Authorization: Bearer <access_token>" \
-H "X-IAA-OW-ID: <owId>" \
-F 'insightsId=2098' \
-F 'fileType=pdf' \
-F 'customLogoFile=@/path/to/logo.png'
Response 200
{
"success": true,
"data": {
"insightsReportUrl": "https://iqm-insights-stage.s3.amazonaws.com/audiences/client_id%3D204995/audience_id%3D1183285/default_insight.pdf?..."
}
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Please provide valid insights id value."
}
]
}

VLD Insights report​

Step 1: Check campaign for eligibility​

GET

To generate a VLD Insights report, first use the campaignId and the Get campaign details endpoint to check if the eligibility requirements are met.

The endpoint returns a JSON schema of campaign details (the relevant parameters are highlighted in the sample Response 200 code block):

  • The status is running.
  • createDate indicates when the campaign was created (in Unix epoch seconds).
  • startTime and endTime indicate the campaign's duration, in Unix epoch seconds.
  • A Country ID of 30100001 indicates the targeted audience is in the US.
Path parameters
campaignId
integer
Campaign ID
Response 200
{
"statusCode": 200,
"responseObject": {
"owId": 203578,
"parentOrganizationName": "Signup testing 1",
"id": 537599,
"uowId": 188494,
"campaignName": "TestCampaign",
"advertiserDomain": "https://iqm.com",
"creativeType": 11,
"campaignType": 1,
"totalBudgetPacing": true,
"isTvAd": false,
"budgetDay": 1199.08,
"budgetTotal": 50000.0,
"maxBid": 15.0,
"minBid": 0.0,
"allowedMinBid": 0.0,
"timezone": 29,
"startTime": 1726518001,
"endTime": 1727668800,
"status": "running",
"dspMargin": 0,
"platformMargin": 0,
"userDealMargin": 0,
"spentScale": false,
"creativeIds": "676384",
"conversionType": "None",
"bidOptimization": true,
"bidPacing": true,
"isBidShading": false,
"impressionCapping": 999,
"frequencyCapEnabled": true,
"frequencyCapping": {
"1": {
"frequencyCapDuration": 1,
"frequencyCapValue": 999
}
},
"maxDayClicks": 0,
"maxDayConversions": 0,
"totalImpressions": 5,
"totalClicks": 0,
"totalConversions": 0,
"deviceType": "13,15,11,12",
"trafficType": "11,12",
"exchanges": "",
"isLocationWithOrFilter": true,
"countryId": "30100001",
"locationDetails": {},
"whiteListedCustomAudienceIds": "1161677",
"isCampaignFromNewPlatform": true,
"whiteListedAudienceIds": "1161677",
"campaignIabCategoryIds": "11,12,13,14,15",
"organizationName": "User's Org",
"userEmail": "user@example.com",
"userName": "Jane Smith",
"isUnapprovedAudienceTargeted": false,
"isAllAudienceUnapproved": false,
"createDate": 1726517360,
"ioId": 15844,
"ioName": "Test2",
"prebidAudienceSegmentIdList": [],
"campaignTypeId": 1,
"budgetTypeId": 1,
"isEstimatorAvailable": true,
"isAdvanceAudioVideoTargeted": false,
"isEditAccess": true,
"isParentInvoiceTemplateSet": true,
"isMarginSet": true,
"isApprovalAccess": false
}
}

Step 1.1: Check campaign audience type​

POST

Pass the campaignId to check its audience. Audience type ID 1 indicates this campaign has a Matched audience.

Request schema
campaignIds
array of integers
Campaign IDs.
Response properties
data
object
Name-value pairs of campaign ID and an array of the audience types and audiences the campaign targets (empty array if none).
Campaign ID array item properties
audienceTypeId
integer
Audience type ID.
Supported values
1Matched audience
2Segmented audience
3Retargeted audience
4Geofarmed audience
5Contextual audience
6Lookalike audience
7Campaign audience
8Pre-bid audience
9Account Based Marketing (ABM) audience
10Custom Voter audience (CVA)
11Integrated Care Team (ICT) audience
12Power Segment audience
audienceIds
array of integers
Audience IDs.
Request sample
{
"campaignIds": [
543363,
553441,
553443
]
}
Response 200
{
"success": true,
"data": {
"543363": [],
"553441": [
{
"audienceTypeId": 1,
"audienceIds": [
1101833,
1101834,
1101835,
1102476
]
}
],
"553443": [
{
"audienceTypeId": 1,
"audienceIds": [
1101831,
1101835,
1102476
]
},
{
"audienceTypeId": 9,
"audienceIds": [
1124205,
1124206
]
}
]
}
}

Step 2: Generate VLD Insights report​

POST

Once the desired campaign has been determined eligible, pass the campaignId in the request schema (along with vldStartDate and vldEndDate) to generate a VLD Insights report. The dates are in Unix epoch milliseconds and must fall within the campaign's flight.

VLD Insights reports are charged per impression. Before generating, send the same request body to Get cost assessment for VLD Insights report to see the chargeable impressions and cost. If your funds don't cover the cost, generating still returns 200, but vldReportCreatable is false and no report is created.

Request schema
vldStartDate
integer
Unix epoch timestamp of start date, in milliseconds.
vldEndDate
integer
Unix epoch timestamp of end date, in milliseconds.
campaignId
integer
Campaign ID.
Response properties
vldId
integer
VLD Insights report ID; 0 when no report was created.
vldName
string
VLD Insights report name.
vldStartDate
integer
Unix epoch timestamp of start date, in milliseconds.
vldEndDate
integer
Unix epoch timestamp of end date, in milliseconds.
campaignId
integer
Campaign ID.
campaignName
string
Campaign name.
creativeTypeId
integer
Campaign creative type ID.
vldReportCreatable
boolean
Indicates the VLD Insights report can be (and was) generated: true. false when an identical report exists, an overlapping report is still processing, the campaign served no impressions in the range, or funds are insufficient.
vldChargeableImps
integer
Impressions billed for the report: impressions in the date range not already paid for by an earlier VLD Insights report.
vldChargedImps
integer
Impressions in the date range already paid for by an earlier VLD Insights report.
vldChargeableCost
number
Charge for the report, in USD: vldChargeableImps × effectiveVldRate / 1000.
vldChargedCost
number
Cost already paid for vldChargedImps, in USD (not charged again).
fundsAvailable
boolean
Indicates the account has enough available funds to cover vldChargeableCost: true.
effectiveVldRate
number
VLD Insights rate per 1,000 impressions (CPM), in USD.
message
string
Reason the report can't be generated, or a status message. Only present when set.
Request sample
{
"campaignId": 590511,
"vldStartDate": 1777297800000,
"vldEndDate": 1780286400000
}
Response 200
{
"success": true,
"data": {
"vldId": 6301,
"vldName": "590511_VLD_Insights_1",
"vldStartDate": 1777297800000,
"vldEndDate": 1780286400000,
"campaignId": 590511,
"campaignName": "Test Campaign for VLD",
"creativeTypeId": 15,
"vldReportCreatable": true,
"vldChargeableImps": 5701,
"vldChargedImps": 0,
"vldChargeableCost": 17.103,
"vldChargedCost": 0.0,
"fundsAvailable": true,
"effectiveVldRate": 3.0
}
}
Response 200 (report not creatable)
{
"success": true,
"data": {
"vldId": 0,
"vldName": "590511_VLD_Insights_1",
"vldStartDate": 1777297800000,
"vldEndDate": 1780286400000,
"campaignId": 590511,
"campaignName": "Test Campaign for VLD",
"creativeTypeId": 15,
"vldReportCreatable": false,
"vldChargeableImps": 5701,
"vldChargedImps": 0,
"vldChargeableCost": 17.103,
"vldChargedCost": 0.0,
"fundsAvailable": false,
"effectiveVldRate": 3.0
}
}

Step 3: Download VLD Insights report​

POST

Get a download link for a VLD insight Report in CSV or XLSX format.

The generate response doesn't include the new report's ID (vldId is 0), and the report takes time to build. To find its ID, use Get list of VLD Insights reports and wait until the report's status is Ready. Send that ID as reportId.

Request schema
fileTypeId
integer required
File type ID
XLSX: 1
CSV: 2.
reportId
integer required
Your VLD Insights report ID.
Response properties
reportURL
string
Presigned VLD Insights report file URL.
Request sample
{
"fileTypeId": 1,
"reportId": 6301
}
Response 200
{
"success": true,
"data": {
"reportURL": "https://iqm-insights-stage.s3.amazonaws.com/vld-campaigns/ow_id%3D204851/report_id%3D6301/590511_VLD_Insights_1.xlsx?..."
}
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Please provide valid insights id value."
}
]
}

PLD Insights report​

Step 1: Check campaign for eligibility​

GET

To generate a PLD Insights report, first use the campaignId and the Get campaign details endpoint to check if the eligibility requirements are met.

The endpoint returns a JSON schema of campaign details (the relevant parameters are highlighted in the sample Response 200 code block):

  • The status is running.
  • startTime and endTime indicate the campaign's duration, in Unix epoch seconds.
Path parameters
campaignId
integer
Campaign ID
Response 200
{
"statusCode": 200,
"responseObject": {
"owId": 203578,
"parentOrganizationName": "Signup testing 1",
"id": 537599,
"uowId": 188494,
"campaignName": "TestCampaign",
"advertiserDomain": "https://iqm.com",
"creativeType": 11,
"campaignType": 1,
"totalBudgetPacing": true,
"isTvAd": false,
"budgetDay": 1199.08,
"budgetTotal": 50000.0,
"maxBid": 15.0,
"minBid": 0.0,
"allowedMinBid": 0.0,
"timezone": 29,
"startTime": 1726518001,
"endTime": 1727668800,
"status": "running",
"dspMargin": 0,
"platformMargin": 0,
"userDealMargin": 0,
"spentScale": false,
"creativeIds": "676384",
"conversionType": "None",
"bidOptimization": true,
"bidPacing": true,
"isBidShading": false,
"impressionCapping": 999,
"frequencyCapEnabled": true,
"frequencyCapping": {
"1": {
"frequencyCapDuration": 1,
"frequencyCapValue": 999
}
},
"maxDayClicks": 0,
"maxDayConversions": 0,
"totalImpressions": 5,
"totalClicks": 0,
"totalConversions": 0,
"deviceType": "13,15,11,12",
"trafficType": "11,12",
"exchanges": "",
"isLocationWithOrFilter": true,
"countryId": "30100001",
"locationDetails": {},
"whiteListedCustomAudienceIds": "1161677",
"isCampaignFromNewPlatform": true,
"whiteListedAudienceIds": "1161677",
"campaignIabCategoryIds": "11,12,13,14,15",
"organizationName": "User's Org",
"userEmail": "user@example.com",
"userName": "Jane Smith",
"isUnapprovedAudienceTargeted": false,
"isAllAudienceUnapproved": false,
"createDate": 1726517360,
"ioId": 15844,
"ioName": "Test2",
"prebidAudienceSegmentIdList": [],
"campaignTypeId": 1,
"budgetTypeId": 1,
"isEstimatorAvailable": true,
"isAdvanceAudioVideoTargeted": false,
"isEditAccess": true,
"isParentInvoiceTemplateSet": true,
"isMarginSet": true,
"isApprovalAccess": false
}
}

Step 1.1: Check campaign audience details​

POST

Pass the campaignId to check its audience. Audience type ID 1 indicates this campaign has a Matched audience.

Request schema
campaignIds
array of integers
Campaign IDs.
Response properties
data
object
Name-value pairs of campaign ID and an array of the audience types and audiences the campaign targets (empty array if none).
Campaign ID array item properties
audienceTypeId
integer
Audience type ID.
Supported values
1Matched audience
2Segmented audience
3Retargeted audience
4Geofarmed audience
5Contextual audience
6Lookalike audience
7Campaign audience
8Pre-bid audience
9Account Based Marketing (ABM) audience
10Custom Voter audience (CVA)
11Integrated Care Team (ICT) audience
12Power Segment audience
audienceIds
array of integers
Audience IDs.
Request sample
{
"campaignIds": [
543363,
553441,
553443
]
}
Response 200
{
"success": true,
"data": {
"543363": [],
"553441": [
{
"audienceTypeId": 1,
"audienceIds": [
1101833,
1101834,
1101835,
1102476
]
}
],
"553443": [
{
"audienceTypeId": 1,
"audienceIds": [
1101831,
1101835,
1102476
]
},
{
"audienceTypeId": 9,
"audienceIds": [
1124205,
1124206
]
}
]
}
}

Step 2: Create a PLD report template​

POST

PLD Insights reports are created from report templates. A template sets the campaigns, date range, and schedule. With a one-time frequency (frequencyId 1), the template generates a single report right away.

PLD Insights reports are charged per impression. Before creating the template, use Calculate Insights computation with category set to pld, the same campaignIds, and the report's startDate and endDate to see the chargeable impressions and cost. If the computation returns reportCreatable false, for example because your funds don't cover the cost, the report fails.

For further information see Create report template.

Request schema
name
string required
Template name, 3 to 100 characters.
campaignIds
array of integers required
IDs of eligible campaigns from the same IO, up to 50.
frequencyId
integer required
Scheduling frequency ID. Use 1 for a one-time report.
frequencyDetails
object required
Schedule details. Send an empty object ({}) for a one-time report.
startDate
integer required
Unix epoch timestamp of the report start date, in milliseconds. Must fall within the campaigns' flight.
endDate
integer
Unix epoch timestamp of the report end date, in milliseconds. Must fall within the campaigns' flight.
aggregationEnabled
boolean required
Set to true to aggregate data across the campaigns.
recipientEmails
array of strings
Email addresses that receive the report, up to 15.
status
string required
ACTIVE to generate reports, or INACTIVE.
category
string required
pld for a PLD Insights report.
Response properties
templateId
integer
ID of the new template. Use it in Step 3.
nextRunDate
integer
Unix epoch timestamp of the next scheduled run, in milliseconds.
Request sample
{
"name": "PLD report for IO 25016",
"campaignIds": [590512],
"frequencyId": 1,
"frequencyDetails": {},
"startDate": 1778904000000,
"endDate": 1779336000000,
"aggregationEnabled": false,
"recipientEmails": [
"user@example.com"
],
"status": "ACTIVE",
"category": "pld"
}
Response 200
{
"success": true,
"data": {
"templateId": 789,
"nextRunDate": 1793126817471
}
}

Step 3: Get the template's reports​

GET

Use the templateId from Step 2 to list the reports the template generated. The report takes time to build. When its statusId is 3 (success), use its reportId in Step 4.

For further information see Get template reports.

Path parameters
templateId
integer required
Template ID from Step 2.
Response properties
reportId
integer
Report ID. Use it in Step 4.
name
string
Report name.
statusId
integer
Report status: 1 (queued), 2 (processing), 3 (success), 4 (failed), or 5 (skipped).
requestedStartDate
integer
Unix epoch timestamp of the report start date, in milliseconds.
requestedEndDate
integer
Unix epoch timestamp of the report end date, in milliseconds.
generatedAt
integer
Unix epoch timestamp of when the report run started, in milliseconds.
Response 200
{
"success": true,
"data": {
"data": [
{
"reportId": 8870,
"name": "25016_PLD_Insights_3",
"statusId": 3,
"frequencyId": 1,
"requestedStartDate": 1778904000000,
"requestedEndDate": 1779336000000,
"generatedAt": 1793126817957,
"filePaths": {},
"fileSizes": {
"csvBytes": 15359,
"xlsxBytes": 13034
}
}
],
"totalRecords": 1,
"filteredRecords": 1,
"statusSummary": [
{
"id": 3,
"count": 1
}
],
"frequencySummary": [
{
"id": 1,
"count": 1
}
]
}
}

Step 4: Download PLD Insights report​

POST

Get a download link for a PLD Insights report in CSV or XLSX format.

For further information see Download report.

Use the reportId from Step 3, once its statusId is 3 (success).

Request schema
fileTypeId
integer required
File type ID
XLSX: 1
CSV: 2.
reportId
integer required
Report ID from Step 3.
Response properties
reportURL
string
Presigned PLD Insights report file URL.
Request sample
{
"fileTypeId": 1,
"reportId": 6287
}
Response 200
{
"success": true,
"data": {
"reportURL": "https://iqm-insights-stage.s3.amazonaws.com/pld-campaigns/ow_id%3D204995/report_id%3D6287/25016_PLD_Insights_1.xlsx?..."
}
}
More responses
Response 422 (invalid report ID)
{
"success": false,
"errorObjects": [
{
"error": "Please provide valid insights id value."
}
]
}
Response 422 (invalid file type)
{
"success": false,
"errorObjects": [
{
"error": "Unsupported file type provided"
}
]
}
Have a question?
Was this page helpful?