Skip to main content

Bid Model API

Overview

The Bid Model API allows you to optimize advertising Campaigns for better performance. You can fine-tune metrics such as where ads appear (Include/Exclude), manage Campaign priority, and dimensions by which a Campaign is subdivided. This page covers the common endpoints and methods associated with the Bid Model API.

Learn more about Bid Modeling with our Help Center article.

Authentication

Headers
Authentication
string required
Authentication bearer token
See Authentication Guide
X-IAA-OW-ID
integer required
Organization Worskpace ID Header

Bid Modeling Details

Get Campaign Dimension Counts

GET /api/v3/bm/campaigns/{campaignId}/dimensions/count

Retrieves counts of dimensions for a specific Campaign within a given date range.

Path Parameters
campaignId
integer required
The Campaign ID for which the Report is being generated
Query Parameters
startDate
integer
Unix epoch timestamp (in milliseconds) for Campaign start date
endDate
integer
Unix epoch timestamp (in milliseconds) for Campaign end date
Response 200
{
"success": true,
"data": {
"creative": 2,
"dealId": 0,
"openExchange": 0,
"publisherCategory": 0,
"trafficType": 2,
"deviceType": 4,
"state": 0,
"city": 0,
"zip": 0,
"exchange": 18
}
}
More Responses
Response 400
{
"success": false,
"errorObjects": [
{
"error": "Missing required parameter: 'startDate'. Type: long",
"field": "startDate"
}
]
}
Response 403
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "No campaign found with given campaign Id"
}
]
}
Response 500
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}

Get Dimension Specific Spending for a Campaign

GET /api/v3/bm/campaigns/{campaignId}/dimension/{dimensionId}/spent

Get details on total spent by dimension for a Campaign.

Path Parameters
campaignId
integer required
The Campaign ID
dimensionId
integer required
Dimension ID
See static List of Dimension IDs
Response 200
{
"success": true,
"data": {
"entityWiseSpent": {
"1": 5.1,
"2": 5.76,
"3": 5.34
}
}
}

Get Total and Dimension Specific Count of Modeled Items for a Campaign

GET /api/v3/bm/campaigns/{campaignId}/bid-models/count

Get details on total and dimension specific counts of modeled items for a specified Campaign.

Path Parameters
campaignId
integer required
The Campaign ID
Response 200
{
"success": true,
"data": {
"totalCount": 7,
"dimensionWiseCount": [
{
"dimensionId": 1,
"count": 5
},
{
"dimensionId": 7,
"count": 1
},
{
"dimensionId": 13,
"count": 1
}
]
}
}

Include/Exclude Management

Devices, Exchanges, Traffic

POST /api/v2/cmp/deviceType/includeExclude
POST /api/v2/cmp/exchange/includeExclude
POST /api/v2/cmp/trafficsource/includeExclude

The Include and Exclude options allow the you to control where ads appear.

For IDs see endpoint documentation for Device Type, Exchanges, and Traffic Source in the Master API.

Request Schema
ids
string
ID of entity
isExcluded
integer
Allow targeted entity: 0
Block targeted entity: 1
campaignId
integer
Campaign ID
Request Sample
{
"ids": "15",
"isExcluded": 0,
"campaignId": 214269
}
Response 200 (device type)
{
"statusCode": 200,
"responseObject": {
"message": "The Device Types have been allowed."
}
}

Include/Exclude Entities From a Campaign

POST /api/v3/bm/campaigns/{campaignId}/include-Exclude/dimensions/{dimensionId}

Optimize a Campaign by updating the status of specified entities to be either included or excluded with path parameters campaignId and dimensionId.

Path
campaignId
integer
Campaign ID
dimensionId
integer
Dimension ID
See static List of Dimension IDs
Request Schema
advertiserId
integer optional
Advertiser ID
dspId
integer optional
Demand Side Platform ID
owId
integer optional
Organization workspace ID
uowId
integer optional
User organization workspace ID
campaignId
integer optional
Unique ID of Campaign
ids
string optional
Creative ID
isExcluded
integer
Target entity: 0
Block entity: 1
Request Sample (Creatives)
{
"ids": "604675,604084",
"isExcluded": 0
}
Response 200 (Creatives)
{
"success": true,
"data": "Creatives successfully targeted for the campaign."
}

Bid Modeling Management

Add Bid Modeling

POST /api/v3/bm/campaigns/{campaignId}/bid-models

Add bid modeling for different dimensions. Validates and calculates others as bid modeling as well.

