API · Integration Guide

Cognio System Integration Guide

Instructions for integrating external Demand-Side Platform (DSP) and Supply-Side Platform (SSP) systems with the Cognio system. It outlines the requirements and steps to establish an interface connection based on the OpenRTB protocol.

← Back to home

DSP integration

1. Overview

This guide describes how to integrate an external DSP with the Cognio system to establish an interface connection based on the OpenRTB protocol.

2. Integration steps

3. Real-time bidding (RTB)

3.1 Data transmission

The connection follows the HTTP protocol. Bid Requests are sent via the POST method as the content of the HTTP request, in JSON format.

3.2 HTTP request

POST is used instead of GET, as it allows more content and better supports binary data.

NameValueRemarks
x-openrtb-version2.5OpenRTB version

3.3 HTTP response

If Cognio participates in the auction, the response status code is 200; otherwise it is 204.

3.4 Impression volume & cost calculation

Billing is based on impressions reported in the win notice (default is the nurl; if the DSP does not support nurl, the burl is used). You must replace the {AUCTION_PRICE} macro in the win-notice URL when a bid is won. At most one ad may be reported per impression, within the impression delay required by Cognio (limited via bidresponse.seatbid.bid.exp).

3.5 Precautions

If the following fields are empty, Cognio considers the request invalid and will not process it:

4.1 Bid Request

ParameterTypeRequiredDescription
idstringYesUnique identifier for the Bid Request
impobject arrayYesOne impression object per request, representing a specific ad placement
appobjectYesApp object info; recommended for app rather than website
deviceobjectYesDevice info
userobjectNoDevice user / ad audience
atintegerYesAuction type: 1 = first-price, 2 = second-price plus
badvstring arrayNoDomain blacklist
bappstring arrayNoApp blacklist (Android: bundle/package names; iOS: numeric IDs)
regsobjectNoApplicable industry, legal, or governmental regulations

4.1.1 imp object

ParameterTypeRequiredDescription
idstringYesIdentifier for the specific display traffic sold (one per request)
tagidstringYesFixed identifier of each ad placement
nativeobjectFor nativeRefer to native object
bannerobjectFor bannerRefer to banner object
videoobjectFor videoRefer to video object
audioobjectFor audioRefer to audio object
expintegerNoSeconds that may elapse between auction and display
secureintegerNo1 = HTTPS required; 0/blank = not required
bidfloorfloatNoMinimum CPM bid price for this traffic
bidfloorcurstringYesBid currency; currently USD only

4.1.2 banner object

ParameterTypeRequiredDescription
idstringNoUnique identifier; recommended with video companion ads
wintegerYesWidth in device-independent pixels
hintegerYesHeight in device-independent pixels
posintegerNoAd position on screen (see 5.5)
mimesstring arrayYesSupported MIME types (e.g. image/jpg, image/png, image/gif)
extobjectNoExchange-specific extensions

4.1.3 native object

ParameterTypeRequiredDescription
requeststringYesMust follow the native ad specification (see native request object)
verstringYesDynamic Native Ads API version; default 1.2
apiinteger arrayNoSupported API frames (see 5.4)
battrinteger arrayNoRestricted creative attributes (see 5.3)

4.1.4–4.1.9 native request, asset, title, img, video, data objects

ObjectKey fields
native requestassets (object array, required), ver (default 1.2), context (see 5.10), contextsubtype (see 5.11)
asset requestid (required), required (1=must-have), and one of title/img/video/data
titlelen — max title length (recommended 25/90/140 chars)
imgtype (1=icon, 3=large), wmin/hmin required (pixels), mimes
videomimes (video/mp4 only), minduration, maxduration, protocols (type 3 = VAST 3.0)
datatype (see 5.12), len — max characters

4.1.10 app object

ParameterTypeRequiredDescription
idstringNoInternal app ID
namestringNoInternal app name
bundlestringYesApp package name
domainstringNoApp domain
catstring arrayNoIAB category (see 5.1)
verstringNoApp version
DSPobjectYesDSP info (see DSP object)

4.1.11 DSP object

ParameterTypeRequiredDescription
idstringYesDSP ID, used to apply for token info
namestringNoDSP name
domainstringNoDSP's top-level domain
catstring arrayNoIAB category (see 5.1)

4.1.12 device object

