Sample ORTB 2.3 Request/Response Code for Native Ads

Document created by catherine.racette on Sep 29, 2017
Version 1Show Document
  • View in full screen mode

OpenRTB sample ad request from publishers to PubMatic

{ "at": 2, "cur": ["USD"], "device": { "dnt": 0, "ip": "195.35.72.0", "language": "de", "
ua": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/7.0; .NET CLR
2.0.50727;  .NET CLR 3.0.30729; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.3;
Media Center PC 6.0; SLCC2)" }, "id": "f589a4be-abf9-df79-9576-4424c9084865:1469620098980:
1", "imp": [{ "id": "f589a4be-abf9-df79-9576-4424c9084865:1469620098980:1:1", "native":
{ "request": "{\"ver\":\"1.0\",\"assets\":[{\"id\":1,\"req\":1,\"img\":{\"w\":150,\"h\":
150}},{\"id\":2,\"req\":1,\"img\":{\"w\":1136,\"h\":640}},{\"id\":3,\"req\":1,\"title\":
{\"len\":16}},{\"id\":4,\"req\":1,\"data\":{\"type\":2,\"len\":25}},{\"id\":5,\"required\
"
:1,\"video\":{\"protocols\":[2,3,7],\"maxduration\":300,\"minduration\":3,\"mimes\":[\"
video/mp4\"]}},{\"id\":6,\"req\":0,\"data\":{\"type\":3}},{\"id\":7,\"req\":0 ,\"img\":{}}
]}" } }], "regs": { "coppa": 0 }, "site": { "page": "http://de.insider.msg.yahoo.comclient
_ad.php?p=81921","publisher": { "domain": "yahoo.com", "id": "640" }}, "tmax": 120,
"user": { "id": "jonxSsC0KyqSKhslXkhUGjXb" }, "wseat": ["pubmaticEMEA"] }


OpenRTB sample ad response from PubMatic to publishers

