Open RTB Bid Response Specifications
The response for a bid request should have the following structure:
Bid Response Object
Attribute | Required? | Description |
---|---|---|
id | Yes | ID of the bid request, must match id sent in the request (string) |
seatbid | Yes | Collection of bids made by the bidder on behalf of a specific seat |
seatbid
Attribute | Required? | Description |
---|---|---|
bid | Yes | ID of the impression object to which this bid applies, must match id sent in the request (string) |
seatbid.bid
Attribute | Required? | Description |
---|---|---|
id | Yes | ID for the bid object chosen by the bidder (string) |
impid | Yes | ID of the impression object to which this bid applies (string) |
price | Yes | Bid price in CPM or CPC (float) |
adm | Yes | Adnation XML/JSON Ad Markup (string) |
nurl | Yes* | Win notification URL, it is recommended to use HTTP over HTTPS for nurl (string) |
burl | No* | Billing notification URL, it is recommended to use HTTP over HTTPS for burl |
ext | No | Adnation specific extension (object) |
Note:
- The nURL must be notified in order to ensure campaign capping and avoid getting the same response every time.
- The bURL is called when impression or click has been delivered, depending on CPM or CPC from btype field(default CPM).
seatbid.bid.ext
Attribute | Required? | Description |
---|---|---|
btype | Recommended | Pricing Model. Values: 1 = CPM, 2 = CPC. Default = 1 (int). Note: When response is for an Email Clicks zone request, 1 = Smart CPC. |
Note: Only Push Notification and Native ad formats may bid with the CPC pricing model.
JSON Examples
Banner / iFrame / Popunder / In-Stream / Push Notifications: JSON
{
"id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
"seatbid": [{
"bid": [{
"id": "12ab3d",
"impid": "1915966848",
"price": 0.55,
"adm": "<Adnation_XML_OR_JSON_AD_MARKUP>",
"nurl": "https://mysite.com/my_notification_url",
"burl": "https://mysite.com/my_billing_notification_url",
"ext": {
"btype": 1
}
}]
}]
}
Direct Links
{
"id": "",
"bidid": 123,
"seatbid": [{
"bid": [{
"id": "12ab3d",
"adid": 1,
"impid": "",
"price": 0.12,
"adm": "<Adnation_XML_AD_MARKUP>",
"ext":{
"btype": 2
},
"burl": "https://mysite.com/my_billing_notification_url"
}]
}]
}
Email Clicks
{
"id": "",
"bidid": 123,
"seatbid": [{
"bid": [{
"id": "12ab3d",
"adid": 1,
"impid": "",
"price": 0.12,
"adm": "<Adnation_XML_AD_MARKUP>",
"ext":{
"btype": 2
},
"burl": "https://mysite.com/my_billing_notification_url"
}]
}]
}
Fullpage Interstitial (Mobile and Desktop)
{
"id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
"seatbid": [{
"bid": [{
"id": "12ab3d",
"impid": "974090632",
"price": 0.55,
"adm": "<Adnation_XML_OR_JSON_AD_MARKUP>",
"nurl": "http://network-domain.com/win-notification",
"ext": {
"btype": 1
},
"burl": "https://mysite.com/my_billing_notification_url"
}]
}]
}
Native: JSON
{
"id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
"seatbid": [
{
"bid": [
{
"id": "12ab3d",
"impid": "1915966848",
"price": 0.71,
"nurl": "https://mysite.com/my_notification_url",
"burl": "https://mysite.com/my_billing_notification_url",
"adm": "<Adnation_JSON_AD_MARKUP_1>",
"ext": {
"btype": 1
}
}
]
},
{
"bid": [
{
"id": "12ab3e",
"impid": "1915966848",
"price": 0.62,
"nurl": "https://mysite.com/my_notification_url_2",
"burl": "https://mysite.com/my_billing_notification_url",
"adm": "<Adnation_JSON_AD_MARKUP_2>",
"ext": {
"btype": 1
}
}
]
}
]
}
ADM Examples
As you can see above, the adm parameter can contain a piece of XML or JSON. The examples below show examples of both XML and JSON as used in this ADM parameter.
Banner: XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<ad>
<imageAd>
<clickUrl><![CDATA[http://mysite.com/landingpages/mypage]]></clickUrl>
<imgUrl><![CDATA[http://mysite.com/images/myad.jpg]]></imgUrl>
</imageAd>
</ad>
Direct Links: XML
<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
<ad>
<emailClick>
<url><![CDATA[https://mysite.com/landingpages?el={email_encoded}]]></url>
</emailClick>
</ad>
Email Clicks: XML
<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
<ad>
<emailClick>
<url><![CDATA[https://mysite.com/landingpages?el={email_encoded}]]></url>
</emailClick>
</ad>
Iframe HTML Banner: XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<ad>
<iframeAd>
<url><![CDATA[http://mysite.com/iframe_url]]></url>
</iframeAd>
</ad>
Note: The support for the iFrame markup response must be enabled by the network on the partner account level.
Fullpage Interstitial Iframe (Mobile and Desktop): XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<ad>
<iframeAd>
<url><![CDATA[http://mysite.com/landingpages/mypage]]></url>
</iframeAd>
</ad>
Fullpage Interstitial Banner (Mobile and Desktop): XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<ad>
<imageAd>
<clickUrl><![CDATA[http://mysite.com/landingpages/mypage]]></clickUrl>
<imgUrl><![CDATA[http://mysite.com/images/myad.jpg]]></imgUrl>
</imageAd>
</ad>
Popunder: XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<ad>
<popunderAd>
<url><![CDATA[http://mysite.com/landingpages/mypage]]></url>
</popunderAd>
</ad>
In-Stream Ads: JSON
For In-Stream ads the adm parameter should contain a JSON encoded string. It can follow one of two structures, either by using Local VAST or Remote VAST.
By using local VAST the whole VAST tag will be generated on the network side and the partner will need to send all individual data needed for the ad to be correctly displayed. With the remote VAST the content will be loaded by using the VAST Wrapper standard.
Local VAST
{\"instream\":{\"videoUrl\":\"https:\/\/mysite.com\/video.mp4\",\"clickUrl\":\"https:\/\/mysite.com\/clickurl\",\"trackingEvents\":[{\"type\":\"impression\",\"url\":\"https:\/\/mysite.com\/impression\"},{\"type\":\"complete\",\"url\":\"https:\/\/mysite.com\/complete\"},{\"type\":\"progress\",\"offset\":\"00:00:10.000\",\"url\":\"https:\/\/mysite.com\/progress10secs\"}],\"cta\":{\"displayUrl\":\"somedomain.com\",\"text\":\"Click Here\"}}}
Based on the following JSON object:
{
"instream": {
"videoUrl": "https://mysite.com/video.mp4",
"clickUrl": "https://mysite.com/clickurl",
"trackingEvents": [{
"type": "impression",
"url": "https://mysite.com/impression"
}, {
"type": "complete",
"url": "https://mysite.com/complete"
}, {
"type": "progress",
"offset": "00:00:10.000",
"url": "https://mysite.com/progress10secs"
}],
"cta": {
"displayUrl": "somedomain.com",
"text": "Click Here"
}
}
}
Remote VAST
{\"instream\":{\"remoteUrl\":\"https:\/\/mysite.com\/vasturl\"}}
Based on the following JSON object:
{
"instream": {
"remoteUrl": "https://mysite.com/vasturl"
}
}
Tracking Events
When using the In-Stream local VAST bid response structure it is allowed to send a list of tracking events. The supported event types are impression, progress and complete.
The tracking events must follow the same structures as in the example above.
Native Ads: JSON
For native ads the adm parameter should contain a JSON encoded string like this:
{\"native\":{\"link\":{\"url\":\"http:\/\/mysite.com\/landingpages\/mypage\"},\"assets\":[{\"id\":1,\"required\":1,\"img\":{\"url\":\"http:\/\/mysite.com\/images\/myad.jpg\",\"w\":300,\"h\":300,\"ext\":{\"crop_anchor_point\":1}}},{\"id\":2,\"title\":{\"text\":\"Ad Title\"}},{\"id\":3,\"data\":{\"type\":2,\"value\":\"Ad description\"}},{\"id\":4,\"data\":{\"type\":1,\"value\":\"Ad brand\"}},{\"id\":5,\"ext\":{\"crop_anchor_point\":1}}],\"imptrackers\":[\"https://mytracker1.com\"],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"https://myEventTracker1.com\"}]}}
- crop_anchor_point: MIDDLE_CENTER = 0, TOP_LEFT = 1, TOP_CENTER = 2, TOP_RIGHT = 3, MIDDLE_LEFT = 4, MIDDLE_RIGHT = 5, BOTTOM_LEFT = 6, BOTTOM_CENTER = 7, BOTTOM_RIGHT= 8 (integer) - not mandatory
Which is based on the following JSON object:
{
"native": {
"link": {
"url": "http://mysite.com/landingpages/mypage"
},
"assets": [
{
"id": 1,
"required": 1,
"img": {
"url": "http://mysite.com/images/myad.jpg",
"w": 300,
"h": 300,
"ext": {
"crop_anchor_point": 1
}
}
},
{
"id": 2,
"title": {
"text": "Ad Title"
}
},
{
"id": 3,
"data": {
"type": 2,
"value": "Ad description"
}
},
{
"id": 4,
"data": {
"type": 1,
"value": "Ad brand"
}
}
],
"imptrackers": [
"https://mytracker1.com",
"https://mytracker2.com"
],
"eventtrackers": [
{
"event": 1,
"method": 1,
"url": "https://myEventTracker1.com"
}, {
"event": 1,
"method": 1,
"url": "https://myEventTracker2.com"
}
]
}
}
Push Notification Ads: JSON
For Push Notification ads the adm parameter should contain a JSON encoded string like this (note that we use the 'native' object to implement push notification ads). Width and height depend on the width and height coming from request. Currently supported dimensions are 192x192 and 720x480. One image asset per notification.
{\"native\":{\"link\":{\"url\":\"http:\/\/mysite.com\/landingpages\/mypage\"},\"assets\":[{\"id\":1,\"required\":1,\"img\":{\"url\":\"http:\/\/mysite.com\/images\/myad.jpg\",\"w\":720,\"h\":480}},{\"id\":2,\"title\":{\"text\":\"Ad Title\"}},{\"id\":3,\"data\":{\"type\":2,\"value\":\"Ad description\"}}],\"imptrackers\":[\"https://mytracker1.com\"]}}
Which is based on the following JSON object:
{
"native": {
"link": {
"url": "http://mysite.com/landingpages/mypage"
},
"assets": [
{
"id": 1,
"required": 1,
"img": {
"url": "http://mysite.com/images/myad.jpg",
"w": 720,
"h": 480
}
},
{
"id": 2,
"title": {
"text": "Ad Title"
}
},
{
"id": 3,
"data": {
"type": 2,
"value": "Ad description"
}
}
],
"imptrackers": [
"https://mytracker1.com"
]
}
}
* Only one imptracker URL is allowed in the case of Push Notification ads * We use the 'native' object for push notification ads
No Bid Response
To answer to a bid request without making an actual bid, an HTTP response code 204 "No Content" should be sent.
Win Notification
If the parameter Bid Response Object -> Seat Bid Object -> Bid Object -> nurl is in the bid response and is a valid URL, Adnation platform will send a GET request to it. This URL can have a few tokens to be replaced by Adnation before doing the GET:
${AUCTION_ID} - ID of the bid request; from "Bid Request Object -> id" attribute.
${AUCTION_BID_ID} - ID of the bid; from "Bid Response Object -> bidid" attribute.
${AUCTION_IMP_ID} - ID of the impression just won; from "Bid Request Object -> Impression Object -> id" attribute.
${AUCTION_SEAT_ID} - ID of the bidder seat for whom the bid was made; from "Bid Response Object -> Seat Bid Object -> Bid Object -> id" attribute.
${AUCTION_AD_ID} - ID of the ad markup the bidder wishes to serve; from "Bid Response Object -> Seat Bid Object -> Bid Object -> adid" attribute.
${AUCTION_PRICE} - Settlement price using the same currency and units as the bid; from "Bid Response Object -> Seat Bid Object -> Bid Object -> price" attribute.
${AUCTION_CURRENCY} - The currency used in the bid (explicit or implied); for confirmation only.
Example:
https://mysite.com/my_notification_url?id=${AUCTION_ID}&bidid=${AUCTION_BID_ID}&price=${AUCTION_PRICE}¤cy=${AUCTION_CURRENCY}