ParameterTypeRequiredDescription
uastringYesUser-Agent of the device
ipstringYesIPv4 address of the user's network
geoobjectYesGeographic info (see geo object)
didsha1 / didmd5stringNoHardware device ID (e.g. IMEI), hashed
dpidsha1 / dpidmd5stringNoPlatform device ID (e.g. Android ID), hashed
macsha1 / macmd5stringNoDevice MAC address, hashed
make / modelstringNoDevice manufacturer / model
os / osvstringYes / NoOperating system and version
languagestringNoDevice language (ISO-639-1-alpha-2)
connectiontypeintegerNoNetwork connection mode (see 5.8)
devicetypeintegerNoDevice type (see 5.7)
w / h / ppiintegerNoScreen width, height, pixels-per-inch
jsintegerNoJavaScript supported (0/1)
dntintegerNoDo Not Track (0 = not restricted, 1 = restricted)
lmtintegerNoLimit ad tracking (0 = not restricted, 1 = restricted)
ifastringYesAdvertising identifier (Android: GAID, iOS: IDFA)
mccmncstringNoMobile network carrier

4.1.13 geo object

ParameterTypeRequiredDescription
lat / lonfloatNoLatitude (-90 to +90) / longitude (-180 to +180)
typeintegerNoSource of geo info (see 5.13)
accuracyintegerNoAccuracy in meters (when from GPS)
ipserviceintegerNoIP location provider, for type=2 (see 5.14)
countrystringYesCountry code (ISO-3166-1-alpha-3)
region / city / zipstringNoRegion (ISO-3166-2), city (UN/LOCODE), postal code
utcoffsetintegerNoLocal time offset from UTC, in minutes

4.1.14–4.1.16 user, data, segment objects

ObjectKey fields
userid, buyeruid, gender (M/F/0), yob, keywords, geo, customdata, data
dataid / name of data provider, segment (object array)
segmentid, name, value defined by the data provider

4.2 Bid Response

ParameterTypeRequiredDescription
idstringYesMatches the request id from the Bid Request
seatbidobject arrayYesAt least one SeatBid object if a bid is offered
bididstringNoResponse ID for logs / tracking
curstringNoCurrency (ISO-4217); default USD
extobjectNoBidder-specific extensions

4.2.1 seatbid object

ParameterTypeRequiredDescription
bidobject arrayYesAt least one bid object; each maps to one impression
seatstringNoIdentifier of the bidder (advertiser/agency)
groupintegerNo0 = independent bids (default); 1 = win/fail as a group
extobjectNoBidder-specific extensions

4.2.2 bid object

ParameterTypeRequiredDescription
idstringYesBid ID for logs / tracking
impidstringYesID of the related imp object
pricefloatYesCPM price for the display
adidstringNoPreloaded ad ID used on win
nurlstringNoWin-notice URL
burlstringYesBilling-notice URL; may include ${AUCTION_PRICE} macro
admstringYesAd markup (native object or VAST for video)
adomainstring arrayNoAdvertiser domain, for filtering
bundlestringFor install adsApp package name
iurlstringNoImage link for QC / security
cid / cridstringNoCampaign ID / creative set ID for QC
catstring arrayYesIAB category of creative (see 5.1)
attrinteger arrayNoCreative attributes (see 5.3)
api / protocolintegerNoSupported API frame (5.4) / video protocol (5.6)
qagmediaratingintegerYesIQG media rating (see 5.9)
dealidstringNoDeal ID for private marketplace deals
w / hintegerNoCreative width / height (pixels)
expintegerNoSeconds the bidder will wait before display (default 3600)
extobjectNoBidder-specific extensions

4.2.3–4.2.9 native ad response objects

ObjectKey fields
native ad responseStored in adm; ver, assets (required), link (required), imptrackers (required), ext
asset responseid (matches request), required, one of title/img/video/data
titletext (required), len
imgurl (required), w/h (required), type (1=icon, 3=large)
datavalue (required), type/label (see 5.12)
videovasttag — video content in VAST format
linkurl (required landing URL), clicktrackers, ext

SSP integration

The SSP (publisher) integration follows the same OpenRTB transmission rules, Bid Request / Bid Response structure, and enumerated values as the DSP spec above. The key difference is that the app.publisher object replaces the app.DSP object.

Integration steps (publisher)

publisher object (replaces DSP object)

ParameterTypeRequiredDescription
idstringYesPublisher ID, used to apply for token info
namestringNoPublisher name
domainstringNoPublisher's top-level domain
catstring arrayNoIAB category (see 5.1)

Note: on the SSP side, our system supports one seatbid object per response, and one bid per seatbid.