{ "id": "bb4b61ef-4601-450a-ac8f-660803b02749", "seatbid": [{ "bid": [{ "id": "1143AA4A-
D08B-49A6-BBFC-ABECB444E7A3", "impid": "5398edab-4e96-4412-a3de-a34c644100a6", "price":
0.991898, "adm": "{\"Native\":{\"assets\":[{\"id\":3,\"data\":{\"value\":\"TEST_TEXT_TEST
_TEXT_TEST_TEXT_TEST_TEXT_TEST_TEXT_TEST_TEXT_TEST_TEXT_TEST_TEXT\"},\"link\":null},{\"id
\":4,\"data\":{\"value\":\"install\"},\"link\":null},{\"id\":2,\"img\":{\"url\":\"http://
cdn.splicky.com/720298803/test-banner8080.jpg\",\"w\":80,\"h\":80},\"link\":null},{\"id\"
:1,\"title\":{\"text\":\"TEST_TITLE\"},\"link\":null},{\"id\":5,\"video\":{\"vasttag\":\"
<VAST version=\\\"2.0\\\"><Ad><Wrapper><AdSystem>PubMatic</AdSystem><VASTAdTagURI><!
[CDATA[http://172.16.4.81/AdServer/layer?pubid=586&pimprid=bb4b61ef-4601-450a-ac8f-66080
3b02749&uimprid=1143AA4A-D08B-49A6-BBFC-ABECB444E7A3&plen=4256&a=${AUCTION_PRICE}&t=QVSu
Y2E9MjQzJnRzPTE0ODY5NjgwNDgmd2M9MTUxNTUmZT02XV0+PC9UcmFja2luZz4KPC9UcmFja2luZ0V2ZW50cz4KP
C9Ob25MaW5lYXJBZHM+CjwvQ3JlYXRpdmU+CjwvQ3JlYXRpdmVzPgo8L1dyYXBwZXI+CjwvQWQ+CjwvVkFTVD4K=]
]></VASTAdTagURI></Wrapper></Ad></VAST>\"},\"link\":null}],\"link\":{\"url\":\"http://spl
icky.com/test-url\",\"clicktrackers\":[\"http://ue12.splicky.com/clk?mid=41110378287123755
74&placement=76964\"]},\"imptrackers\":[\"http://172.16.4.81/AdServer/layer?pubid=586&
pimprid=bb4b61ef-4601-450a-ac8f-660803b02749&uimprid=1143AA4A-D08B-49A6-BBFC-ABECB444E7A3
&plen=196&a=${AUCTION_PRICE}&t=MCLaWQ9MTUxNTUmY2Y9MSZmcD0xLjM1ODc2JmVtPU9WS01TNHhNRFU9PSZ
0cD0yJnU9aHR0cDovL3VlMTIuc3BsaWNreS5jb20vaW1wP2FpZD0yNzI1NzkmbWlkPTQxMTEwMzc4Mjg3MTIzNzU1
NzQmcGlkPTE0JmM9e1BTUE19JmJ0PTE0NDc5MzE1Mjk4NDk==\",\"http://172.16.4.81/AdServer/layer?p
ubid=586&pimprid=bb4b61ef-4601-450a-ac8f-660803b02749&uimprid=1143AA4A-D08B-49A6-BBFC-ABE
CB444E7A3&plen=832&a=${AUCTION_PRICE}&t=AESaWQ9MTUxNTUmY2Y9MSZmcD0xLjM1ODc2JmVtPVFMQk1TNH
hNRFU9PSZ0cD0yJnU9aHR0cDovL2FrdHJhY2sucHVibWF0aWMuY29tL0FkU2VydmVyL0FkRGlzcGxheVRyYWNrZXJ
TZXJ2bGV0P29PTIzMiZ3RHNwSWQ9NiZjYW1wYWlnbklkPTE1MTU1JmNyZWF0aXZlSWQ9MCZwY3RyPTAuMDAwMDAwJ
ndEU1BCeXJJZD0xNjQxJmlzUlRCPTEmcGFnZVVSTD1OT1BBR0VVUkxTUEVDSUZJRUQmbHB1PXNwbGlja3kuY29t=\
"],\"jstracker\":null}}", "adomain": ["splicky.com"], "iurl": "http://ads.sponsormob.com/
library/3rd.png", "cid": "15155", "crid": "865671311", "ext": { "dspid": 6 } }], "seat":
"pubmatic" }], "cur": "USD"}


PubMatic Proprietary API sample ad request from publishers to PubMatic

Native ad request must always be HTTP POST request

Refer toNative Parameters for API details

Request URL: http://data-center-specific domain name/AdServer/AdServerServlet

 

Request Post Data:

pubId=31400 
siteId=32505
adId=77673
pageURL=http%3A%2F%2Ftesturl.com
kltstamp=2015-02-05+01%3A47%3A07
ranreq=0.7388663610625983
timezone=-05.00
screenResolution=320x480
adPosition=-1x-1
inIframe=1
adVisibility=0
udid=7679f2f955cae76177ee028c9cdc7bf9613f805e
udidtype=0
udidhash=2
loc=42.061996%2C-72.4989
loc_source=2
operId=201
awt=0
rs=1
adtype=12
native=%7B%22ver%22%3A%221.0%22%2C%22assets%22%3A%5B%7B%22id%22%3A1%2C%22req%22%3A1%2C%22img%22%3A%7B%22w%22%3A150%2C%22h%22%3A150%7D%7D%2C%7B%22id%22%3A2%2C%22req%22%3A1%2C%22img%22%3A%7B%22w%22%3A1136%2C%22h%22%3A640%7D%7D%2C%7B%22id%22%3A3%2C%22req%22%3A1%2C%22title%22%3A%7B%22len%22%3A16%7D%7D%2C%7B%22id%22%3A4%2C%22req%22%3A1%2C%22data%22%3A%7B%22type%22%3A2%2C%22len%22%3A25%7D%7D%2C%7B%22id%22%3A6%2C%22req%22%3A0%2C%22data%22%3A%7B%22type%22%3A3%7D%7D%2C%7B%22id%22%3A7%2C%22req%22%3A0 %2C%22img%22%3A%7B%7D%7D%5D%7D

 

PubMatic Proprietary API sample ad response from PubMatic to publishers

{ "PubMatic_Bid": { "ecpm": 1.358764, "impid": "7F01EA30-6417-4A80-9AD9-E025BABD339E", 
"oid": "7F01EA30-6417-4A80-9AD9-E025BABD339E", "creative_tag": { "native": { "imptrackers"
: ["http://172.16.4.81/AdServer/layer?a= {PUBMATIC_SECOND_PRICE}&t=TXQaWQ9MTUxNTUmY2Y9MS
ZmcD0xLjM1ODc2JmVtPVlCVk1TNHlOdz09PSZ0cD0yJnU9aHR0cDovL3VlMTIuc3BsaWNreS5jb20vaW1wP2FpZFx
1MDAzZDI3MjU3OVx1MDAyNm1pZFx1MDAzZDQxMTEwMzc4Mjg3MTIzNzU1NzRcdTAwMjZwaWRcdTAwM2QxNFx1MDAy
NmNcdTAwM2R7UFNQTX1cdTAwMjZidFx1MDAzZDE0NDc5MzE1Mjk4NDk==", "http://172.16.4.81/AdServer
/layer?a={PUBMATIC_SECOND_PRICE}&t=LXYaWQ9MTUxNTUmY2Y9MSZmcD0xLjM1ODc2JmVtPVBZT01TNHlOdz09PSZ0cD0yJnU9aHR0cDovL2FrdHJhY2sucHVibWF0aWMuY29tL0FkU2VydmVyL0FkRGlzcGxheVRyYWNrZXJTZXJ2bGV0P29wZXJJZD0xJnBlnbklkPTE1MTU1JmNyZWF0aXZlSWQ9MCZwY3RyPTAuMDAwMDAwJndEU1BCeXJJZD0xNjQxJmlzUlRCPTEmaW1wckNhcD0xJnBhZ2VVUkw9aHR0cCUzQSUyRiUyRnRlc3R1cmwuY29tJmxwdT1zcGxpY2t5LmNvbQ==="], "link": { "clicktrackers": ["http://ue12.splicky.com/clk?mid\\u003d4111037828712375574\\u0026placement\\u003d76964", "http://clicktrack.pubmatic.com/AdServer/AdDisplayTrackerServlet?operId=3&clickData=aHR0cDovL2NsaWNrdHJhY2sucHVibWF0aWMuY29tL0FkU2VydmVyL0FkRGlzcGxheVRyYWNrZXJTZXJ2bGV0P29wZXJJZD0zJnB1YklkPTMxNDAwJnNpdGVJZD0zMjUwNSZhZElkPTc3NjczJmthZHNpemVpZD0xMDUmdGxkSWQ9MCZwYXNzYmFjaz0wJmNhbXBhaWduSWQ9MTUxNTUmY3JlYXRpdmVJZD0wJmFkU2VydmVySWQ9MjQzJmltcGlkPTdGMDFFQTMwLTY0MTctNEE4MC05QUQ5LUUwMjVCQUJEMzM5RSZtb2JmbGFnPTEmaXNtb2JpbGVhcHA9MQ==&url="], "url": "http://splicky.com/test-url" },

"assets": [{ "data": { "value": "TEST_TEXT_TEST_TEXT_TEST_TEXT_TEST_TEXT_TEST_TEXT_TEST_
TEXT_TEST_TEXT_TEST_TEXT" },"id": 3

}, {"data": {"value": "install"},"id": 4 }, {"id": 2, "img": { "h": 80, "url":
"http://cdn.splicky.com/720298803/test-banner8080.jpg", "w": 80 } }, { "id": 1, "title":
{

"text": "TEST_TITLE" } }, { "id": 5, "video": { "vasttag": "<VAST version=\"2.0\"><Ad>
<Wrapper><AdSystem>PubMatic</AdSystem><VASTAdTagURI><![CDATA[http://172.16.4.81/AdServer
/layer?a={PUBMATIC_SECOND_PRICE}&t=HJFaWQmVzb3VyY2U+CjxDb21wYW5pb25DbGlja1Rocm91Z2g+aHR0
cDovL3d3dy50cmVtb3JtZWRpYS5jb208L0NvbXBhbmlvbkNsaWNrVGhyb3VnaD4KPC9Db21wYW5pb24+CjwvQ29tc
GFuaW9uQWRzPgo8L0NyZWF0aXZlPgo8L0NyZWF0aXZlcz4KPEV4dGVuc2lvbnM+CjxFeHRlbnNpb24+CjxDdXN0b2
0gLz4KPC9FeHRlbnNpb24+CjwvRXh0ZW5zaW9ucz4KPC9JbkxpbmU+CjwvQWQ+CjwvVkFTVD4K=]]></VASTAdTag
URI></Wrapper></Ad></VAST>" } }] }}, "landing_page": "splicky.com", "creative_id": "86567
1311", "iurl": "http://ads.sponsormob.com/library/3rd.png","dsp_camp_id": "950508073",
"dsp_id": 6, "campaign_id": 15155, "autorefresh_time": 0, "prefetch_data": }}


Attachments

    Outcomes