Skip to main content

Create a deal

Create a deal with this in-depth tutorial using IQM's Inventory API.

About IQM deals​

The Inventory API allows you to create and manage advertising deals. IQM offers two kinds of private deals:

  • Private Marketplace (PMP) deals are a type of programmatic advertising arrangement that allows Advertisers to purchase ad inventory through a private, invitation-only auction.
  • Programmatic Guaranteed (PG) deals are a direct negotiation between one publisher and one Advertiser that offer budget predictability and avoid auction volatility by ensuring a fixed amount of ad inventory at a pre-negotiated price.

More resources​

Before you begin​

To create a deal, the following are required:

Log in​

POST

To log in, the Authentication: Basic header is required. The Login API returns an OAuth-compliant response with an Organization Workspace ID (owId), a unique identifier for each Organization. This ID is used for any further API communications.

For further information see OAuth token.

Headers
Authentication
string required
Authentication bearer token
See Sign up and authenticate
Request schema
grant_type
string required
password for login
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 <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
{
"success": true,
"data":
{
"access_token": "106adb25-37b0-4cab-8381-d682fe7cc3c8",
"refresh_token": "eac4c1f6-781e-4b04-baff-9c2e415d1f64",
"scope": "read write",
"token_type": "bearer",
"expires_in": 35999,
"owId": 200001
}
}
More responses
Response 400
{
"success": false,
"data":
{
"status": "On Hold",
"reason": "The particular account is kept on hold due to missed payment dates for last 3 months.",
"supportEmail": "support@iqm.com"
},
"errorObjects":
[
{
"error": "User is not allowed to access provided customer",
"reason": "User is not associated with any active organization."
}
]
}
Response 403
{
"success": false,
"errorObjects":
[
{
"error": "User doesn't exist or user is not allowed to provided workspace."
}
]
}

Authentication​

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

Headers
Authentication
string required
Authentication bearer token
See Sign up and authenticate
X-IAA-OW-ID
integer required
Organization Workspace ID Header

Request exchange list​

GET

To create a PG or PMP deal, an exchange must be provided. Use the master exchange endpoint to get a list of available exchanges.

Query parameters
pageNo
integer
Page number of retrieved data, default: 1
noOfEntries
integer
Number of entries returned per page, default: 300
sortBy
string
Sort the result set by specific field. For ascending use plus(+) sign and for descending use minus(-) sign, default: +id
searchField
string
Search the result by provided keyword in the searchField, search country records by name
ids
array of integers
Selected country ID List, countries with provided IDs will be returned first compared to other records
exchangeIds
array of integers
Filters for exchange IDs
Response 200
{
"success": true,
"data": {
"data": [
{
"id": 90,
"name": "Aniview",
"urlName": "aniview"
},
{
"id": 89,
"name": "LoopMe",
"urlName": "loopme"
},
{
"id": 88,
"name": "One Tag",
"urlName": "onetag"
},
{
"id": 87,
"name": "Share Through",
"urlName": "sharethrough"
},
{
"id": 84,
"name": "Vidazoo",
"urlName": "vidazoo"
},
{
"id": 80,
"name": "Equativ",
"urlName": "equativ"
},
{
"id": 78,
"name": "Magnite",
"urlName": "magnite"
},
{
"id": 77,
"name": "Verve",
"urlName": "verve"
},
{
"id": 76,
"name": "Infolink",
"urlName": "infolink"
},
{
"id": 75,
"name": "Beachfront",
"urlName": "beachfront"
},
{
"id": 74,
"name": "Teads",
"urlName": "teads"
},
{
"id": 73,
"name": "Outbrain",
"urlName": "outbrain"
},
{
"id": 72,
"name": "Telaria",
"urlName": "telaria"
},
{
"id": 71,
"name": "33 Across",
"urlName": "ttacross"
},
{
"id": 69,
"name": "Media.net",
"urlName": "mnet"
},
{
"id": 66,
"name": "Unruly",
"urlName": "unruly"
},
{
"id": 47,
"name": "Index Exchange",
"urlName": "indexch"
},
{
"id": 46,
"name": "Triton Digital",
"urlName": "tdigital"
},
{
"id": 45,
"name": "Publisher Direct",
"urlName": "pbd"
},
{
"id": 41,
"name": "Column6",
"urlName": "adigital"
},
{
"id": 39,
"name": "Google DoubleClick",
"urlName": "adx"
},
{
"id": 37,
"name": "SpotXchange",
"urlName": "spotx"
},
{
"id": 19,
"name": "OpenX",
"urlName": "openx"
},
{
"id": 16,
"name": "Pubmatic",
"urlName": "pubmatic"
},
{
"id": 11,
"name": "Smaato",
"urlName": "smaato"
},
{
"id": 1,
"name": "iQM",
"urlName": "test"
}
],
"totalRecords": 26,
"filteredRecords": 26
}
}