5. Enumerated value lists

5.1 IAB category (top-level)

Creatives and inventory are classified using the IAB Content Taxonomy. Top-level categories are below; the full sub-category list (e.g. IAB2-1 Auto Parts) follows the standard IAB taxonomy.

ValueCategoryValueCategory
IAB1Arts & EntertainmentIAB14Society
IAB2AutomotiveIAB15Science
IAB3BusinessIAB16Pets
IAB4CareersIAB17Sports
IAB5EducationIAB18Style & Fashion
IAB6Family & ParentingIAB19Technology & Computing
IAB7Health & FitnessIAB20Travel
IAB8Food & DrinkIAB21Real Estate
IAB9Hobbies & InterestsIAB22Shopping
IAB10Home & GardenIAB23Religion & Spirituality
IAB11Law, Government & PoliticsIAB24/25Uncategorized / Non-Standard
IAB12NewsIAB26Illegal Content
IAB13Personal Finance

5.2 Banner ad type

ValueDescription
1XHTML Text Ad (usually mobile)
2XHTML Banner Ad (usually mobile)
3JavaScript Ad; must be valid XHTML (script tags included)
4iframe

5.3 Creative attribute

ValueDescription
1 / 2Audio Ad (Auto-Play / User Initiated)
3 / 4 / 5Expandable (Automatic / Click / Rollover)
6 / 7In-Banner Video Ad (Auto-Play / User Initiated)
8Pop (Over, Under, or Upon Exit)
9Provocative or Suggestive Imagery
10Shaky, Flashing, Flickering, Extreme Animation, Smileys
11Surveys
12Text Only
13User Interactive (e.g. embedded games)
14Windows Dialog or Alert Style
15Has Audio On/Off Button
16Ad Provides Skip Button
17Adobe Flash

5.4 API frame

ValueDescription
1 / 2VPAID 1.0 / 2.0
3MRAID-1
4ORMMA
5 / 6MRAID-2 / MRAID-3

5.5 Ad placement / position

ValueDescription
0Unknown
1Above the Fold
2Deprecated — may or may not be initially visible
3Below the Fold
4 / 5 / 6Header / Footer / Sidebar
7Full Screen

5.6 Video bid response protocol

ValueDescription
1 / 2 / 3VAST 1.0 / 2.0 / 3.0
4 / 5 / 6VAST 1.0 / 2.0 / 3.0 Wrapper
7VAST 4.0
8DAAST 1.0

5.7 Device type

ValueDescription
1Mobile/Tablet (v2.0)
2Personal Computer (v2.0)
3Connected TV (v2.0)
4 / 5Phone / Tablet (v2.2)
6Connected Device (v2.2)
7Set Top Box (v2.2)

5.8 Network connection mode

ValueDescription
0Unknown
1 / 2Ethernet / WIFI
3Cellular — Unknown Generation
4 / 5 / 6 / 7Cellular 2G / 3G / 4G / 5G

5.9 IQG media rating

ValueDescription
1All Audiences
2Everyone Over 12
3Mature Audiences

5.10 / 5.11 Context type & sub-type

ValueDescription
1Content-centric (newsfeed, article, gallery, video)
2Social-centric (social feed, email, chat)
3Product context (listings, details, reviews)
10–15Sub-types: general, article, video, audio, image, UGC
20–22Sub-types: social network, email, chat/IM
30–32Sub-types: selling products, app marketplace, product reviews

5.12 Data asset type

IDNameDescription
1sponsored"Sponsored By" message — brand name of the sponsor
2descDescriptive text for the product/service
3ratingRating of the product (e.g. 0–5)
4likesNumber of social ratings / likes
5downloadsNumber of downloads / installs
6pricePrice (include localized currency symbol)
7salepriceSale price (with price, to show a discount)
8 / 9phone / addressPhone number / address
10desc2Additional descriptive text
11displayurlDisplay URL for the text ad
12ctatextCall-to-action description

5.13 / 5.14 Location type & IP location services

ValueDescription
Location 1 / 2 / 3GPS / IP Address / User provided
IP 1–4ip2location / Neustar (Quova) / MaxMind / NetAcuity (Digital Element)

To register a DSP or SSP account and request a token, contact commercial@thecognio.com.

Migrated from Cognio's previous site. The full IAB sub-category taxonomy from the original page was consolidated to top-level categories here — paste the complete sub-category table back in if you need it verbatim for partner reference.