Finance API
Overview
This page covers the methods and endpoints associated with finance operations. With the Finance API you can access and manage VLD fees.
Authentication
Use the following header parameters for all requests:
Headers | |
---|---|
Authentication string required | Authentication bearer token See Authentication Guide |
X-IAA-OW-ID integer required | Organization Worskpace ID Header |
Finance Details
Get Customer VLD Finance Details
GET /api/v3/fa/customer/{customerOwId}/vld-feesGet finance details for Customer VLD.
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 |
vldMarkupTypeId integer | VLD markup type ID to represent markup types: Absolute or Percentage |
vldMarkupValue integer | VLD markup value for Advertiser Customer |
- JSON
- TypeScript
Response 200
{
"success": true,
"data": {
"id": 1,
"vldRate": 3
}
}
Response 200 (VLD flag)
{
"success": true,
"data": {
"id": 3,
"owId": 201427,
"vldRate": 3,
"vldEnabled": true,
"vldMarkupType": "Percentage",
"vldMarkupValue": 10
}
}
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://app.iqm.com/api/v3/fa/customer/{customerOwId}/vld-fees',
params: {
path: {
customerowId: `number`
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Updates Customer VLD Details
PATCH /api/v3/fa/customer/vld-feesRequest Schema | |
---|---|
id integer | ID |
owId integer | OW ID of the Customer to update details (required) |
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 to represent markup types: Absolute or Percentage |
vldMarkupValue integer | VLD markup value for Advertiser Customer |
Response Properties
id integer | ID |
message string | Success message |
- JSON
- TypeScript
Request Sample
{
"id": 0,
"owId": 0,
"vldRate": 0,
"vldEnabled": true,
"vldMarkupType": "string",
"vldMarkupTypeId": 0,
"vldMarkupValue": 9999
}
Response 200
{
"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://app.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);
}