Path Parameters
campaignId
integer
Campaign ID
Request Schema
bidModelling
object
Object containing Bid Modeling properties
bidModelling object properties
bidModelData
object
Object containing Bid Model Data properties
bidModelData object properties
id
integer
Bid Model data ID
priority
integer
Assigned priority:
[ 1 .. 10 ]
bidMultiplier
integer
Bid Multiplier
[ 0.1 .. 100 ]
spendRatio
integer
Spend ratio
[ 0 .. 100 ]
spendRatioTypeId
integer
Spend ratio type ID
[ 1 , 2 ]
dimensionEntityMappings
object
Object containing entity mappings
dimensionEntityMappings object properties
campaignId
integer
Campaign ID
dimensionId
integer
Dimension ID
entityId
integer
Entity ID
bidModelDataId
integer
Bid Model data ID
Request Sample
{
"bidModelling": [
{
"bidModelData": {
"id": 1,
"priority": 1,
"spendRatio": 100,
"spendRatioTypeId": 1,
"bidMultiplier": 1
},
"dimensionEntityMappings": [
{
"dimensionId": 1,
"entityId": 583002
}
]
}
]
}
Response 200
{
"success": true,
"data": "Priority Updated Successfully"
}

Update Bid Modeling Actions

PUT /api/v3/bm/campaigns/{campaignId}/bid-models

Update various actions such as ADD, UPDATE, or DELETE for bid modeling.

Path Parameters
campaignId
integer
Campaign ID
Request Schema
bidModelRequests
array of objects
Objects containing bid model actions
bidModelRequests object properties
action
string
Supported values specifying bid model action: ADD, UPDATE, DELETE
bidModelData
object
Object containing bid model data
bidModelData object properties
id
integer
Bid Model data ID
priority
integer
Assigned priority:
[ 1 .. 10 ]
bidMultiplier
integer
Bid Multiplier
[ 0.1 .. 100 ]
spendRatio
integer
Spend ratio
[ 0 .. 100 ]
spendRatioTypeId
integer
Spend ratio type ID
[ 1 , 2 ]
dimensionEntityMappings
object
Object containing entity mappings
dimensionEntityMappings object properties
campaignId
integer
Campaign ID
dimensionId
integer
Dimension ID
entityId
integer
Entity ID
bidModelDataId
integer
Bid Model data ID
bidModelDataIds
array of integers
Bid Model data IDs
baseBid
integer
Base value on which bid modifiers are applied. For example, if base bid is 2, and bid modifier is 2, then bid price is: 2x2=4
excludeDimensionEntityMappings
object
Object containing dimension entity mappings to exclude
excludeDimensionEntityMappings object properties
advertiserId
integer
Advertiser ID
dspId
integer
DSP ID
owId
integer
Organization Workspace ID
uowId
integer
Universal Organization Workspace ID
campaignId
integer
Campaign ID
ids
string
Comma separated IDs
isExcluded
boolean
dimensionId
integer
Dimension ID
Request Sample
{
"bidModelRequests": [
{
"action": "ADD",
"bidModelData": {
"priority": 1,
"bidMultiplier": 1,
"spendRatio": 1,
"spendRatioTypeId": 1
},
"dimensionEntityMappings": [
{
"dimensionId": 1,
"entityId": 640245
}
]
},
{
"action": "ADD",
"bidModelData": {
"priority": 1,
"bidMultiplier": 1,
"spendRatio": 1,
"spendRatioTypeId": 1
},
"dimensionEntityMappings": [
{
"dimensionId": 1,
"entityId": -1
}
]
},
{
"action": "UPDATE",
"bidModelData": {
"id": 883,
"priority": 1,
"bidMultiplier": 1,
"spendRatio": 1,
"spendRatioTypeId": 1
}
},
{
"action": "UPDATE",
"bidModelData": {
"id": 894,
"priority": 1,
"bidMultiplier": 1,
"spendRatio": 1,
"spendRatioTypeId": 1
}
},
{
"action": "DELETE",
"bidModelDataIds": [
893
]
}
],
"baseBid": 3.1,
"excludeDimensionEntityMappings": [
{
"dimensionId": 1,
"ids": "1,2,3",
"isExcluded": 0
},
{
"dimensionId": 2,
"ids": "1,2,3",
"isExcluded": 1
}
]
}
Response 200
{
"success": true,
"data": "Bid Modelling updated successfully!"
}

Update Bid Modeling Dimensions

