Finance API
Overview
This page covers the methods and endpoints associated with finance operations. With the Finance API you can access finance details and lists, and manage invoices, credit, and payment.
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
GET /api/v3/fa/customer/financial-detailsGet 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
GET /api/v3/fa/customer/view-marginGet 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
POST /api/v3/fa/customer/edit-marginUpdate 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 |
- 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);
}
Campaign Margin Details
GET /api/v3/fa/customer/campaign-margin-listGet a list of Campaign margin details.
Query Parameters | |
---|---|
owId integer | Organization Workspace ID |
searchField string | Search results by keyword |
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
GET /api/v3/fa/customer/{owId}/pg-feesGet 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
PATCH /api/v3/fa/customer/{customerOwId}/pg-feesUpdate 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 VLD Finance Details
GET /api/v3/fa/customer/{customerOwId}/vld-feesGet finance details for a Customer's Voter Level Data (VLD).
Read more about VLD in our Insights API or our Help Center articles: Voter Level Data (VLD) Insights Reports.
Path Parameters | |
---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
id integer | Customer ID |
owId integer | Organization Workspace ID |
vldRate integer | VLD rate for workspace Customer |
vldEnabled boolean | Boolean flag to enable and disable VLD feature for Advertiser Customer |
vldMarkupTypeId integer | VLD markup type ID: "Absolute" or "Percentage" |
vldMarkupType integer | VLD markup type: "Absolute" or "Percentage" |
vldMarkupValue integer | VLD markup value for Advertiser Customer |
- JSON
- TypeScript
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;
vldRate: number;
}
}
};
};
}
function getVLDFees(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/{customerOwId}/vld-fees',
params: {
path: {
customerowId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Customer VLD Details
PATCH /api/v3/fa/customer/vld-feesUpdate a Customer's VLD details.
Request Schema | |
---|---|
id integer | ID |
owId integer required | OW ID of the Customer to update details |
vldRate integer | VLD rate for workspace Customer |
vldEnabled boolean | Boolean flag to enable and disable VLD feature for Advertiser Customer |
vldMarkupTypeId integer | VLD markup type: "Absolute" or "Percentage" |
vldMarkupType string | VLD markup type: "Absolute" or "Percentage" |
vldMarkupValue integer | VLD markup value for Advertiser Customer |
Response Properties
id integer | ID |
message string | Success message |
- JSON
- TypeScript
{
"id": 0,
"owId": 0,
"vldRate": 0,
"vldEnabled": true,
"vldMarkupType": "string",
"vldMarkupTypeId": 0,
"vldMarkupValue": 9999
}
{
"success": true,
"data": {
"id": 1,
"message": "VLD Rate updated successfully. The new rate applies only to newly created VLDs"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
id: number;
owId: number;
vldRate: number;
vldEnabled: boolean;
vldMarkupType: string;
vldMarkupTypeId: number;
vldMarkupValue: number;
}
};
};
}
function editVLDFees(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/customer/vld-fees',
requestBody: {
content: {
"application/json": {
id?: `number`,
owId: `number`,
vldRate?: `number`,
vldEnabled?: `boolean`,
vldMarkupType?: `string`,
vldMarkupTypeId?: `number`,
vldMarkupValue?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Customer PLD Finance Details
GET /api/v3/fa/customer/{customerOwId}/pld-feesGet finance details for a Customer's Provider Level Data (PLD).
Read more about PLD in our Insights API or our Help Center articles: Provider Level Data (PLD) Insights Reports.
Path Parameters | |
---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
id integer | Customer ID |
owId integer | Organization Workspace ID |
pldRate integer | PLD rate for workspace Customer |
pldEnabled boolean | Boolean flag to enable and disable PLD feature for Advertiser Customer |
pldMarkupType string | PLD markup type: "Absolute" or "Percentage" |
pldMarkupTypeId integer | PLD markup type ID: "Absolute" or "Percentage" |
pldMarkupValue integer | PLD markup value for Advertiser Customer |
- JSON
- TypeScript
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;
vldRate: number;
}
}
};
};
}
function getPLDFees(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/{customerOwId}/pld-fees',
params: {
path: {
customerowId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Customer PLD Details
PATCH /api/v3/fa/customer/pld-feesUpdate a Customer's PLD details.
Request Schema | |
---|---|
id integer | ID |
owId integer required | OW ID of the Customer to update details |
pldRate integer | PLD rate for workspace Customer |
pldEnabled boolean | Boolean flag to enable and disable PLD feature for Advertiser Customer |
pldMarkupTypeId integer | PLD markup type ID to represent markup types: Absolute or Percentage |
pldMarkupValue integer | PLD markup value for Advertiser Customer: "Absolute" or "Percentage" |
Response Properties
id integer | ID |
message string | Success message |
- JSON
- TypeScript
{
"id": 0,
"owId": 0,
"pldRate": 0,
"pldEnabled": true,
"pldMarkupType": "string",
"pldMarkupTypeId": 0,
"pldMarkupValue": 9999
}
{
"success": true,
"data": {
"id": 1,
"message": "PLD Rate updated successfully. The new rate applies only to newly created VLDs"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
id: number;
owId: number;
pldRate: number;
pldEnabled: boolean;
pldMarkupType: string;
pldMarkupTypeId: number;
pldMarkupValue: number;
}
};
};
}
function editPLDFees(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/customer/pld-fees',
requestBody: {
content: {
"application/json": {
id?: `number`,
owId: `number`,
pldRate?: `number`,
pldEnabled?: `boolean`,
pldMarkupType?: `string`,
pldMarkupTypeId?: `number`,
pldMarkupValue?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Customer SLS Finance Details
GET /api/v3/fa/customer/{customerOwId}/sls-feesGet finance details for a Customer's Script Lift Study (SLS).
Read more about SLS in our Insights API or our Help Center articles: Script Lift Study (SLS) Insights Reports.
Path Parameters | |
---|---|
customerOwId integer | Customer Organization Workspace ID |
Response Properties
id integer | Customer ID |
owId integer | Organization Workspace ID |
slsRate integer | SLS rate for workspace Customer |
slsEnabled boolean | Boolean flag to enable and disable SLS feature for Advertiser Customer |
slsMarkupTypeId integer | SLS markup type ID: "Absolute" or "Percentage" |
slsMarkupType string | SLS markup type: "Absolute" or "Percentage" |
slsMarkupValue integer | SLS markup value for Advertiser Customer |
- JSON
- TypeScript
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;
slsRate: number;
}
}
};
};
}
function getSLSFees(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/customer/{customerOwId}/sls-fees',
params: {
path: {
customerowId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Customer SLS Details
PATCH /api/v3/fa/customer/sls-feesUpdate a Customer's SLS details.
Request Schema | |
---|---|
id integer | ID |
owId integer required | OW ID of the Customer to update details |
slsRate integer | SLS rate for workspace Customer |
slsEnabled boolean | Boolean flag to enable and disable SLS feature for Advertiser Customer |
slsMarkupType string | SLS markup type: "Absolute" or "Percentage" |
slsMarkupTypeId integer | SLS markup type ID: Absolute or Percentage |
slsMarkupValue integer | SLS markup value for Advertiser Customer |
Response Properties
id integer | ID |
message string | Success message |
- JSON
- TypeScript
{
"id": 0,
"owId": 0,
"slsRate": 0,
"slsEnabled": true,
"slsMarkupType": "string",
"slsMarkupTypeId": 0,
"slsMarkupValue": 9999
}
{
"success": true,
"data": {
"id": 1,
"message": "SLS Rate updated successfully. The new rate applies only to newly created VLDs"
}
}
See TypeScript Prerequisites for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
id: number;
owId: number;
slsRate: number;
slsEnabled: boolean;
slsMarkupType: string;
slsMarkupTypeId: number;
slsMarkupValue: number;
}
};
};
}
function editSLSFees(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/customer/sls-fees',
requestBody: {
content: {
"application/json": {
id?: `number`,
owId: `number`,
slsRate?: `number`,
slsEnabled?: `boolean`,
slsMarkupType?: `string`,
slsMarkupTypeId?: `number`,
slsMarkupValue?: `number`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Customer DoubleVerify Details
GET /api/v3/fa/customer/dv-ivtSuper 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
PATCH /api/v3/fa/customer/dv-ivtSuper Organization Users can update DoubleVerify IVT free Segments boolean flag for Customer Organizaiton.
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
GET /api/v3/fa/basic/detailsResponse 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
GET /api/v3/fa/available-balanceGet 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);
}
Invoice Management
Get Invoice for Organization
GET /api/v3/fa/invoice-settingsGet an invoice for an Organization.
Response Properties
invoiceId integer | Invoice ID |
owId integer | Organization Workspace ID |
invoiceTitle string | Invoice title |
invoiceCompanyName string | Company name associated with invoice |
invoiceCompanyAddress string | Address associated with company |
email string | Company email |
website string | Company website |
invoiceDescription string | Invoice description |
paypalId integer | PayPal ID |
chequeTransferId integer | Cheque transfer ID |
wireTransferId integer | Wire transfer ID |
termsAndConditions string | Terms and conditions of invoice |
paymentTerm string | Payment term of invoice |
invoiceFooter string | Invoice footer details |
createdAt string | Creation date of invoice |
- JSON
- TypeScript
{
"success": true,
"data": {
"invoiceId": 1,
"owId": 334,
"invoiceTitle": "The Alchemist",
"invoiceCompanyName": "The Alchemist",
"invoiceCompanyAddress": "42, 6th Avenue, New York, NY",
"email": "shraddha.p+alchemist@iqm.com",
"website": "www.alchemist.com",
"invoiceDescription": "Dear Customer, Greetings from The Alchemist, we are writing to provide you an electronic invoice for your use of services.",
"paypalId": 1,
"chequeTransferId": 1,
"wireTransferId": 2,
"termsAndConditions": "Please make the payment in 30 days or your account might be put on hold",
"paymentTerm": "30",
"invoiceFooter": "The Alchemist | 12.234.56.789 | USA",
"createdAt": "2021-08-27T07:33:14.000+00:00"
}
}
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: {
invoiceId: number;
owId: number;
invoiceTitle: string;
invoiceCompanyName: string;
invoiceCompanyAddress: string;
email: string;
website: string;
invoiceDescription: string;
paypalId: number;
chequeTransferId: number;
wireTransferId: number;
termsAndConditions: string;
paymentTerm: string;
invoiceFooter: string;
createdAt: string;
};
};
};
};
}
function GetInvoiceForOrganization(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/invoice-settings',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get Invoice Payment Details
GET /api/v3/fa/invoice-settings-payment-detailsGet invoice payment details by invoice ID.
Query Parameters | |
---|---|
invoiceId integer | Invoice ID |
Response Properties
paypalPaymentDetail object | PayPal payment details | |||||||||||||||
|
payPalId integer | PayPal ID |
paypalAccountId string | PayPal account ID |
chequePaymentDetail
object
chequePaymentDetail
object properties
chequeId integer | Cheque ID |
chequeCompanyName string | Company name |
chequeCompanyAddress string | Company address |
wireTransferPaymentDetail
object
wireTransferPaymentDetail
object properties
wireTransferId integer | Wire transfer ID |
wireTransferCompanyName string | Company name |
bankName string | Bank name |
accountNumber string | Account number |
bankAddress string | Bank address |
swiftCode string | Swift code |
routing string | Routing number |
- JSON
- TypeScript
{
"success": true,
"data": {
"paypalPaymentDetail": {
"paypalId": 1,
"paypalAccountId": "thealchemistfinance@paypal"
},
"chequePaymentDetail": {
"chequeId": 1,
"chequeCompanyName": "The Alchemist Company",
"chequeCompanyAddress": "45, Fifth Avenue, NY, USA"
},
"wireTransferPaymentDetail": {
"wireTransferId": 2,
"wireTransferCompanyName": "The Alchemist",
"bankName": "JP Morgan Chase Bank",
"accountNumber": "670669295",
"bankAddress": "498 7th Avenue New York NY",
"swiftCode": "MGTCUS3G",
"routing": "150098"
}
}
}
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: {
paypalPaymentDetail: {
paypalId: number;
paypalAccountId: string;
};
chequePaymentDetail: {
chequeId: number;
chequeCompanyName: string;
chequeCompanyAddress: string;
};
wireTransferPaymentDetail: {
wireTransferId: number;
wireTransferCompanyName: string;
bankName: string;
accountNumber: string;
bankAddress: string;
swiftCode: string;
routing: string;
};
};
};
};
};
}
function GetInvoicePaymentDetails(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/invoice-settings-payment-details',
params: {
query: {
invoiceId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Invoices for Customer or Organization
GET /api/v3/fa/invoice/list/{owId}Get a list of invoices by Customer or Organization.
Path Parameters | |
---|---|
owId integer | Organization Workspace ID |
Query Parameters | |
---|---|
status string | Invoice Status ID |
sortBy string | Sorts by ascending (+) or descending (-), default: -invoiceId Supported values: issuedOn, invoiceAmount, status |
isCustomerRequest boolean | (Organization endpoint only) Customer app request (default): true Organization app request: false |
Response Properties
invoiceId integer | Invoice ID |
invoiceFromDate integer | Unix epoch timestamp of invoice start date, in milliseconds |
invoiceToDate integer | Unix epoch timestamp of invoice end date, in milliseconds |
issuedOn integer | Unix epoch timestamp of invoice issue date, in milliseconds |
invoiceAmount integer | Invoice amount |
status integer | Invoice status |
paymentTerm integer | Payment term |
paidAmount integer | Paid amount |
paymentMode array of integers | Payment mode |
invoiceName string | Invoice name |
actionNote string | Action note |
invoiceStatusUpdatedBy string | Name of who updated invoice status |
modifiedAt integer | Unix epoch timestamp of modification date, in milliseconds |
- JSON
- TypeScript
{
"success": true,
"data": {
"data": [
{
"invoiceId": 79,
"invoiceFromDate": 1601510400,
"invoiceToDate": 1604102400,
"issuedOn": 1632182400,
"invoiceAmount": 553611.718,
"status": 7,
"paymentTerm": 30,
"paidAmount": 5000,
"paymentMode": [
2,
4
],
"invoiceName": "Zydus - Oct2020",
"actionNote": null,
"invoiceStatusUpdatedBy": "Kartik Gevariya",
"modifiedAt": 1632801378000
}
],
"totalRecords": 0,
"filteredRecords": 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: {
data: {
invoiceId: number;
invoiceFromDate: number;
invoiceToDate: number;
issuedOn: number;
invoiceAmount: number;
status: number;
paymentTerm: number;
paidAmount: number;
paymentMode: (number[] | null) | (string | null) | unknown;
invoiceName: string | null;
actionNote: string | null;
invoiceStatusUpdatedBy: string | null;
modifiedAt: number;
}[];
totalRecords: number;
filteredRecords: number;
};
};
};
};
}
function ListInvoiceForCustomer(): Promise<Responses> {
const options = {
method: 'GET',
url: 'https://api.iqm.com/api/v3/fa/invoice/list/{owId}',
params: {
query: {
status: `string`,
sortBy: `string`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update Invoice Settings
PATCH /api/v3/fa/invoice-settings/{invoiceId}Update invoice settings details for an Organization.
Query Parameter | |
---|---|
isWhiteLabel boolean | Set by Organization, must be set to true for invoice to be updated |
Request Schema | |
---|---|
invoiceTitle string | Invoice title |
invoiceCompanyAddress string | Invoice company address |
email string | |
website string | Website |
invoiceDescription string | Invoice description |
termsAndConditions string | Terms and conditions of invoice |
paymentTerm string | Payment Term ID |
invoiceFooter string | Invoice footer details |
paypalAcountId string | PayPal account ID |
chequeCompanyName string | Company name on check (when Payment Mode Type is check) |
chequeCompanyAddress string | Company address on check (when Payment Mode Type is check) |
wireTransferCompanyName string | Company name for wire transfer (when Payment Mode Type is wire transfer) |
bankName string | Bank name |
accountNumber string | Account number |
bankAddress string | Bank address |
companyTaxId string | Company tax ID |
companyTaxName string | Company tax name |
Response Properties
invoiceId integer | Invoice ID |
message string | Success message |
- JSON
- TypeScript
{
"invoiceTitle": "The Alchemist",
"invoiceCompanyAddress": "42, 6th Avenue, New York, NY",
"email": "shraddha.p+alchemist@iqm.com",
"website": "www.alchemist.com",
"invoiceDescription": "Dear Customer, Greetings from The Alchemist, we are writing to provide you an electronic invoice for your use of services.",
"termsAndConditions": "Please make the payment in 30 days or your account might be put on hold",
"paymentTerm": "30",
"invoiceFooter": "The Alchemist | 12.234.56.789 | USA",
"paypalAccountId": "thealchemistfinance@paypal",
"chequeCompanyName": "The Alchemist Company",
"chequeCompanyAddress": "45, Fifth Avenue, NY, USA",
"wireTransferCompanyName": "The Alchemist",
"bankName": "JP Morgan Chase Bank",
"accountNumber": "670669295",
"bankAddress": "498 7th Avenue New York NY",
"companyTaxId": "202130INGST",
"companyTaxName": "GSTIN"
}
{
"success": true,
"data": {
"invoiceId": 1,
"message": "Invoice details updated successfully"
}
}
More Responses
{
"success": false,
"errorObjects": [
{
"error": "Invoice does not belong to the logged in organization workspace"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "Invoice with the provided ID does not exists"
}
]
}
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: {
invoiceId: number;
message: string;
};
};
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
}
function Save/UpdateInvoiceSettings(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/invoice-settings/{invoiceId}',
params: {
query: {
isWhiteLabel: `boolean`,
},
path: {
invoiceId: `number`,
}
},
requestBody: {
content: {
"application/json": {
invoiceTitle: `string`,
invoiceCompanyAddress: `string`,
email: `string`,
website: `string`,
invoiceDescription: `string`,
termsAndConditions: `string`,
paymentTerm: `string`,
invoiceFooter: `string`,
paypalAccountId: `string`,
chequeCompanyName: `string`,
chequeCompanyAddress: `string`,
wireTransferCompanyName: `string`,
bankName: `string`,
accountNumber: `string`,
bankAddress: `string`,
companyTaxId: `string`,
companyTaxName: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Delete Invoice Tax Data
DELETE /api/v3/fa/invoice-settings-tax-dataDelete tax data for an invoice.
Query Parameters | |
---|---|
taxId integer | Tax ID |
Response Properties
success boolean | Indicates successful deletion: true |
data string | Success message |
- JSON
- TypeScript
{
"success": true,
"data": "Tax data deleted successfully"
}
{
"success": false,
"errorObjects": [
{
"error": "Tax ID is invalid"
}
]
}
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 DeleteInvoiceTaxdata(): Promise<Responses> {
const options = {
method: 'DELETE',
url: 'https://api.iqm.com/api/v3/fa/invoice-settings-tax-data',
params: {
query: {
taxId: `number`,
}
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Approve Invoice
PATCH /api/v3/fa/invoice-approve/{invoiceId}Approve an invoice by invoice ID with optional action note.
Path Parameter | |
---|---|
invoiceId integer | Invoice ID |
Request Schema | |
---|---|
actionNote string | Action note |
Response Properties
success boolean | Indicates successful approval |
data string | Success message |
- JSON
- TypeScript
{
"actionNote": "Approved for payment"
}
{
"success": true,
"data": "Invoice with the provided ID approved 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;
};
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
}
function ApproveInvoice(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/invoice-approve/{invoiceId}',
params: {
path: {
invoiceId: `number`,
}
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Cancel Invoice
PATCH /api/v3/fa/invoice-cancel/{invoiceId}Cancel an invoice by invoice ID with optional action note.
Path Parameter | |
---|---|
invoiceId integer | Invoice ID |
Request Schema | |
---|---|
actionNote string | Action note |
Response Properties
success boolean | Indicates successful cancellation: true |
data string | Success message |
- JSON
- TypeScript
{
"actionNote": "Customer requested cancellation due to duplicate invoice"
}
```json title="Response 200"
{
"success": true,
"data": "Invoice with the provided ID rejected 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;
};
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
}
function CancelInvoice(): Promise<Responses> {
const options = {
method: 'PATCH',
url: 'https://api.iqm.com/api/v3/fa/invoice-cancel/{invoiceId}',
params: {
path: {
invoiceId: `number`,
}
},
requestBody: {
content: {
"application/json": {
actionNote: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Mark Invoice as Paid
POST /api/v3/fa/pay-invoicePay an invoice by invoice ID. API also accepts query parameters as multipart/form-data along with paymentProof file upload.
Query Parameters | |
---|---|
invoiceId integer required | Invoice ID |
owId integer required | Organization Workspace ID |
paymentAmount integer required | Payment amount |
paymentType integer required | Payment Type ID |
paymentDate integer | Payment date as Unix epoch timestamp, in milliseconds (default: current date/time) |
paymentMode integer | Payment Mode ID |
transactionId string | Transaction ID/reference number |
bankName string | Bank name |
isCustomerRequest boolean | Indicates whether this invoice download is made as a Customer request (default: true) or as the customer’s own (false) |
Request Schema | |
---|---|
paymentProof multipart/form-data optional | Payment proof file upload |
Response Properties
success boolean | Indicates successful invoice update: true |
data string | Success message |
curl -X POST "https://api.iqm.com/api/v3/fa/pay-invoice" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "X-IAA-OW-ID: 200001" \
-H "Content-Type: multipart/form-data" \
-F "invoiceId=12345" \
-F "owId=200001" \
-F "paymentAmount=1250.50" \
-F "paymentDate=2025-10-07T12:00:00Z" \
-F "paymentMode=2" \
-F "transactionId=TXN-987654321" \
-F "paymentType=1" \
-F "bankName=First National Bank" \
-F "isCustomerRequest=true" \
-F "paymentProof=@/path/to/payment_receipt.pdf"
{
"success": true,
"data": "Payment added Successfully."
}
Email Invoice
POST /api/v3/fa/email-invoice/{owId}/{invoiceId}Email an invoice to a specified email address.
Path Parameter | |
---|---|
owId integer | Organization Workspace ID |
invoiceId integer | Invoice ID |
Request Schema | |
---|---|
email string | Email to send invoice to |
Response Properties
success boolean | Indicates email successfully sent: true |
data string | Success message |
- JSON
- TypeScript
{
"email": "user@company.com"
}
{
"success": true,
"data": "Invoice e-mail sent 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 EmailInvoice(): Promise<Responses> {
const options = {
method: 'POST',
url: 'https://api.iqm.com/api/v3/fa/email-invoice/{owId}/{invoiceId}',
params: {
path: {
owId: `number`;
invoiceId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}