{"_id":"58cc07bf919db02f0065a386","__v":1,"category":{"_id":"577f8476a77c700e006a6c52","project":"574ff4bd3fa1870e00889ba6","version":"574ff4bd3fa1870e00889ba9","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-08T10:46:14.043Z","from_sync":false,"order":14,"slug":"open-rtb-23-native-extention-version-11","title":"Open RTB 2.3"},"version":{"_id":"574ff4bd3fa1870e00889ba9","project":"574ff4bd3fa1870e00889ba6","__v":20,"createdAt":"2016-06-02T08:56:29.492Z","releaseDate":"2016-06-02T08:56:29.492Z","categories":["574ff4bd3fa1870e00889baa","577278ecdceb570e003a9001","577279865617b117009e643f","577279985617b117009e6440","577279bc8c48e00e00503504","5774fe18605b770e0037be8a","577ce3ad87acf617003c4187","577f8476a77c700e006a6c52","57b486ae0d2b640e00e9d3f5","57b722133d3e620e004ec74b","57bd95f00fe3a00e003e2cc5","57c8349359cd4b0e00b888ef","57c8349b5754fa1700b12242","57cedb0bad483e0e00890239","57cedbe807d7ea0e00e438cc","57d82967156ef72b007ffcd8","58ee353ad1ee2f0f0034a13d","596623221738df00298622a5","59a51730192dba000fc9ca38","59a8129f1e7b26000fa0fb1a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"user":"574ff3adaef76a0e00840968","project":"574ff4bd3fa1870e00889ba6","parentDoc":null,"updates":["592e49e23fe79d000fecd196"],"next":{"pages":[],"description":""},"createdAt":"2017-03-17T15:58:55.924Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Open RTB Request\"\n}\n[/block]\nThe Open RTB request for native ads is fully compliant with Open RTB 2.3 standards. \n\n## Bid Request Structure\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"imp\",\n    \"2-0\": \"site\",\n    \"3-0\": \"app\",\n    \"4-0\": \"device\",\n    \"5-0\": \"user\",\n    \"7-0\": \"tmax\",\n    \"6-0\": \"at\",\n    \"8-0\": \"wseat\",\n    \"0-3\": \"Unique ID of the bid request, provided by the exchange.\",\n    \"1-3\": \"Unique ID of the bid request, provided by the exchange.\",\n    \"2-3\": \"Details via a Site object (Section 3.2.6) about the publisher’s website. Only applicable and recommended for websites\",\n    \"3-3\": \"Details via an App object (Section 3.2.7) about the publisher’s\\napp (i.e., non-browser applications). Only applicable and recommended for apps.\",\n    \"4-3\": \"Details via a Device object (Section 3.2.11) about the user’s device to which the impression will be delivered.\",\n    \"5-3\": \"Details via a User object (Section 3.2.13) about the human user of the device; the advertising audience.\",\n    \"6-3\": \"Auction type, where 1 = First Price, 2 = Second Price Plus.\\nExchange-specific auction types can be defined using values greater than 500.\",\n    \"7-3\": \"Maximum time in milliseconds to submit a bid to avoid timeout. This value is commonly communicated offline.\",\n    \"8-3\": \"Whitelist of buyer seats allowed to bid on this impression. Seat IDs must be communicated between bidders and the exchange a priori. Omission implies no seat restrictions.\",\n    \"9-0\": \"allimps\",\n    \"9-3\": \"Flag to indicate if Exchange can verify that the impressions offered represent all of the impressions available in context (e.g., all on the web page, all video spots such as pre/mid/post roll) to support road-blocking. 0 = no or unknown, 1 = yes, the impressions offered represent all that are available.\",\n    \"10-0\": \"cur\",\n    \"10-3\": \"Array of allowed currencies for bids on this bid request using ISO-4217 alpha codes. Recommended only if the exchange accepts multiple currencies.\",\n    \"11-0\": \"bcat\",\n    \"11-3\": \"Blocked advertiser categories using the IAB content categories\",\n    \"12-0\": \"badv\",\n    \"12-3\": \"Block list of advertisers by their domains (e.g., “ford.com”).\",\n    \"0-1\": \"string\",\n    \"1-1\": \"object\",\n    \"0-2\": \"Unique ID of the bid request, provided by the exchange.\",\n    \"1-2\": \"Unique ID of the bid request, provided by the exchange.\",\n    \"2-2\": \"PN will send this for mobile websites.\",\n    \"2-1\": \"object\",\n    \"3-1\": \"object\",\n    \"4-1\": \"object\",\n    \"3-2\": \"PN will send this for apps only\",\n    \"4-2\": \"Details via a Device object about the user’s device to which the impression will be delivered.\",\n    \"5-2\": \"Details via a User object about the human user of the device; the advertising audience.\",\n    \"6-2\": \"Auction type, where 1 = First Price, 2 = Second Price Plus.\\nPN conducts a second price auction.\",\n    \"7-2\": \"Maximum time in milliseconds to submit a bid to avoid timeout. This value is commonly communicated offline.\",\n    \"8-2\": \"Whitelist of buyer seats allowed to bid on this impression. Seat IDs must be communicated between bidders and the exchange a priori. Omission implies no seat restrictions.\",\n    \"9-2\": \"Flag to indicate if Exchange can verify that the impressions offered represent all of the impressions available in context (e.g., all on the web page, all video spots such as pre/mid/post roll) to support road-blocking. 0 = no or unknown, 1 = yes, the impressions offered represent all that are available.\",\n    \"10-2\": \"Array of allowed currencies for bids on this bid request using ISO-4217 alpha codes. PN only allows bidding in USD\",\n    \"11-2\": \"Blocked advertiser categories using the IAB content categories. DSP need to respect bcat to align with PN publishers and exchange wide settings\",\n    \"12-2\": \"Block list of advertisers by their domains (e.g., “ford.com”). Typically designated by publishers\",\n    \"5-1\": \"object\",\n    \"6-1\": \"integer\",\n    \"7-1\": \"integer\",\n    \"8-1\": \"array\",\n    \"9-1\": \"integer; default 0\",\n    \"10-1\": \"string array\",\n    \"11-1\": \"string array\"\n  },\n  \"cols\": 3,\n  \"rows\": 13\n}\n[/block]\n##Definition of the Impression Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"id\",\n    \"h-2\": \"Description\",\n    \"0-1\": \"string; required\",\n    \"0-2\": \"A unique identifier for this impression within the context of the bid request.\",\n    \"1-0\": \"banner\",\n    \"1-1\": \"object; required\",\n    \"1-2\": \"A Banner object; Details below\",\n    \"2-0\": \"bidfloor\",\n    \"3-0\": \"bidfloorcur\",\n    \"3-1\": \"string; default “USD”\",\n    \"3-2\": \"Currency specified using ISO-4217 alpha codes. Pubnative only support USD\",\n    \"2-1\": \"float\",\n    \"2-2\": \"Minimum bid for this impression expressed in CPM.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\nSample Impression Object\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"......\\n \\\"imp\\\": [\\n    {\\n      \\\"id\\\": \\\"87d13330-0f03-4f30-9c75-6f2362c05893\\\",\\n      \\\"banner\\\": {\\n        \\\"w\\\": 300,\\n        \\\"h\\\": 250\\n      },\\n      \\\"tagid\\\": \\\"1\\\",\\n      \\\"bidfloor\\\": 0.02,\\n      \\\"bidfloorcur\\\": \\\"USD\\\"\\n    }\\n  ],......\",\n      \"language\": \"json\",\n      \"name\": \"Impression object\"\n    }\n  ]\n}\n[/block]\n##Definition of the Banner Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"h-3\": \"Default\",\n    \"h-4\": \"Description\",\n    \"0-0\": \"w\",\n    \"0-1\": \"integer; required\",\n    \"0-2\": \"Width of the impression in pixels.\\nIf neither wmin nor wmax are specified, this value is an exact width measurement.  Otherwise it is a preferred width.\",\n    \"0-3\": \"1.1\",\n    \"0-4\": \"Version of OpenRTB native extension\",\n    \"1-0\": \"h\",\n    \"1-1\": \"integer; recommended\",\n    \"1-2\": \"Height of the impression in pixels.\\nIf neither hmin nor hmax are specified, this value is an exact height measurement.  Otherwise it is a preferred height\",\n    \"1-3\": \"-\",\n    \"1-4\": \"the ad unit ID of the native ad unit\",\n    \"2-0\": \"wmax\",\n    \"2-1\": \"integer; optional\",\n    \"2-2\": \"Maximum width of the impression in pixels.\\nIf included along with a w value, then w should be interpreted as a recommended or preferred width.\",\n    \"2-3\": \"1\",\n    \"2-4\": \"The number of identical placements in this layout\",\n    \"3-0\": \"hmax\",\n    \"3-1\": \"integer; optional\",\n    \"3-2\": \"Maximum height of the impression in pixels\\nIf included along with a h value, then h should be interpreted as a recommended or preferred height.\",\n    \"3-3\": \"0\",\n    \"3-4\": \"xx (see the IAB Core Six layout types).  0 for the first ad, 1 for the second ad, and so on. This is not hte sequence number of the content in this stream.\",\n    \"4-0\": \"wmin\",\n    \"4-1\": \"integer; optional\",\n    \"4-2\": \"Minimum width of the impression in pixels.\",\n    \"4-3\": \"-\",\n    \"4-4\": \"An array of Asset Objects. Any bid must comply with the array of elements expressed by the Exchange\",\n    \"5-0\": \"hmin\",\n    \"5-1\": \"integer; optional\",\n    \"5-2\": \"Minimum height of the impression in pixels.\",\n    \"6-0\": \"id\",\n    \"6-1\": \"string; optional\",\n    \"6-2\": \"Unique identifier for the banner object. \\nRecommended when Banner objects are used with a Video object to represent an array of companion ads. Values usually start at 1 and increase with each object; should be unique within an impression.\",\n    \"7-0\": \"btype\",\n    \"7-1\": \"integer array ; optional\",\n    \"7-2\": \"Blocked banner ad types.\",\n    \"8-0\": \"battr\",\n    \"8-1\": \"integer array ; optional\",\n    \"8-2\": \"Blocked creative attributes.\",\n    \"9-0\": \"pos\",\n    \"9-1\": \"integer ; optional\",\n    \"9-2\": \"Ad position on screen.\",\n    \"10-0\": \"mimes\",\n    \"10-2\": \"Content MIME types supported. \\nPopular MIME types may include “application/x-shockwave-flash”, “image/jpg”, and “image/gif”.\",\n    \"10-1\": \"string array ; optional\",\n    \"11-0\": \"topframe\",\n    \"11-2\": \"Indicates if the banner is in the top frame as opposed to an iframe, where 0 = no, 1 = yes.\",\n    \"11-1\": \"integer ; optional\",\n    \"12-0\": \"expdir\",\n    \"12-2\": \"Directions in which the banner may expand\",\n    \"12-1\": \"integer array ; optional\",\n    \"13-0\": \"api\",\n    \"13-1\": \"integer array ; optional\",\n    \"13-2\": \"List of supported API frameworks for this impression\",\n    \"14-0\": \"ext\",\n    \"14-2\": \"Placeholder for exchange-specific extensions to OpenRTB\",\n    \"14-1\": \"object ; optional\"\n  },\n  \"cols\": 3,\n  \"rows\": 15\n}\n[/block]\nSample Banner Object\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"....\\n\\\"banner\\\": {\\n             \\\"w\\\": 728, \\\"h\\\": 90, \\\"pos\\\": 1,\\n             \\\"btype\\\": [ 4 ],\\n             \\\"battr\\\": [ 14 ],\\n             \\\"api\\\": [ 3 ]\\n}\\n....\",\n      \"language\": \"json\",\n      \"name\": \"Banner Object\"\n    }\n  ]\n}\n[/block]\n##Definition of the App Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Scope\",\n    \"h-2\": \"Type\",\n    \"0-0\": \"id\",\n    \"0-1\": \"string;\\nrecommended\",\n    \"0-2\": \"Pubnative - specific app ID.\",\n    \"1-0\": \"name\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Pubnative - specific  App name\",\n    \"2-0\": \"bundle\",\n    \"2-1\": \"string\",\n    \"2-2\": \"Application bundle or package name (e.g., com.foo.mygame);\",\n    \"3-0\": \"storeurl\",\n    \"3-2\": \"App store URL for an installed app;\",\n    \"3-1\": \"string\",\n    \"4-0\": \"cat\",\n    \"4-1\": \"string array\",\n    \"4-2\": \"Array of IAB content categories of the app.\",\n    \"5-0\": \"ver\",\n    \"5-1\": \"string\",\n    \"5-2\": \"Application version\",\n    \"7-0\": \"keywords\",\n    \"7-2\": \"Comma separated list of keywords about the app.\",\n    \"7-1\": \"string\",\n    \"6-0\": \"publisher\",\n    \"6-1\": \"object\",\n    \"6-2\": \"Details about the Publisher\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\nSample App Object\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" \\\"app\\\":{  \\n      \\\"id\\\":\\\"1004844\\\",\\n      \\\"name\\\":\\\"Countabc\\\",\\n      \\\"bundle\\\":\\\"com.foo.mygame\\\",\\n      \\\"storeurl\\\":\\\"https://play.google.....\\\", \\n      \\\"cat\\\":[  \\n         \\\"IAB18\\\"\\n      ],\\n      \\\"keywords\\\":\\\"shopping\\\", \\n      \\\"ver\\\":\\\"10.1\\\", \\n      \\\"publisher\\\":{  \\n         \\\"id\\\":\\\"1028\\\",\\n         \\\"name\\\":\\\"Count LTD\\\",\\n      }\\n   },\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n#Definition of the Device Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Scope\",\n    \"h-2\": \"Type\",\n    \"0-0\": \"ua\",\n    \"0-1\": \"string;\\nrecommended\",\n    \"0-2\": \"Browser user agent string.\",\n    \"1-0\": \"geo\",\n    \"1-1\": \"object;\\nrecommended\",\n    \"1-2\": \"Location of the device assumed to be the user’s current.\\ngeo.type - Possible values 1,2\\n1- Geo info generated from GPS system\\n2-  Geo info generated from IP  address.\",\n    \"2-0\": \"dnt\",\n    \"2-2\": \"Standard “Do Not Track” flag as set in the header by the browser, where 0 = tracking is unrestricted, 1 = do not track.\",\n    \"2-1\": \"integer;\\nrecommended\",\n    \"3-0\": \"ip\",\n    \"3-1\": \"string;\\nrecommended\",\n    \"3-2\": \"IPv4 address closest to device.\",\n    \"4-0\": \"devicetype\",\n    \"4-1\": \"integer\",\n    \"4-2\": \"The general type of device.\",\n    \"5-0\": \"make\",\n    \"5-1\": \"string\",\n    \"5-2\": \"Device make (e.g., “Apple”).\",\n    \"6-0\": \"model\",\n    \"6-1\": \"string\",\n    \"6-2\": \"Device model (e.g., “iPhone”).\",\n    \"7-0\": \"os\",\n    \"7-1\": \"string\",\n    \"7-2\": \"Device operating system (e.g., “iOS”).\",\n    \"8-0\": \"osv\",\n    \"8-1\": \"string\",\n    \"8-2\": \"Device operating system version\",\n    \"9-0\": \"hwv\",\n    \"9-2\": \"Hardware version of the device\",\n    \"9-1\": \"string\",\n    \"10-0\": \"carrier\",\n    \"10-2\": \"Carrier or ISP (e.g., “VERIZON”). “WIFI” is often used in mobile to indicate high bandwidth (e.g., video friendly vs. cellular).\",\n    \"10-1\": \"string\",\n    \"11-0\": \"connectiontype\",\n    \"11-1\": \"integer\",\n    \"11-2\": \"Network connection type.\\n0 -Unknown, 1- Ethernet, 2 - WIFI, 3 -Cellular Network – Unknown Generation\",\n    \"13-0\": \"ifa\",\n    \"13-1\": \"string\",\n    \"13-2\": \"ID sanctioned for advertiser use in the clear (i.e., not hashed)\",\n    \"12-0\": \"devicetype\",\n    \"12-1\": \"integer\",\n    \"12-2\": \"The general type of device\"\n  },\n  \"cols\": 3,\n  \"rows\": 14\n}\n[/block]\nSample Device Object\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"device\\\":{  \\n      \\\"dnt\\\":2,\\n      \\\"ua\\\":\\\"Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4\\\",\\n      \\\"ip\\\":\\\"8.8.8.8\\\",\\n      \\\"geo\\\":{  \\n         \\\"lat\\\":0,\\n         \\\"lon\\\":0,\\n         \\\"country\\\":\\\"USA\\\",\\n         \\\"region\\\":\\\"CA\\\",\\n         \\\"city\\\":\\\"Mountain View\\\",\\n         \\\"zip\\\":\\\"94040\\\",\\n         \\\"type\\\":2 // 1- GPS, 2- IP address\\n      },\\n      \\\"carrier\\\":\\\"Google\\\",\\n      \\\"language\\\":\\\"en\\\",\\n      \\\"make\\\":\\\"Apple\\\",\\n      \\\"model\\\":\\\"iphone\\\",\\n      \\\"os\\\":\\\"iOS\\\",\\n      \\\"osv\\\":\\\"8\\\",\\n      \\\"connectiontype\\\":2, // 0 -Unknown, 1- Ethernet, 2 - WIFI, 3 -Cellular Network – Unknown Generation\\n      \\\"devicetype\\\":1, // 1 - Mobile/Tablet\\n      \\\"ifa\\\":\\\"1E2DFA89-47FD-9941-DF1FC4E6484C\\\"\\n   },\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n## Definition of the User Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Scope\",\n    \"h-2\": \"Type\",\n    \"0-0\": \"id\",\n    \"0-1\": \"string; recommended\",\n    \"0-2\": \"Exchange-specificID for the user.\",\n    \"1-0\": \"gender\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Gender, where “M” = male, “F” = female, “O” = known to be other (i.e., omitted is unknown).\",\n    \"2-0\": \"keywords\",\n    \"2-2\": \"Comma separated list of keywords, interests, or intent.\",\n    \"2-1\": \"object\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\nSample User Object\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \".....\\n\\\"user\\\":{  \\n      \\\"id\\\":\\\"78550233-77fc-5ba8-8bff-f6a1809344eb\\\",\\n      \\\"gender\\\":\\\"m\\\",\\n      \\\"keywords\\\":\\\"sports, paid user\\\",\\n   },\\n\\n.....\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##Sample Bid Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"id\\\":\\\"4fc8acc7-6bb2-489d-7547-d3291547f17c\\\",\\n   \\\"imp\\\":[  \\n      {  \\n         \\\"id\\\":\\\"46600265-e3a4-44dd-7114-49d21405cacf\\\",\\n        \\\"banner\\\": {\\n             \\\"w\\\": 320, \\\"h\\\": 50, \\n             \\\"pos\\\": 1,\\n             \\\"btype\\\": [ 4 ],\\n             \\\"battr\\\": [ 14 ],\\n             \\\"api\\\": [ 3 ]\\n\\t\\t\\t\\t\\t\\t\\t\\t},\\n         \\\"bidfloor\\\":0.01,\\n         \\\"bidfloorcur\\\":\\\"USD\\\"\\n      }\\n   ],\\n \\\"app\\\":{  \\n      \\\"id\\\":\\\"1004844\\\",\\n      \\\"name\\\":\\\"Countabc\\\",\\n      \\\"bundle\\\":\\\"com.foo.mygame\\\",\\n      \\\"storeurl\\\":\\\"https://play.google.....\\\", \\n      \\\"cat\\\":[  \\n         \\\"IAB18\\\"\\n      ],\\n      \\\"keywords\\\":\\\"shopping\\\", \\n      \\\"ver\\\":\\\"10.1\\\", \\n      \\\"publisher\\\":{  \\n         \\\"id\\\":\\\"1028\\\",\\n         \\\"name\\\":\\\"Count LTD\\\"\\n      }\\n   },\\n   \\\"device\\\":{  \\n      \\\"dnt\\\":1,\\n      \\\"ua\\\":\\\"Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4\\\",\\n      \\\"ip\\\":\\\"8.8.8.8\\\",\\n      \\\"geo\\\":{  \\n         \\\"lat\\\":0,\\n         \\\"lon\\\":0,\\n         \\\"country\\\":\\\"USA\\\",\\n         \\\"region\\\":\\\"CA\\\",\\n         \\\"city\\\":\\\"Mountain View\\\",\\n         \\\"zip\\\":\\\"94040\\\",\\n         \\\"type\\\":2\\n      },\\n      \\\"carrier\\\":\\\"Google\\\",\\n      \\\"language\\\":\\\"en\\\",\\n      \\\"make\\\":\\\"Apple\\\",\\n      \\\"model\\\":\\\"iphone\\\",\\n      \\\"os\\\":\\\"iOS\\\",\\n      \\\"osv\\\":\\\"8\\\",\\n      \\\"connectiontype\\\":2,\\n      \\\"devicetype\\\":1,\\n      \\\"ifa\\\":\\\"1E2DFA89-47FD-9941-DF1FC4E6484C\\\"\\n   },\\n  \\\"user\\\":{  \\n      \\\"id\\\":\\\"78550233-77fc-5ba8-8bff-f6a1809344eb\\\",\\n      \\\"gender\\\":\\\"m\\\",\\n      \\\"keywords\\\":\\\"sports, paid user\\\"\\n   },\\n   \\\"at\\\":2,\\n   \\\"tmax\\\":100,\\n   \\\"allimps\\\":0,\\n   \\\"cur\\\":[  \\n      \\\"USD\\\"\\n   ],\\n   \\\"bcat\\\":[  \\n      \\\"IAB1-1\\\",\\n      \\\"IAB18\\\",\\n      \\\"IAB1\\\",\\n      \\\"IAB14\\\",\\n      \\\"IAB24\\\",\\n      \\\"IAB17\\\",\\n      \\\"IAB15\\\",\\n      \\\"IAB22\\\",\\n      \\\"IAB20\\\",\\n      \\\"IAB13\\\",\\n      \\\"IAB9-7\\\",\\n      \\\"IAB1\\\",\\n      \\\"IAB12\\\",\\n      \\\"IAB6\\\",\\n      \\\"IAB3\\\",\\n      \\\"IAB3\\\",\\n      \\\"IAB14-1\\\",\\n      \\\"IAB5\\\",\\n      \\\"IAB7\\\"\\n   ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"OpenRTB Response\"\n}\n[/block]\nThe structure and contents of the Bid Response are the same as in the OpenRTB standard. The difference is how ad creative is returned. \n\n## BidResponse Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Scope\",\n    \"h-2\": \"Type\",\n    \"0-0\": \"id\",\n    \"0-1\": \"string; required\",\n    \"0-2\": \"ID of the bid request to which this is a response.\",\n    \"1-0\": \"seatbid\",\n    \"1-1\": \"object array\",\n    \"1-2\": \"Array of seatbid objects; 1+ required if a bid is to be made.\",\n    \"2-0\": \"bidid\",\n    \"2-1\": \"string\",\n    \"2-2\": \"Bidder generated response ID to assist with logging/tracking.\",\n    \"3-0\": \"cur\",\n    \"3-1\": \"string; default “USD\",\n    \"3-2\": \"Bid currency using ISO-4217 alpha codes. PN accepts on USD.\",\n    \"4-0\": \"nbr\",\n    \"4-1\": \"integer optional\",\n    \"4-2\": \"Reason for not bidding. Refer to OpenRTB Spec\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n## Definition of Seat Bid Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Scope\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Default\",\n    \"h-4\": \"Description\",\n    \"0-0\": \"bid\",\n    \"0-1\": \"object array; required\",\n    \"0-2\": \"Array of 1+ Bid objects (Section 4.2.3) each related to an impression. Multiple bids can relate to the same impression\",\n    \"0-3\": \"-\",\n    \"0-4\": \"Top level native object\",\n    \"1-0\": \"seat\",\n    \"1-1\": \"string\",\n    \"1-2\": \"ID of the bidder seat on whose behalf this bid is made.\",\n    \"2-0\": \"group\",\n    \"2-1\": \"integer; default 0\",\n    \"2-2\": \"0 = impressions can be won individually; 1 = impressions must be won or lost as a group.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n## Definition of the Bid Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Scope\",\n    \"h-2\": \"Title\",\n    \"0-0\": \"id\",\n    \"0-1\": \"string; required\",\n    \"0-2\": \"Bidder generated bid ID to assist with logging/tracking.\",\n    \"1-0\": \"impid\",\n    \"1-1\": \"string; required\",\n    \"1-2\": \"ID of the Imp object in the related bid request.\",\n    \"2-0\": \"price\",\n    \"2-1\": \"float; required\",\n    \"2-2\": \"Bid price expressed as CPM although the actual transaction is\\nfor a unit impression only. Note that while the type indicates float, integer math is highly recommended when handling currencies (e.g., BigDecimal in Java).\",\n    \"3-0\": \"adid\",\n    \"3-1\": \"string\",\n    \"3-2\": \"ID of a preloaded ad to be served if the bid wins.\",\n    \"4-0\": \"nurl\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Win notice URL called by the exchange if the bid wins; optional means of serving ad markup.Please check Billing section for proper implementation.\",\n    \"5-0\": \"adm\",\n    \"5-1\": \"string; required\",\n    \"5-2\": \"means of conveying ad markup in case the bid wins\",\n    \"6-0\": \"adomain\",\n    \"6-1\": \"string array,\\nrequired\",\n    \"6-2\": \"Advertiser domain for block list checking (e.g., “ford.com”). This can be an array of for the case of rotating creatives. Exchanges can mandate that only one domain is allowed.Required for standard size ad formats.\",\n    \"7-0\": \"bundle\",\n    \"7-1\": \"string\",\n    \"7-2\": \"Bundle or package name (e.g., com.foo.mygame) of the app being advertised, if applicable; intended to be a unique ID across exchanges.\",\n    \"8-0\": \"iurl\",\n    \"8-1\": \"string\",\n    \"8-2\": \"URL without cache-busting to an image that is representative\\nof the content of the campaign for ad quality/safety checking.\",\n    \"9-0\": \"cid\",\n    \"9-1\": \"string\",\n    \"9-2\": \"Campaign ID to assist with ad quality checking; the collection of creatives for which iurl should be representative.\",\n    \"10-0\": \"crid\",\n    \"10-1\": \"string\",\n    \"10-2\": \"Creative ID to assist with ad quality checking. Needs to be unique per creative and cant not be re cycled.\",\n    \"11-0\": \"cat\",\n    \"11-1\": \"string array\",\n    \"11-2\": \"IAB content categories of the creative\",\n    \"12-0\": \"attr\",\n    \"12-1\": \"integer array\",\n    \"12-2\": \"Set of attributes describing the creative.\",\n    \"13-0\": \"dealid\",\n    \"13-1\": \"string\",\n    \"13-2\": \"Reference to the deal.id from the bid request if this bid pertains to a private marketplace direct deal. Required for PMP\"\n  },\n  \"cols\": 3,\n  \"rows\": 14\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Important checks\",\n  \"body\": \"DSP´s integrating with PN ad server MUST keep in mind following points - \\n\\n- Build your bidder to comply with the PubNative OpenRTB 2.3 spec.\\n- Impression trackers must be packed inside the **adm** object.\\n- Passing **nurl ** is mandatory.\"\n}\n[/block]\n\n##Sample Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"d7470a5f-1a75-4bf6-4c82-50abd49e8bb8\\\",\\n  \\\"bidid\\\": \\\"pbnvrtb-10048\\\",\\n  \\\"cur\\\": \\\"USD\\\",\\n  \\\"seatbid\\\": [\\n    {\\n      \\\"bid\\\": [\\n        {\\n          \\\"impid\\\": \\\"1a430de0-b222-412e-4c05-d6ab8115825a\\\",\\n          \\\"price\\\": 0.071396679621748,\\n          \\\"nurl\\\": \\\"http://pubnative-east.com/ads/notify.php?siteid=pbnvrtb1004844&adid=4ace572c&deviceid=1E2DFA89-496A-9931-EF1FC3C33A41&earnings=${AUCTION_PRICE}&impid=d7470a5f1a75-4bf6-4c8250abd49e8bb8&ip=8.8.8.8&countryCode=US&apikey=pbnvrtb&device=iPhone&os=8.1&mach=&ni=0&appid=667728512&adG roup=GameofWar_FireAge_iPhone_US&ourprice=0.071396679621748&adom=&seg=W10%3D&adgroupID=66323&campaignID=1 23395&creativeID=4ace572c¬ifyid=bd471f8e191410c8cc80d7469758ad9d&nb=0&rc=&ra=G0T0a0W00.1C00OG0003100000P0 04Qb0000000000n00000&sp=&ssrv=www1011&tzofse=0&impid=2015052014509627587ddba4a3bb1174c19f0acdb0af5391857e &carrier=WIFI&cg=TEST&at=2&bp=0.071396679621748&creativeID=4ace572c&aid=1E2DFA89-496A-9931EF1FC3C33A41&cf=2\\\",\\n          \\\"id\\\": \\\"pbnvrtb-1004844-d7470a5f-1a75-4bf6-4c82-50abd49e8bb8\\\",\\n          \\\"iurl\\\": \\\"http://platform.com/promote/mock/72c\\\",\\n          \\\"adomain\\\": [ \\\"advertiserdomain.com\\\" ],\\n          \\\"attr\\\": [ 1, 2, 3, 4 ],\\n          \\\"crid\\\": \\\"ce572c\\\",\\n          \\\"cid\\\": \\\"3395\\\",\\n          \\\"adm\\\": \\\"<iframe src=\\\\\\\"http://mobile123.info/kroznik-us-160530/320x50?networkId=42&publisherId=appcoach_1105_32466__com.forshared\\\\\\\" width=\\\\\\\"320\\\\\\\" height=\\\\\\\"50\\\\\\\" frameBorder=\\\\\\\"0\\\\\\\" scrolling=\\\\\\\"no\\\\\\\" style=\\\\\\\"border:0\\\\\\\"></iframe><img src='http://rtb-useast.ezmob.com/imp?i=E1G2aNMWXt4_0' alt=' ' style='display:none'><img src='http://rtb2.vashoot.com/imp?i=QNmodXd5aqs_0' alt=' ' style='display:none'><img src=\\\\\\\"http://us-e-node14.rtbadtrading.com/?t=win&b=${AUCTION_PRICE}&ob=0.46282&ds=4&cd=c73b0900340f2bb58f0b477269ddb8fa\\\\\\\" border=\\\\\\\"0\\\\\\\" width=\\\\\\\"1\\\\\\\" height=\\\\\\\"1\\\\\\\"><div style=\\\\\\\"display:none\\\\\\\"><img src=\\\\\\\"http://tr.pubnative.net/impression?aid=1004319&t=S5dFwqxKcQI5eWkc67nNhAaoHHW2XqtzJF_HeadIZMxuB9Kkx-AuPM1Rhp18r4jcNsVxs-mEFClFwT8E_pfJ5903CS7LaOj1Eodi4LZr2ETIDx5G8cI3zYFssNWSSlh32891pZWAQJgi603H3dGVjFyytRiNv1uGnr2WKJuTU6jYsm2MJkv3XGu6zohIfcUMCLeoYA0mMEp1HEmfSlSNwzqsfob9wFm3SJOhEybwWNA_lTVJPzi6yrSYPO67m9MxsJQPGMbCnGjb1byobcJgE1YQjvAm8yvUKqdyGFQQt4Pfv3kMXqwKeUPFEteaqU8uQV_MFmWsPmBLBVOBXxolTbDQ7Yqfa2bVd0V8DXGj4tW6Ei_DsgbaE1JRKQqFghAxdTx4I9vyXNlhDvsAJKs2e1GhEiVwjA_QwK0LgWox9oByzz6-MKHesTU48hc44ktyv-RpgI0CbPi7s6cOraUqngUk3SwkoylYvtVjluwpWeX77MDEKekLJMH1bRSILq8kV4j8i8vBahs1fcXBYZw2ar6da4jrLMJd-J5ITZ5PiisLggSnvUuPvWN-cwZMsHNEL_AMKCTLR4sxuVTppMsPt-K1IlwjRc-Qeoa8o6VV_lnPxjneA1xmITklj_IAMQRhJqvroRIUSzTFB3NyS7hDiAY8cCW1CbKaKkCYJD63LJvEj-gWSxK3r7GAFm2IkLHXTwgkMd5SWQOwb2qnTT0f_o4DrojR35XB7ummTYm6-fegpQjS27HDgLIXXcDk3lw-_c9OXJH6rjzHufuwdm_tYo0sXxv9ievD0w9uJo0Bbzo8ojp2Wo4IJgWqZhvoChtGHi0&tl=835&ap=${AUCTION_PRICE}&px=1\\\\\\\"/></div>\\\"\\n        }\\n      ]\\n    },\\n    {\\n      \\\"seat\\\": \\\"abc1abc\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"technical-integration-standard-banner","type":"basic","title":"Technical Integration (Standard Format)"}

Technical Integration (Standard Format)


[block:api-header] { "type": "basic", "title": "Open RTB Request" } [/block] The Open RTB request for native ads is fully compliant with Open RTB 2.3 standards. ## Bid Request Structure [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "h-3": "Description", "0-0": "id", "1-0": "imp", "2-0": "site", "3-0": "app", "4-0": "device", "5-0": "user", "7-0": "tmax", "6-0": "at", "8-0": "wseat", "0-3": "Unique ID of the bid request, provided by the exchange.", "1-3": "Unique ID of the bid request, provided by the exchange.", "2-3": "Details via a Site object (Section 3.2.6) about the publisher’s website. Only applicable and recommended for websites", "3-3": "Details via an App object (Section 3.2.7) about the publisher’s\napp (i.e., non-browser applications). Only applicable and recommended for apps.", "4-3": "Details via a Device object (Section 3.2.11) about the user’s device to which the impression will be delivered.", "5-3": "Details via a User object (Section 3.2.13) about the human user of the device; the advertising audience.", "6-3": "Auction type, where 1 = First Price, 2 = Second Price Plus.\nExchange-specific auction types can be defined using values greater than 500.", "7-3": "Maximum time in milliseconds to submit a bid to avoid timeout. This value is commonly communicated offline.", "8-3": "Whitelist of buyer seats allowed to bid on this impression. Seat IDs must be communicated between bidders and the exchange a priori. Omission implies no seat restrictions.", "9-0": "allimps", "9-3": "Flag to indicate if Exchange can verify that the impressions offered represent all of the impressions available in context (e.g., all on the web page, all video spots such as pre/mid/post roll) to support road-blocking. 0 = no or unknown, 1 = yes, the impressions offered represent all that are available.", "10-0": "cur", "10-3": "Array of allowed currencies for bids on this bid request using ISO-4217 alpha codes. Recommended only if the exchange accepts multiple currencies.", "11-0": "bcat", "11-3": "Blocked advertiser categories using the IAB content categories", "12-0": "badv", "12-3": "Block list of advertisers by their domains (e.g., “ford.com”).", "0-1": "string", "1-1": "object", "0-2": "Unique ID of the bid request, provided by the exchange.", "1-2": "Unique ID of the bid request, provided by the exchange.", "2-2": "PN will send this for mobile websites.", "2-1": "object", "3-1": "object", "4-1": "object", "3-2": "PN will send this for apps only", "4-2": "Details via a Device object about the user’s device to which the impression will be delivered.", "5-2": "Details via a User object about the human user of the device; the advertising audience.", "6-2": "Auction type, where 1 = First Price, 2 = Second Price Plus.\nPN conducts a second price auction.", "7-2": "Maximum time in milliseconds to submit a bid to avoid timeout. This value is commonly communicated offline.", "8-2": "Whitelist of buyer seats allowed to bid on this impression. Seat IDs must be communicated between bidders and the exchange a priori. Omission implies no seat restrictions.", "9-2": "Flag to indicate if Exchange can verify that the impressions offered represent all of the impressions available in context (e.g., all on the web page, all video spots such as pre/mid/post roll) to support road-blocking. 0 = no or unknown, 1 = yes, the impressions offered represent all that are available.", "10-2": "Array of allowed currencies for bids on this bid request using ISO-4217 alpha codes. PN only allows bidding in USD", "11-2": "Blocked advertiser categories using the IAB content categories. DSP need to respect bcat to align with PN publishers and exchange wide settings", "12-2": "Block list of advertisers by their domains (e.g., “ford.com”). Typically designated by publishers", "5-1": "object", "6-1": "integer", "7-1": "integer", "8-1": "array", "9-1": "integer; default 0", "10-1": "string array", "11-1": "string array" }, "cols": 3, "rows": 13 } [/block] ##Definition of the Impression Object [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "0-0": "id", "h-2": "Description", "0-1": "string; required", "0-2": "A unique identifier for this impression within the context of the bid request.", "1-0": "banner", "1-1": "object; required", "1-2": "A Banner object; Details below", "2-0": "bidfloor", "3-0": "bidfloorcur", "3-1": "string; default “USD”", "3-2": "Currency specified using ISO-4217 alpha codes. Pubnative only support USD", "2-1": "float", "2-2": "Minimum bid for this impression expressed in CPM." }, "cols": 3, "rows": 4 } [/block] Sample Impression Object [block:code] { "codes": [ { "code": "......\n \"imp\": [\n {\n \"id\": \"87d13330-0f03-4f30-9c75-6f2362c05893\",\n \"banner\": {\n \"w\": 300,\n \"h\": 250\n },\n \"tagid\": \"1\",\n \"bidfloor\": 0.02,\n \"bidfloorcur\": \"USD\"\n }\n ],......", "language": "json", "name": "Impression object" } ] } [/block] ##Definition of the Banner Object [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "h-3": "Default", "h-4": "Description", "0-0": "w", "0-1": "integer; required", "0-2": "Width of the impression in pixels.\nIf neither wmin nor wmax are specified, this value is an exact width measurement. Otherwise it is a preferred width.", "0-3": "1.1", "0-4": "Version of OpenRTB native extension", "1-0": "h", "1-1": "integer; recommended", "1-2": "Height of the impression in pixels.\nIf neither hmin nor hmax are specified, this value is an exact height measurement. Otherwise it is a preferred height", "1-3": "-", "1-4": "the ad unit ID of the native ad unit", "2-0": "wmax", "2-1": "integer; optional", "2-2": "Maximum width of the impression in pixels.\nIf included along with a w value, then w should be interpreted as a recommended or preferred width.", "2-3": "1", "2-4": "The number of identical placements in this layout", "3-0": "hmax", "3-1": "integer; optional", "3-2": "Maximum height of the impression in pixels\nIf included along with a h value, then h should be interpreted as a recommended or preferred height.", "3-3": "0", "3-4": "xx (see the IAB Core Six layout types). 0 for the first ad, 1 for the second ad, and so on. This is not hte sequence number of the content in this stream.", "4-0": "wmin", "4-1": "integer; optional", "4-2": "Minimum width of the impression in pixels.", "4-3": "-", "4-4": "An array of Asset Objects. Any bid must comply with the array of elements expressed by the Exchange", "5-0": "hmin", "5-1": "integer; optional", "5-2": "Minimum height of the impression in pixels.", "6-0": "id", "6-1": "string; optional", "6-2": "Unique identifier for the banner object. \nRecommended when Banner objects are used with a Video object to represent an array of companion ads. Values usually start at 1 and increase with each object; should be unique within an impression.", "7-0": "btype", "7-1": "integer array ; optional", "7-2": "Blocked banner ad types.", "8-0": "battr", "8-1": "integer array ; optional", "8-2": "Blocked creative attributes.", "9-0": "pos", "9-1": "integer ; optional", "9-2": "Ad position on screen.", "10-0": "mimes", "10-2": "Content MIME types supported. \nPopular MIME types may include “application/x-shockwave-flash”, “image/jpg”, and “image/gif”.", "10-1": "string array ; optional", "11-0": "topframe", "11-2": "Indicates if the banner is in the top frame as opposed to an iframe, where 0 = no, 1 = yes.", "11-1": "integer ; optional", "12-0": "expdir", "12-2": "Directions in which the banner may expand", "12-1": "integer array ; optional", "13-0": "api", "13-1": "integer array ; optional", "13-2": "List of supported API frameworks for this impression", "14-0": "ext", "14-2": "Placeholder for exchange-specific extensions to OpenRTB", "14-1": "object ; optional" }, "cols": 3, "rows": 15 } [/block] Sample Banner Object [block:code] { "codes": [ { "code": "....\n\"banner\": {\n \"w\": 728, \"h\": 90, \"pos\": 1,\n \"btype\": [ 4 ],\n \"battr\": [ 14 ],\n \"api\": [ 3 ]\n}\n....", "language": "json", "name": "Banner Object" } ] } [/block] ##Definition of the App Object [block:parameters] { "data": { "h-0": "Field", "h-1": "Scope", "h-2": "Type", "0-0": "id", "0-1": "string;\nrecommended", "0-2": "Pubnative - specific app ID.", "1-0": "name", "1-1": "string", "1-2": "Pubnative - specific App name", "2-0": "bundle", "2-1": "string", "2-2": "Application bundle or package name (e.g., com.foo.mygame);", "3-0": "storeurl", "3-2": "App store URL for an installed app;", "3-1": "string", "4-0": "cat", "4-1": "string array", "4-2": "Array of IAB content categories of the app.", "5-0": "ver", "5-1": "string", "5-2": "Application version", "7-0": "keywords", "7-2": "Comma separated list of keywords about the app.", "7-1": "string", "6-0": "publisher", "6-1": "object", "6-2": "Details about the Publisher" }, "cols": 3, "rows": 8 } [/block] Sample App Object [block:code] { "codes": [ { "code": " \"app\":{ \n \"id\":\"1004844\",\n \"name\":\"Countabc\",\n \"bundle\":\"com.foo.mygame\",\n \"storeurl\":\"https://play.google.....\", \n \"cat\":[ \n \"IAB18\"\n ],\n \"keywords\":\"shopping\", \n \"ver\":\"10.1\", \n \"publisher\":{ \n \"id\":\"1028\",\n \"name\":\"Count LTD\",\n }\n },", "language": "json" } ] } [/block] #Definition of the Device Object [block:parameters] { "data": { "h-0": "Field", "h-1": "Scope", "h-2": "Type", "0-0": "ua", "0-1": "string;\nrecommended", "0-2": "Browser user agent string.", "1-0": "geo", "1-1": "object;\nrecommended", "1-2": "Location of the device assumed to be the user’s current.\ngeo.type - Possible values 1,2\n1- Geo info generated from GPS system\n2- Geo info generated from IP address.", "2-0": "dnt", "2-2": "Standard “Do Not Track” flag as set in the header by the browser, where 0 = tracking is unrestricted, 1 = do not track.", "2-1": "integer;\nrecommended", "3-0": "ip", "3-1": "string;\nrecommended", "3-2": "IPv4 address closest to device.", "4-0": "devicetype", "4-1": "integer", "4-2": "The general type of device.", "5-0": "make", "5-1": "string", "5-2": "Device make (e.g., “Apple”).", "6-0": "model", "6-1": "string", "6-2": "Device model (e.g., “iPhone”).", "7-0": "os", "7-1": "string", "7-2": "Device operating system (e.g., “iOS”).", "8-0": "osv", "8-1": "string", "8-2": "Device operating system version", "9-0": "hwv", "9-2": "Hardware version of the device", "9-1": "string", "10-0": "carrier", "10-2": "Carrier or ISP (e.g., “VERIZON”). “WIFI” is often used in mobile to indicate high bandwidth (e.g., video friendly vs. cellular).", "10-1": "string", "11-0": "connectiontype", "11-1": "integer", "11-2": "Network connection type.\n0 -Unknown, 1- Ethernet, 2 - WIFI, 3 -Cellular Network – Unknown Generation", "13-0": "ifa", "13-1": "string", "13-2": "ID sanctioned for advertiser use in the clear (i.e., not hashed)", "12-0": "devicetype", "12-1": "integer", "12-2": "The general type of device" }, "cols": 3, "rows": 14 } [/block] Sample Device Object [block:code] { "codes": [ { "code": "\"device\":{ \n \"dnt\":2,\n \"ua\":\"Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4\",\n \"ip\":\"8.8.8.8\",\n \"geo\":{ \n \"lat\":0,\n \"lon\":0,\n \"country\":\"USA\",\n \"region\":\"CA\",\n \"city\":\"Mountain View\",\n \"zip\":\"94040\",\n \"type\":2 // 1- GPS, 2- IP address\n },\n \"carrier\":\"Google\",\n \"language\":\"en\",\n \"make\":\"Apple\",\n \"model\":\"iphone\",\n \"os\":\"iOS\",\n \"osv\":\"8\",\n \"connectiontype\":2, // 0 -Unknown, 1- Ethernet, 2 - WIFI, 3 -Cellular Network – Unknown Generation\n \"devicetype\":1, // 1 - Mobile/Tablet\n \"ifa\":\"1E2DFA89-47FD-9941-DF1FC4E6484C\"\n },", "language": "json" } ] } [/block] ## Definition of the User Object [block:parameters] { "data": { "h-0": "Field", "h-1": "Scope", "h-2": "Type", "0-0": "id", "0-1": "string; recommended", "0-2": "Exchange-specificID for the user.", "1-0": "gender", "1-1": "string", "1-2": "Gender, where “M” = male, “F” = female, “O” = known to be other (i.e., omitted is unknown).", "2-0": "keywords", "2-2": "Comma separated list of keywords, interests, or intent.", "2-1": "object" }, "cols": 3, "rows": 3 } [/block] Sample User Object [block:code] { "codes": [ { "code": ".....\n\"user\":{ \n \"id\":\"78550233-77fc-5ba8-8bff-f6a1809344eb\",\n \"gender\":\"m\",\n \"keywords\":\"sports, paid user\",\n },\n\n.....", "language": "json" } ] } [/block] ##Sample Bid Request [block:code] { "codes": [ { "code": "{ \n \"id\":\"4fc8acc7-6bb2-489d-7547-d3291547f17c\",\n \"imp\":[ \n { \n \"id\":\"46600265-e3a4-44dd-7114-49d21405cacf\",\n \"banner\": {\n \"w\": 320, \"h\": 50, \n \"pos\": 1,\n \"btype\": [ 4 ],\n \"battr\": [ 14 ],\n \"api\": [ 3 ]\n\t\t\t\t\t\t\t\t},\n \"bidfloor\":0.01,\n \"bidfloorcur\":\"USD\"\n }\n ],\n \"app\":{ \n \"id\":\"1004844\",\n \"name\":\"Countabc\",\n \"bundle\":\"com.foo.mygame\",\n \"storeurl\":\"https://play.google.....\", \n \"cat\":[ \n \"IAB18\"\n ],\n \"keywords\":\"shopping\", \n \"ver\":\"10.1\", \n \"publisher\":{ \n \"id\":\"1028\",\n \"name\":\"Count LTD\"\n }\n },\n \"device\":{ \n \"dnt\":1,\n \"ua\":\"Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4\",\n \"ip\":\"8.8.8.8\",\n \"geo\":{ \n \"lat\":0,\n \"lon\":0,\n \"country\":\"USA\",\n \"region\":\"CA\",\n \"city\":\"Mountain View\",\n \"zip\":\"94040\",\n \"type\":2\n },\n \"carrier\":\"Google\",\n \"language\":\"en\",\n \"make\":\"Apple\",\n \"model\":\"iphone\",\n \"os\":\"iOS\",\n \"osv\":\"8\",\n \"connectiontype\":2,\n \"devicetype\":1,\n \"ifa\":\"1E2DFA89-47FD-9941-DF1FC4E6484C\"\n },\n \"user\":{ \n \"id\":\"78550233-77fc-5ba8-8bff-f6a1809344eb\",\n \"gender\":\"m\",\n \"keywords\":\"sports, paid user\"\n },\n \"at\":2,\n \"tmax\":100,\n \"allimps\":0,\n \"cur\":[ \n \"USD\"\n ],\n \"bcat\":[ \n \"IAB1-1\",\n \"IAB18\",\n \"IAB1\",\n \"IAB14\",\n \"IAB24\",\n \"IAB17\",\n \"IAB15\",\n \"IAB22\",\n \"IAB20\",\n \"IAB13\",\n \"IAB9-7\",\n \"IAB1\",\n \"IAB12\",\n \"IAB6\",\n \"IAB3\",\n \"IAB3\",\n \"IAB14-1\",\n \"IAB5\",\n \"IAB7\"\n ]\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "OpenRTB Response" } [/block] The structure and contents of the Bid Response are the same as in the OpenRTB standard. The difference is how ad creative is returned. ## BidResponse Object [block:parameters] { "data": { "h-0": "Field", "h-1": "Scope", "h-2": "Type", "0-0": "id", "0-1": "string; required", "0-2": "ID of the bid request to which this is a response.", "1-0": "seatbid", "1-1": "object array", "1-2": "Array of seatbid objects; 1+ required if a bid is to be made.", "2-0": "bidid", "2-1": "string", "2-2": "Bidder generated response ID to assist with logging/tracking.", "3-0": "cur", "3-1": "string; default “USD", "3-2": "Bid currency using ISO-4217 alpha codes. PN accepts on USD.", "4-0": "nbr", "4-1": "integer optional", "4-2": "Reason for not bidding. Refer to OpenRTB Spec" }, "cols": 3, "rows": 5 } [/block] ## Definition of Seat Bid Object [block:parameters] { "data": { "h-0": "Field", "h-1": "Scope", "h-2": "Type", "h-3": "Default", "h-4": "Description", "0-0": "bid", "0-1": "object array; required", "0-2": "Array of 1+ Bid objects (Section 4.2.3) each related to an impression. Multiple bids can relate to the same impression", "0-3": "-", "0-4": "Top level native object", "1-0": "seat", "1-1": "string", "1-2": "ID of the bidder seat on whose behalf this bid is made.", "2-0": "group", "2-1": "integer; default 0", "2-2": "0 = impressions can be won individually; 1 = impressions must be won or lost as a group." }, "cols": 3, "rows": 3 } [/block] ## Definition of the Bid Object [block:parameters] { "data": { "h-0": "Field", "h-1": "Scope", "h-2": "Title", "0-0": "id", "0-1": "string; required", "0-2": "Bidder generated bid ID to assist with logging/tracking.", "1-0": "impid", "1-1": "string; required", "1-2": "ID of the Imp object in the related bid request.", "2-0": "price", "2-1": "float; required", "2-2": "Bid price expressed as CPM although the actual transaction is\nfor a unit impression only. Note that while the type indicates float, integer math is highly recommended when handling currencies (e.g., BigDecimal in Java).", "3-0": "adid", "3-1": "string", "3-2": "ID of a preloaded ad to be served if the bid wins.", "4-0": "nurl", "4-1": "string", "4-2": "Win notice URL called by the exchange if the bid wins; optional means of serving ad markup.Please check Billing section for proper implementation.", "5-0": "adm", "5-1": "string; required", "5-2": "means of conveying ad markup in case the bid wins", "6-0": "adomain", "6-1": "string array,\nrequired", "6-2": "Advertiser domain for block list checking (e.g., “ford.com”). This can be an array of for the case of rotating creatives. Exchanges can mandate that only one domain is allowed.Required for standard size ad formats.", "7-0": "bundle", "7-1": "string", "7-2": "Bundle or package name (e.g., com.foo.mygame) of the app being advertised, if applicable; intended to be a unique ID across exchanges.", "8-0": "iurl", "8-1": "string", "8-2": "URL without cache-busting to an image that is representative\nof the content of the campaign for ad quality/safety checking.", "9-0": "cid", "9-1": "string", "9-2": "Campaign ID to assist with ad quality checking; the collection of creatives for which iurl should be representative.", "10-0": "crid", "10-1": "string", "10-2": "Creative ID to assist with ad quality checking. Needs to be unique per creative and cant not be re cycled.", "11-0": "cat", "11-1": "string array", "11-2": "IAB content categories of the creative", "12-0": "attr", "12-1": "integer array", "12-2": "Set of attributes describing the creative.", "13-0": "dealid", "13-1": "string", "13-2": "Reference to the deal.id from the bid request if this bid pertains to a private marketplace direct deal. Required for PMP" }, "cols": 3, "rows": 14 } [/block] [block:callout] { "type": "warning", "title": "Important checks", "body": "DSP´s integrating with PN ad server MUST keep in mind following points - \n\n- Build your bidder to comply with the PubNative OpenRTB 2.3 spec.\n- Impression trackers must be packed inside the **adm** object.\n- Passing **nurl ** is mandatory." } [/block] ##Sample Response [block:code] { "codes": [ { "code": "{\n \"id\": \"d7470a5f-1a75-4bf6-4c82-50abd49e8bb8\",\n \"bidid\": \"pbnvrtb-10048\",\n \"cur\": \"USD\",\n \"seatbid\": [\n {\n \"bid\": [\n {\n \"impid\": \"1a430de0-b222-412e-4c05-d6ab8115825a\",\n \"price\": 0.071396679621748,\n \"nurl\": \"http://pubnative-east.com/ads/notify.php?siteid=pbnvrtb1004844&adid=4ace572c&deviceid=1E2DFA89-496A-9931-EF1FC3C33A41&earnings=${AUCTION_PRICE}&impid=d7470a5f1a75-4bf6-4c8250abd49e8bb8&ip=8.8.8.8&countryCode=US&apikey=pbnvrtb&device=iPhone&os=8.1&mach=&ni=0&appid=667728512&adG roup=GameofWar_FireAge_iPhone_US&ourprice=0.071396679621748&adom=&seg=W10%3D&adgroupID=66323&campaignID=1 23395&creativeID=4ace572c¬ifyid=bd471f8e191410c8cc80d7469758ad9d&nb=0&rc=&ra=G0T0a0W00.1C00OG0003100000P0 04Qb0000000000n00000&sp=&ssrv=www1011&tzofse=0&impid=2015052014509627587ddba4a3bb1174c19f0acdb0af5391857e &carrier=WIFI&cg=TEST&at=2&bp=0.071396679621748&creativeID=4ace572c&aid=1E2DFA89-496A-9931EF1FC3C33A41&cf=2\",\n \"id\": \"pbnvrtb-1004844-d7470a5f-1a75-4bf6-4c82-50abd49e8bb8\",\n \"iurl\": \"http://platform.com/promote/mock/72c\",\n \"adomain\": [ \"advertiserdomain.com\" ],\n \"attr\": [ 1, 2, 3, 4 ],\n \"crid\": \"ce572c\",\n \"cid\": \"3395\",\n \"adm\": \"<iframe src=\\\"http://mobile123.info/kroznik-us-160530/320x50?networkId=42&publisherId=appcoach_1105_32466__com.forshared\\\" width=\\\"320\\\" height=\\\"50\\\" frameBorder=\\\"0\\\" scrolling=\\\"no\\\" style=\\\"border:0\\\"></iframe><img src='http://rtb-useast.ezmob.com/imp?i=E1G2aNMWXt4_0' alt=' ' style='display:none'><img src='http://rtb2.vashoot.com/imp?i=QNmodXd5aqs_0' alt=' ' style='display:none'><img src=\\\"http://us-e-node14.rtbadtrading.com/?t=win&b=${AUCTION_PRICE}&ob=0.46282&ds=4&cd=c73b0900340f2bb58f0b477269ddb8fa\\\" border=\\\"0\\\" width=\\\"1\\\" height=\\\"1\\\"><div style=\\\"display:none\\\"><img src=\\\"http://tr.pubnative.net/impression?aid=1004319&t=S5dFwqxKcQI5eWkc67nNhAaoHHW2XqtzJF_HeadIZMxuB9Kkx-AuPM1Rhp18r4jcNsVxs-mEFClFwT8E_pfJ5903CS7LaOj1Eodi4LZr2ETIDx5G8cI3zYFssNWSSlh32891pZWAQJgi603H3dGVjFyytRiNv1uGnr2WKJuTU6jYsm2MJkv3XGu6zohIfcUMCLeoYA0mMEp1HEmfSlSNwzqsfob9wFm3SJOhEybwWNA_lTVJPzi6yrSYPO67m9MxsJQPGMbCnGjb1byobcJgE1YQjvAm8yvUKqdyGFQQt4Pfv3kMXqwKeUPFEteaqU8uQV_MFmWsPmBLBVOBXxolTbDQ7Yqfa2bVd0V8DXGj4tW6Ei_DsgbaE1JRKQqFghAxdTx4I9vyXNlhDvsAJKs2e1GhEiVwjA_QwK0LgWox9oByzz6-MKHesTU48hc44ktyv-RpgI0CbPi7s6cOraUqngUk3SwkoylYvtVjluwpWeX77MDEKekLJMH1bRSILq8kV4j8i8vBahs1fcXBYZw2ar6da4jrLMJd-J5ITZ5PiisLggSnvUuPvWN-cwZMsHNEL_AMKCTLR4sxuVTppMsPt-K1IlwjRc-Qeoa8o6VV_lnPxjneA1xmITklj_IAMQRhJqvroRIUSzTFB3NyS7hDiAY8cCW1CbKaKkCYJD63LJvEj-gWSxK3r7GAFm2IkLHXTwgkMd5SWQOwb2qnTT0f_o4DrojR35XB7ummTYm6-fegpQjS27HDgLIXXcDk3lw-_c9OXJH6rjzHufuwdm_tYo0sXxv9ievD0w9uJo0Bbzo8ojp2Wo4IJgWqZhvoChtGHi0&tl=835&ap=${AUCTION_PRICE}&px=1\\\"/></div>\"\n }\n ]\n },\n {\n \"seat\": \"abc1abc\"\n }\n ]\n}", "language": "json" } ] } [/block]