Create a PG deal​

POST

Once an exchange id is selected, pass it in the exchangeId field to create a PG deal.

Request schema
dealId
string
PG deal ID
dealName
string
PG deal name
exchangeId
integer
Exchange ID associated with PG deal
cpm
integer
Cost Per Mille (CPM) value
statusId
integer
Status ID of PG deal
Active: 1
Inactive: 2
description
string
Description or notes about the deal
paymentTypeId
integer
Payment type ID
Supported values
1Publisher
2Platform
Request sample
{
"dealId": "YT-Test-1234",
"dealName": "Test deal YT31",
"exchangeId": 11,
"statusId": 2,
"paymentTypeId": 1,
"description": "Test Deal"
}
Response 200
{
"success": true,
"data": {
"message": "Deal Test deal YT31 created successfully",
"id": 2
}
}

Create a PMP deal​

POST

Once an exchange id is selected, pass it in the exchangeId field to create a PMP deal.

tip

Consider creating a PMP inventory group if you plan to target or block the same group of PMP deals across multiple campaigns. See the Optimize your inventory tutorial for step-by-step instructions.

Properties
dealId
string
PMP deal ID
dealName
string
PMP deal name
description
string
PMP deal description
cpm
integer
PMP deal Cost Per Mille (CPM) value
dealCurationTypeId
integer
Curation type ID
creativeTypes
array of integers
Creative type IDs
exchangeId
integer
Exchange associated with PMP deal
assignToCustomers
array of integers
Customer Organization Workspace IDs
active
boolean
Deal status, active (true) or inactive (false)
Response properties
id
integer
PMP deal ID
message
string
Success message
Request sample
{
"dealId": "DIewkFZALX1taoLjQg6Gge1dD6YvZYO4RChUKmOLk",
"dealName": "Deal test123",
"description": "test deal description",
"cpm": 10,
"creativeTypes": [
11,
12
],
"exchangeId": 39,
"active": true
}
Response 200
{
"success": true,
"data": {
"id": 461,
"message": "Deal test123 created successfully"
}
}
More responses
Response 400
{
"success": false,
"errorObjects": [
{
"error": "Deal id can not be longer than 500 characters",
"field": "dealId"
}
]
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Invalid exchange id/ids provided"
}
]
}
Response 500
{
"success": false,
"errorObjects": [
{
"error": "server encountered an error !"
}
]
}

Assign deals to a campaign​

PATCH
PATCH

Deals can be assigned or removed to/from campaigns. PG deals may only be assigned to PG campaigns; and PMP deals may only be assigned to Advanced campaigns.

Request schema
operations
array
Operations specifying the action, campaign IDs and PMP deal IDs
action
string
Action to perform: assign or deassign
campaignIds
array of integers
Campaign IDs to assign deals or remove deals from
pmpDealIds
array of integers
PMP deal IDs to assign/remove to/from campaigns
pgDealIds
array of integers
PG deal IDs to assign/remove to/from campaigns
Response properties
success
boolean
Indicates deals were assigned successfully: true
data
string
Success message
Request sample
{
"operations": [
{
"action": "assign",
"campaignIds": [
201,
203
],
"pmpDealIds": [
101,
102
]
},
{
"action": "deassign",
"campaignIds": [
202
],
"pmpDealIds": [
102
]
}
]
}
Response 200
{
"success": true,
"data": "PMP deal campaign mappings updated successfully"
}
More responses
Response 403
{
"success": false,
"errorObjects": [
{
"error": "Forbidden!"
}
]
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "PMP deal id/s is/are invalid or not accessible for logged-in user"
}
]
}

Get list of deals associated with campaigns​

GET

Get a list of campaigns and their associated deal IDs by campaign type ID.

Path parameter
campaignTypeId
integer
Campaign type ID
Supported values
1Advanced campaign
2PG campaign
Response properties
data
object
Name-Value pairs of campaignId and an array of deal IDs
Response 200
{
"success": true,
"data": {
"503584": [
468,
469,
23
],
"503947": [
468,
469
],
"504447": [
468,
469
],
"504448": [
589,
588
],
"505743": [
468,
469
],
"505753": [
468,
469
],
"505754": [
468,
469
],
"505755": [
588,
589
],
"505758": [
468,
469
]
}
}
Have a question?
Was this page helpful?