PATCH /api/v3/bm/campaigns/{campaignId}/bid-models

Update bid modeling for different dimensions.

Path Parameters
campaignId
integer
Campaign ID
Request Schema
bidModelData
object
Object containing Bid Model Data properties
bidModelData object properties
id
integer
Bid Model data ID
priority
integer
Assigned priority:
[ 1 .. 10 ]
bidMultiplier
integer
Bid Multiplier
[ 0.1 .. 100 ]
spendRatio
integer
Spend ratio
[ 0 .. 100 ]
spendRatioTypeId
integer
Spend ratio type ID
[ 1 , 2 ]
Request Sample
{
"bidModelData": [
{
"id": 1,
"priority": 1,
"spendRatio": 50,
"spendRatioTypeId": 1,
"bidMultiplier": 1
},
{
"id": 1,
"priority": 10,
"spendRatio": 50,
"spendRatioTypeId": 1,
"bidMultiplier": 1
}
]
}
Response 200
{
"success": true,
"data": "Bid Modelling updated successfully!"
}

Delete Bid Modeling Data

DELETE /api/v3/bm/campaigns/{campaignId}/bid-models

Delete all bid modeling for a Campaign or dimension, or based on bid modeling data IDs.

Path Parameters
campaignId
integer
Campaign ID
Query Parameters
dimensionIds
string
Comma separated dimension IDs to delete bid modeling data for
bidModelDataIds
string
Comma separated bid model data IDs to delete
campaignId
string
Campaign ID to delete bid modeling data for
Response 200
{
"success": true,
"data": "Bid Modelling deleted successfully!"
}

Manage Insertion Order Bid Modeling

PUT /api/v3/bm/io/{ioId}/bid-models

Add, update, or remove Bid Modeling at the Insertion Order level. Changes will be applied to all Campaigns associated with specified Insertion Order.

Path
ioId
integer
Insertion Order ID
Request Schema
bidModelRequests
array of objects
Objects containing bid model actions
bidModelRequests object properties
action
string
Supported values specifying bid model action: ADD, UPDATE, DELETE
bidModelData
object
Object containing bid model data
bidModelData object properties
id
integer
Bid Model data ID
priority
integer
Assigned priority:
[ 1 .. 10 ]
bidMultiplier
integer
Bid Multiplier
[ 0.1 .. 100 ]
spendRatio
integer
Spend ratio
[ 0 .. 100 ]
spendRatioTypeId
integer
Spend ratio type ID
[ 1 , 2 ]
dimensionEntityMappings
object
Object containing entity mappings
dimensionEntityMappings object properties
campaignId
integer
Campaign ID
dimensionId
integer
Dimension ID
entityId
integer
Entity ID
bidModelDataId
integer
Bid Model data ID
bidModelDataIds
array of integers
Bid Model data IDs
baseBid
integer
Base value on which bid modifiers are applied. For example, if base bid is 2, and bid modifier is 2, then bid price is: 2x2=4
excludeDimensionEntityMappings
object
Object containing dimension entity mappings to exclude
excludeDimensionEntityMappings object properties
advertiserId
integer
Advertiser ID
dspId
integer
DSP ID
owId
integer
Organization Workspace ID
uowId
integer
Universal Organization Workspace ID
campaignId
integer
Campaign ID
ids
string
Comma separated IDs
isExcluded
boolean
dimensionId
integer
Dimension ID
Request Sample
{
"bidModelRequests": [
{
"action": "ADD",
"bidModelData": {
"priority": 1
},
"dimensionEntityMappings": [
{
"campaignId": 1
}
]
},
{
"action": "UPDATE",
"bidModelData": {
"id": 3677,
"priority": 2
}
},
{
"action": "DELETE",
"bidModelDataIds": [
893
]
}
]
}
Response 200
{
"success": true,
"data": "Priority Updated Successfully"
}
More Responses
Response 403
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Cannot assign priority as campaign is in invalid status"
}
]
}
Response 500
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}

Manage Insertion Order Priority

POST /api/v3/bm/io/{ioId}/bid-models
DELETE /api/v3/bm/io/{ioId}/bid-models
PATCH /api/v3/bm/io/{ioId}/bid-models

Add, update, or delete priorities at the Insertion Order level. Changes will be applied to all Campaigns associated with the Insertion Order.

Assigning priority to Campaigns allows the you to establish a sequential order of bidding to fine-tune their targeting strategy. Priority may be assigned (ranging 1 to 10) to multiple campaignIds.

