Finance API
The Finance API allows you to access finance details and lists, and manage invoices, credit, and payment.
This page covers the methods and endpoints associated with finance operations.
For details on how to access and manage fees associated with Provider Level Data (PLD), ScriptLift Studies (SLS), and Voter Level Data (VLD) reports, see the Healthcare Finance API and Political Finance API Guidelines.
For more information on financial operations see the following Help Center articles:
- Spending Reporting Metrics Overview
- Cost Reporting Metrics Overview
- Add or Manage a Margin
- Add and Manage Funds
Authentication
Use the following header parameters for all requests:
| Headers | |
|---|---|
Authentication string required | Authentication bearer token See Authentication Guide |
X-IAA-OW-ID integer required | Organization Workspace ID Header |
Finance Details
Get Customer Finance Details
GETGet an overview of a Customer's finance details.
| Query Parameters | |
|---|---|
owId integer | Organization Workspace ID |
isFinanceRequest boolean | Represents whether request came from finance tab in Customer app For Customer Management Tab: false For Finance Tab: true |
year integer | Year for data |
Response Properties
pendingCampaigns integer | Number of Campaigns in pending status (see Campaign API Guidelines for more info on statuses) |
runningCampaigns integer | Number of Campaigns in running status (see Campaign API Guidelines for more info on statuses) |
totalCampaigns integer | Total number of Campaigns associated with Customer |
dataCost integer | Data cost applied on Campaigns of a given Customer |
actualSpent integer | Amount of media spending by Customer |
credits integer | Customer credits |
balance integer | Funds balance of Customer |
spent integer | Total Campaign spending (media and data) by Customer |
earning integer | Earnings made by Organization |
- JSON
- TypeScript
{
"success": true,
"data": {
"pendingCampaigns": 15,
"runningCampaigns": 10,
"totalCampaigns": 48,
"dataCost": 0,
"actualSpent": 0,
"credits": 0,
"balance": 30430.75,
"spent": 0,
"earning": 0
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
pendingCampaigns: number;
runningCampaigns: number;
totalCampaigns: number;
dataCost: number;
actualSpent: number;
credits: number;
balance: number;
spent: number;
earning: number;
};
};
};
};
}
function GetCustomerOverview(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/financial-details',
params: {
query: {
owId: `number`,
isFinanceRequest: `boolean`,
year: `number`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Customer Margin Details
GETGet Customer margin details by margin type.
| Query Parameters | |
|---|---|
marginTypeIds string | Margin type ID 1: Gross margin |
owId integer | Organization Workspace ID |
Response Properties
marginTypeId integer | Margin type ID 1: Gross margin |
marginType string | Type of margin caluclated or applied |
marginValue integer | The value set for the requested margin type for the Customer |
isBidShadingEnabled boolean | Indicates if bid shading is enabled |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 1,
"data": [
{
"marginTypeId": 1,
"marginType": "Gross Margin",
"marginValue": 15
}
],
"filteredRecords": 1,
"isBidShadingEnabled": false
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
data: {
marginTypeId: number;
marginType: string;
marginValue: number;
}[];
filteredRecords: number;
isBidShadingEnabled: boolean;
};
};
};
};
}
function getCustomerMargin(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/view-margin',
params: {
query: {
marginTypeIds: `string`,
owId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Customer Margin Details
POSTUpdate a Customer's margin settings.
| Request Schema | |
|---|---|
owId integer | Organization Workspace ID |
marginTypeId integer | Margin type ID 1: Gross margin |
marginValue integer | The value set for the requested margin type for the Customer |
campaignId integer | Campaign ID |
email string | Email address |
username string | Username |
workspaceMargin integer | Workspace margin value |
organizationMargin integer | Organization margin value |
- JSON
- TypeScript
{
"owId": 202318,
"marginTypeId": 1,
"marginValue": 15
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
}
function editCustomerMargin(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/fa/customer/edit-margin',
requestBody: {
content: {
"application/json": {
email?: `string`,
username?: `string`,
campaignId?: `number`,
workspaceMargin?: `number`,
organizationMargin?: `number`,
marginTypeId?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Organization Margin Settings
GETGet margin settings for the Organization workspace, including the default margin applied to newly onboarded Customers.
Response Properties
totalRecords integer | Total number of margin settings records | |||||||
filteredRecords integer | Number of filtered records | |||||||
data array | List of margin settings | |||||||
| ||||||||
marginTypeId integer | Margin type ID 1: Gross Margin |
marginType string | Margin type name |
marginValue integer | Margin value |
- JSON
- TypeScript
{
"success": true,
"data": {
"totalRecords": 2,
"data": [
{
"marginTypeId": 1,
"marginType": "Gross Margin",
"marginValue": 20
}
],
"filteredRecords": 1
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access this api"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
totalRecords: number;
data: {
marginTypeId: number;
marginType: string;
marginValue: number;
}[];
filteredRecords: number;
};
};
};
};
}
function GetOrganizationMarginSettings(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/organization/margin-settings',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Organization Margin Settings
POSTUpdate margin settings for the Organization workspace. For example, set a default margin to be applied to newly onboarded Customers.
| Request Schema | |
|---|---|
marginTypeId integer | Margin type ID 1: Gross margin |
marginValue integer | Margin value (between 1 and 99) |
Response Properties
success boolean | Indicates successful update: true |
data string | Success message |
- JSON
- TypeScript
{
"marginTypeId": 1,
"marginValue": 10
}
{
"success": true,
"data": "Margin settings updated successfully."
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access this api"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "Invalid marginTypeId : 2"
}
]
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: string;
};
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
}
function UpdateOrganizationMarginSettings(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/fa/organization/margin-settings',
requestBody: {
content: {
"application/json": {
marginTypeId: `number`,
marginValue: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Campaign Margin Details
GETGet a list of Campaign margin details.
| Query Parameters | |
|---|---|
owId integer | Organization Workspace ID |
searchField string | Filter results by search field |
isEdit boolean | Indicates if user has edit access for the requested resources |
Response Properties
default string | |
campaignId integer | Campaign ID |
campaignName string | Campaign name |
status string | Campaign status |
creativeTypeId string | Creative Type ID |
campaignMargin integer | Campaign margin |
isDefault boolean |
- JSON
- TypeScript
{
"success": true,
"data": {
"data": [
{
"default": false,
"campaignId": 192476,
"campaignName": "Start_Track_Reach2",
"status": "running",
"creativeTypeId": 13,
"campaignMargin": 0,
"isDefault": false
}
],
"totalRecords": 1,
"filteredRecords": 1
}
}
See TypeScript Prerequisites for usage.
Get Customer PG Fees Details
GETGet details for Customer PG fees.
| Path Parameters | |
|---|---|
owId integer | Organization Workspace ID |
Response Properties
organizationPgFeesDetails object | Orgnization PG fees details | |||||
| ||||||
pgCampaignFees integer | PG Campaign fees |
pgWorkspaceShare integer | PG Workspace share |
- JSON
- TypeScript
{
"success": true,
"data": {
"organizationPgFeesDetails": {
"pgCampaignFees": 10,
"pgWorkspaceShare": 15
}
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
organizationPGFeesDetails: {
pgCampaignFees: number;
pgWorkspaceShare: number;
}
}
}
};
};
}
function getPgFeesDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/{owId}/pg-fees',
params: {
query: {
owId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Edit Customer PG Fees
PATCHUpdate a Customer's PG fees details.
| Path Parameters | |
|---|---|
customerOwId integer | Customer Organization Workspace ID |
| Request Schema | |
|---|---|
owId integer | Organization Workspace ID |
pgCampaignFees integer | PG Campaign Fees |
pgWorkspaceShare integer | The share of PG fees applied to the Campaign by the workspace |
Response Properties
success boolean | Indicates Customer was succesfully updated: true |
data string | Success message |
- JSON
- TypeScript
{
"owId": 202318,
"pgCampaignFees": 10,
"pgWorkspaceShare": 15
}
{
"success": true,
"data": "PG Fees details updated Successfully."
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: string;
}
};
};
}
function editPgFeesDetails(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/customer/{customerOwId}/pg-fees',
params: {
path: {
customerowId: `number`
}
},
requestBody: {
content: {
"application/json": {
customerOwId?: `number`,
pgCampaignFees?: `number`,
pgWorkspaceShare?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Customer AQS Finance Details
GETGet finance details for a Customer's Audience Quality Score (AQS).
Read more about AQS in our Insights API or our Help Center articles: Audience Quality (AQS) Insights Reports.
| Path Parameters | |
|---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
id integer | Customer ID |
owId integer | Organization Workspace ID |
aqsRate number | AQS rate for workspace Customer |
aqsEnabled boolean | Boolean flag to enable and disable AQS feature for Advertiser Customer |
aqsMarkupType string | AQS markup type: "Absolute" or "Percentage" |
aqsMarkupValue number | AQS markup value for Advertiser Customer |
- JSON
- TypeScript
{
"success": true,
"data": {
"id": 1,
"aqsRate": 3
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
aqsRate: number;
}
}
};
};
}
function getAQSFees(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/{customerOwId}/aqs-fees',
params: {
path: {
customerOwId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Customer AQS Details
PATCHUpdate a Customer's AQS details.
| Request Schema | |
|---|---|
idinteger | ID |
owId integer required | OW ID of the Customer to update details |
aqsRate number | AQS rate for workspace Customer Min: 0, Max: 10000 |
aqsEnabled boolean | Boolean flag to enable and disable AQS feature for Advertiser Customer |
aqsMarkupTypeId integer | AQS markup type ID to represent markup types: Absolute or Percentage |
aqsMarkupValue number | AQS markup value for Advertiser Customer Min: 0, Max: 10000 |
Response Properties
id integer | ID |
message string | Success message |
- JSON
- TypeScript
{
"id": 0,
"owId": 0,
"aqsRate": 0,
"aqsEnabled": true,
"aqsMarkupTypeId": 0,
"aqsMarkupValue": 0
}
{
"success": true,
"data": {
"id": 1,
"message": "AQS Rate updated successfully. The new rate applies only to newly created AQSs"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
id: number;
message: string;
}
}
};
};
}
function editAQSFees(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/customer/aqs-fees',
requestBody: {
content: {
"application/json": {
id?: `number`,
owId: `number`,
aqsRate?: `number`,
aqsEnabled?: `boolean`,
aqsMarkupTypeId?: `number`,
aqsMarkupValue?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Customer DoubleVerify Details
GETSuper Organization users can fetch DoubleVerify Fraud & IVT Segments flag for Customer Organization.
| Query Paramters | |
|---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
customerOwId integer | Customer Organization Workspace ID |
isDvIvtSegmentsEnabled boolean | Boolean flag to enable or disable free DV-IVT Segments for Advertiser/Customer |
- JSON
- TypeScript
{
"success": true,
"data": {
"customerOwId": 1,
"isDvIvtSegmentsEnabled": true
}
}
More Responses
{
"success": true,
"data": {
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided customer details"
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
customerOwId: number;
isDvIvtSegmentsEnabled: boolean;
}
}
}
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
error: string;
}[];
}
}
};
}
function getDvIvtFlag(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/dv-ivt',
params: {
query: {
customerOwId: `number`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Customer DoubleVerify
PATCHSuper Organization Users can update DoubleVerify IVT free Segments boolean flag for Customer Organization.
| Query Paramters | |
|---|---|
customerOwId integer | Customer Organization Workspace ID |
isDvIvtSegmentsEnabled boolean | Boolean flag to enable or disable free DV-IVT Segments for Advertiser/Customer |
Response Properties
customerOwId integer | Customer Organization Workspace ID |
isDvIvtSegmentsEnabled boolean | Boolean flag to enable or disable free DV-IVT Segments for Advertiser/Customer |
message string | Success message |
- JSON
- TypeScript
{
"success": true,
"data": {
"customerOwId": 1,
"isDvIvtSegmentsEnabled": true,
"message": "DV Fraud & IVT segments enabled for free successfully"
}
}
More Responses
{
"success": true,
"data": {
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided customer details"
}
]
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
customerOwId: number;
isDvIvtSegmentsEnabled: boolean;
message: string;
}
}
}
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
success: boolean;
errorObjects: {
error: string;
}[];
}
}
}
};
}
function updateDvIvtFlag(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/customer/dv-ivt',
params: {
query: {
customerOwId: `number`,
isDvIvtSegmentsEnabled: `boolean`,
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Basic Financial Details
GETResponse Properties
paypalFeesPercentage integer | PayPal fees percentage |
- JSON
- TypeScript
{
"success": true,
"data": {
"paypalFeesPercentage": 3.5
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
paypalFeesPercentage: number;
}
}
}
};
}
function getBasicDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/basic/details',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Available Balance
GETGet the available balance of the workspace passed in the header or as a parameter based on the isCustomerRequest flag.
If isCustomerRequest flag is true then balance of the Customer workspace will be returned. If the flag is false the balance of the workspace passed in the header will be returned.
| Query Parameters | |
|---|---|
owId integer | Organization Workspace ID |
isCustomerRequest boolean | Customer app request (default): true Organization app request: false |
Response Properties
success boolean | Indicates succesful retrieval of data |
data integer | Available balance |
- JSON
- TypeScript
{
"success": true,
"data": 5855904.72
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
paypalFeesPercentage: number;
}
}
};
};
}
function getBasicDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/available-balance',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Add Ad Serving Cost
POSTAdd ad serving costs for a specific Customer. This API is accessible only by Super Organization users.
| Request Schema | |
|---|---|
owId integer | Customer Organization Workspace ID for whom the cost is being added |
imageCreativeCost number | Ad serving cost for IQM hosted image creatives |
videoCreativeCost number | Ad serving cost for IQM hosted video creatives |
audioCreativeCost number | Ad serving cost for IQM hosted audio creatives |
{
"owId": 123456,
"imageCreativeCost": 50.0,
"videoCreativeCost": 100.0,
"audioCreativeCost": 75.0
}
{
"success": true,
"data": {
"message": "Ad serving cost added successfully."
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided customer details."
}
]
}
Get Ad Serving Cost
GETGet the ad serving cost details for a specific Customer.
| Path Parameters | |
|---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
owId integer | Customer Organization Workspace ID | |||||||||||
adServingCostDetail object | Ad serving cost details | |||||||||||
| ||||||||||||
imageCreativeCost number | Ad serving cost for IQM hosted image creatives |
videoCreativeCost number | Ad serving cost for IQM hosted video creatives |
audioCreativeCost number | Ad serving cost for IQM hosted audio creatives |
costConfigurationLevel string | Level at which cost is configured (e.g., WORKSPACE) |
msaConfigurationDetail object | MSA configuration details |
{
"success": true,
"data": {
"owId": 201765,
"adServingCostDetail": {
"imageCreativeCost": 5,
"videoCreativeCost": 5,
"audioCreativeCost": 5,
"costConfigurationLevel": "WORKSPACE",
"msaConfigurationDetail": {
"msaConfiguredWith": "MWS1",
"logoURL": "https://iqm-host.com/avatar/MS.png"
}
}
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided customer details."
}
]
}
Add or Update Third Party Cost
POSTAdd or update third-party cost details. This API is accessible only by Workspace Organization users.
If the Workspace user is setting or updating the cost for their own workspace, the owId can be passed as null (it will be derived from the logged-in user context). For advertiser-level cost configuration, owId must be provided explicitly.
| Request Schema | |
|---|---|
owId integer | Organization Workspace ID of the workspace or advertiser (optional for workspace self, required for advertiser) |
cost number | Third-party cost value (range: greater than 0, up to 999) |
{
"owId": 123456,
"cost": 150.0
}
{
"owId": null,
"cost": 150.0
}
{
"success": true,
"data": {
"message": "3rd party cost added successfully."
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided customer details."
}
]
}
Get Third Party Cost
GETGet the third-party cost details for a specific Customer. This API is accessible only by Workspace and Super Organization types.
| Path Parameters | |
|---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
owId integer | Customer Organization Workspace ID | |||||
thirdPartyCostDetails object | Third-party cost details (null if not configured) | |||||
| ||||||
cost number | Third-party cost value |
active boolean | Indicates if the third-party cost is currently active |
{
"success": true,
"data": {
"owId": 123456,
"thirdPartyCostDetails": {
"cost": 4.2,
"active": true
}
}
}
{
"success": true,
"data": {
"owId": 123456,
"thirdPartyCostDetails": null
}
}
Disable Third Party Cost
PATCHDisable an existing third-party cost configuration. This API is accessible only by Workspace Organization users.
The third-party cost will be marked as inactive and the cost value set to null.
| Path Parameters | |
|---|---|
customerOwId integer | Organization Workspace ID of the workspace or advertiser for which the third-party cost is being disabled |
{
"success": true,
"data": {
"message": "3rd party cost disabled successfully."
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided customer details."
}
]
}