Query ParametersDELETE only
campaignIds
string
Comma separated Campaign IDs
Path Parameters
ioId
integer
Insertion Order ID
Properties
priority
integer required
Assigned priority:
[ 1 .. 10 ]
campaignIdList
array of integers required
Campaign IDs
Request Sample
{
"priority": 1,
"campaignIdList": [
123456,
234567,
345678,
456789
]
}
response 200
{
"success": true,
"data": "Priority Updated Successfully"
}

Bid Model Metrics and Dimensions

Get Metrics Report For a Given Campaign and Dimension

POST api/v3/bm/campaigns/{campaignId}/reports/{dimensionId}

Generate a detailed metrics Report for a specific Campaign, segmented by dimension.

Path Parameters
campaignId
integer required
Campaign ID
dimensionId
integer required
Dimension ID
Query Parameters
searchField
string
Search results by keyword
sortBy
string
Sorts by ascending (+) or descending (-)
Default: -impressions
pageNo
integer
Page number for the data
Default: 1
pageSize
integer
Maximum number of results returned
Default: 50
timeZoneId
integer
Timezone ID
startDate
integer
Unix epoch timestamp of Campaign start date, in milliseconds
endDate
integer
Unix epoch timestamp of Campaign end date, in milliseconds
Request Schema
fileName
string
File name
columns
object
Object containing label and value
columns object properties
label
string
Serves as the header row in the downloaded CSV/XLSX file, each label corresponds to a data field, displayed as the column header in the file
value
string
Represents the data key used to retrieve values from the result map sourced from the database, ensures each column in the CSV/XLSX file accurately reflects the relevant data, with applied formatting and timezone adjustments as needed
fileType
string
File type: csv or xlsx
token
string
Access token
download
boolean
Generate download URL: true
Request Sample
{
"fileName": "Stage Shared Advertiser_deal_id_1708536470049",
"columns": [
{
"label": "Deal ID",
"value": "name"
},
{
"label": "eCPM($)",
"value": "eCPM"
}
],
"fileType": "csv",
"token": "fd5b502b-3c49-4703-83d9-df1b397011a2",
"download": true
}
Response 200
{
"success": true,
"data": {
"url": "DownloadURL"
}
}
More Responses
Response 403
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "The campaign ID is missing or invalid. Please provide a valid campaign ID."
}
]
}
Response 500
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}

Get List of Bid Model Dimensions

GET /api/v3/bm/static/dimensions

This API will provide values of bid-model dimensions and sub-dimensions.

Dimensions
1Creative
2Inventory
3Deal ID
4Open Exchange
5Publisher Category
6Device
7Traffic Type
8Device Type
9Location
10State
11City
12Zip
13Exchange
Response 200
{
"success": true,
"data": {
"totalRecords": 5,
"filteredRecords": 5,
"dimensions": [
{
"name": "creative",
"id": 1,
"label": "Creative",
"order": 1,
"modellingEnabled": true
},
{
"name": "inventory",
"id": 2,
"label": "Inventory",
"order": 2,
"modellingEnabled": false,
"subdimensions": [
{
"name": "deal_id",
"id": 3,
"label": "Deal ID",
"order": 1,
"modellingEnabled": false
},
{
"name": "open_exchange",
"id": 4,
"label": "Open Exchange",
"order": 2,
"modellingEnabled": false
},
{
"name": "publisher_category",
"id": 5,
"label": "Publisher Category",
"order": 3,
"modellingEnabled": false
}
]
},
{
"name": "device",
"id": 6,
"label": "Device",
"order": 3,
"modellingEnabled": false,
"subdimensions": [
{
"name": "traffic_type",
"id": 7,
"label": "Traffic Type",
"order": 1,
"modellingEnabled": false
},
{
"name": "device_type",
"id": 8,
"label": "Device Type",
"order": 2,
"modellingEnabled": false
}
]
},
{
"name": "location",
"id": 9,
"label": "Location",
"order": 4,
"modellingEnabled": false,
"subdimensions": [
{
"name": "state",
"id": 10,
"label": "State",
"order": 1,
"modellingEnabled": false
},
{
"name": "city",
"id": 11,
"label": "City",
"order": 2,
"modellingEnabled": false
},
{
"name": "zip",
"id": 12,
"label": "Zip",
"order": 3,
"modellingEnabled": false
}
]
},
{
"name": "exchange",
"id": 13,
"label": "Exchange",
"order": 5,
"modellingEnabled": false
}
]
}
}