{"_id":"57a45c077523720e00b4aa02","__v":0,"category":{"_id":"5774fe18605b770e0037be8a","__v":0,"project":"574ff4bd3fa1870e00889ba6","version":"574ff4bd3fa1870e00889ba9","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-06-30T11:10:16.206Z","from_sync":false,"order":1,"slug":"api-documentation","title":"API Documentation"},"parentDoc":null,"project":"574ff4bd3fa1870e00889ba6","version":{"_id":"574ff4bd3fa1870e00889ba9","project":"574ff4bd3fa1870e00889ba6","__v":21,"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","5a0322bf044b6f001c236e36"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"user":"574ff3adaef76a0e00840968","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-05T09:27:35.866Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":4,"body":"Using Pubnative APIv3 you can either do client side or server side integration\n\nThis document will provide you the necessary information about API v3 for accessing our native demand.\n\n##Improvements\n* Support for contentinfo\n* Support for multiple impression trackers and click trackers\n* Client-side impression and click ocnfirmation enabling access to more extensive demand\n* Improved user and display confirmation granting access to more CPM and CPC demand partners\n\n## Base URL\n`http://api.pubnative.net/api/v3/native?{params}`\n\n##Additional Request Parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Format\",\n    \"h-2\": \"Description\",\n    \"10-0\": \"srvi\",\n    \"11-0\": \"adcount\",\n    \"12-0\": \"ua\",\n    \"14-0\": \"ip\",\n    \"15-0\": \"locale\",\n    \"16-0\": \"lat\",\n    \"17-0\": \"long\",\n    \"18-0\": \"gender\",\n    \"19-0\": \"age\",\n    \"20-0\": \"keywords\",\n    \"21-0\": \"secure\",\n    \"22-0\": \"idfamd5\",\n    \"23-0\": \"idfasha1\",\n    \"24-0\": \"gidmd5\",\n    \"25-0\": \"gidsha1\",\n    \"10-1\": \"Boolean\",\n    \"10-2\": \"1 -  server to server integration. If set to 1, need to pass set ip and ua\",\n    \"11-2\": \"Number of Apps to return. Possible values: 1 (default) to 20\",\n    \"12-2\": \"User Agent String. Required when srvi is set to 1\",\n    \"14-2\": \"IP address of the client device\",\n    \"15-2\": \"The locale used. i.e. DE\",\n    \"16-2\": \"The current latitude of the requesting device. Don´t send param if value is unknown.\",\n    \"17-2\": \"The current longitude of the requesting device. Don´t send param if value is unknown.\",\n    \"18-2\": \"The user's gender. Possible values: \\\"male\\\", \\\"female\\\", \\\"other\\\"\",\n    \"19-2\": \"The user's age\",\n    \"20-2\": \"A comma separated list of keywords\",\n    \"21-2\": \"Default is http.  Can use https secure parameter for overding\",\n    \"22-2\": \"Apple ID for Advertising (md5)\",\n    \"23-2\": \"Apple ID for Advertising (sha1)\",\n    \"24-2\": \"Android Advertiser Id(md5)\",\n    \"25-2\": \"Android Advertiser Id(sha1)\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"14-1\": \"String\",\n    \"15-1\": \"String\",\n    \"16-1\": \"String\",\n    \"17-1\": \"String\",\n    \"18-1\": \"String\",\n    \"19-1\": \"String\",\n    \"20-1\": \"String\",\n    \"21-1\": \"String\",\n    \"22-1\": \"String\",\n    \"23-1\": \"String\",\n    \"24-1\": \"String\",\n    \"25-1\": \"String\",\n    \"0-0\": \"apptoken\",\n    \"9-0\": \"gid\",\n    \"0-1\": \"String \\nRequired\",\n    \"9-1\": \"String. \\nRequired when request generated from a Android device\",\n    \"0-2\": \"This is your internal app token which you fetch from the publisher dashboard.\",\n    \"9-2\": \"Android ID for Advertising.\",\n    \"8-0\": \"idfa\",\n    \"8-1\": \"String. \\nRequired when request generated from a Apple device\",\n    \"8-2\": \"Apple ID for Advertising.\",\n    \"1-0\": \"os\",\n    \"2-0\": \"osver\",\n    \"3-0\": \"devicemodel\",\n    \"4-0\": \"dnt\",\n    \"5-0\": \"al\",\n    \"6-0\": \"mf\",\n    \"1-1\": \"String\\nRequired\",\n    \"2-1\": \"String\\nRequired\",\n    \"3-1\": \"String\\nRequired\",\n    \"4-1\": \"String\\nRequired\",\n    \"5-1\": \"String\\nRequired\",\n    \"6-1\": \"String\",\n    \"1-2\": \"The operating system of requesting device, i.e. ios, android\",\n    \"2-2\": \"The operating system version of the requesting device\",\n    \"3-2\": \"The model name of the device\",\n    \"4-2\": \"0 - Track user ; 1 - Do not track user\",\n    \"5-2\": \"Ad layouts that need to be requested. To access native demand we recommend \\\"m\\\" \\nPossible values are - s,m,l\\nFor more info about [ad layouts](http://developers.pubnative.net/docs/client-api-v30#ad-layouts)\",\n    \"6-2\": \"Specify the meta data. i.e. points, revenuemodel, campaignid, creativeid, contentinfo\",\n    \"7-0\": \"zoneid\",\n    \"7-1\": \"String\\nRequired\",\n    \"7-2\": \"The ad zone identifier. Zones need to be created in Pubnative Dashboard prior to use.\",\n    \"13-0\": \"bundleid\",\n    \"13-1\": \"String\",\n    \"13-2\": \"The bundle identifier of the requesting app. i.e. com.my.app, 422689480\",\n    \"26-0\": \"coppa\",\n    \"26-1\": \"String\",\n    \"26-2\": \"Flag indicating if this request is subject to the COPPA regulations established by the FTC, where 0 = no, 1 = yes.\"\n  },\n  \"cols\": 3,\n  \"rows\": 27\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"isa_info\\\">\\n  <strong><font color=\\\"7d0a80\\\">Ad layout:</font></strong>  Ad layouts is standardized of requesting specific assets depending upon the size or type of your placement. Possible values s, m, l.\\n</div> \"\n}\n[/block]\n## Sample Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /api/v3/native?apptoken=YOURAPPTOKEN&os=android&devicemodel=iphone&osver=9.1&dnt=1&zoneid=1&mf=points,revenuemodel,campaignid,creativeid&al=m HTTP/1.1\\nHost: api.pubnative.net\\nCache-Control: no-cache\",\n      \"language\": \"curl\",\n      \"name\": \"Client API\"\n    },\n    {\n      \"code\": \"GET /api/v3/native?apptoken=YOURAPPTOKEN&os=Android&devicemodel=iphone&osver=9.1&dnt=0&mf=points,revenuemodel,campaignid,creativeid&al=m&srvi=1&zoneid=1&ua=Mozilla&ip=88.134.178.169&gid=E2BF1F85-2D66-49CA-A44E-13E30906230B \\nHost: api.pubnative.net\\nCache-Control: no-cache\",\n      \"language\": \"curl\",\n      \"name\": \"Server-to-Server\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"isa_info\\\">\\n  <strong><font color=\\\"7d0a80\\\">Server-to-Server Integration:</font></strong> In case you plan to do the integration on the server side, the following params need to be set:\\n  <ul>\\n    <li>\\\"srvi\\\" param needs to be set to '1'</li>\\n    <li>\\\"ua\\\" and \\\"ip\\\" params need to be set</li>\\n  </ul>\\nNote: Confirmation of ALL beacons namely the types -  click and impression still need to be done on client side.</b>\\n</div>\"\n}\n[/block]\n##Response\n\nBelow are sample responses for ad layouts type - s, m, l\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"ok\\\",\\n  \\\"ads\\\": [\\n    {\\n      \\\"link\\\": \\\"http://tr.pubnative.net/click/s2s?aid=1004319&t=Y3j8NEmpUJcxUeTbk8iAfl8IxnITsF9v2yBrnz7VwjRtltJfTtpptKcQGCEjlJBCRaiXhfAoRV_2BiyLv-dhfkPs8h4xCF8l6meTuZLjsCXbWcSBknDsJy4_0oKJYfMLTbgX-ic_xY6oONdR1mnb1OinmDFYg7dIOJt4OqyOPEWUcLlBeqg9QNgt_uX8xu2s-4WSUsNu9oIDa-ZhtkLZSwe2pYac1c6oaOyi2Ssb03abSoUHCk0xGo_Rp7rpFNkrVi1TVXRKSUXb6_QWhkUQg6jJjEMAqI1PsC1W8EtSDUAZ0UQfBGf6A-MsZgc8rkn8C1tTppOL7RG0WAmd4KRNwcSp5nMwRxH8vzA947tgTJqekpOZvimbISsGDm2KWVBrEodv3fBeYDUBhpybEWH6GVkampQt2O27BbsKHAI0dRDKfR8iUFk5Ro4zBrqIEEXpcXKZVuBYIH0Omhka2VPeuRNLVqIR_RJv2SOt496tseTpM7uqSXLGxL7DSyRl7l1DrfHNyYa-_F2mGACa09w-edE_gX8dzeergsghd42XFA0ymqN6Q3NSmA0uWsDlz_-BrE44XPkzKYVa7XRudyA8FIR5yPvlfCpEB0qCfQBUUdJ5vhyQwQbYaqxzhR-Ldt0FKyWXsoR6C4_aOkrW_oiGfJG9s2mmrdrAO2ypfHMxeWEY0zWs-m0BD6I8Sj89r5S3TluSiU2_TfX07Wgz09dUea1wQ1gS0A_jkOE_n3LVC7PoKClvVErJNjDJtA1eYF2S1GBitOmAH_JcASvnGlcc-qTZMJapirdi7jxtFSH--BhTxgS-98-nn__thftGvqePCvLzTpMz4N1pIPxfN-kxl14UwkqaZakxY24G56c88sILzPQ_mvnYg9jutOZ6ox6emerO28BOtTjTF3x5-JhB-PfH1BpktC--6LnrTq-O4_ubg8KiMY_ZfaNV3KEfU_4OxVBNON3HYqXR0PHX5Yz3Zjf0y5TK8UzcyKvasA4KkbSa4c0O5swReJN5DXUI2x-lXtl8SGzR0b6gQrzYA9zDUmseDR5afdGD6Nk7fV3amg7ebDqWZpIdZ0XEoQVG00SMjH1GXlCYS6_xqd4qTMtMliH6gyXR\\\",\\n      \\\"assetgroupid\\\": 1,\\n      \\\"assets\\\": [\\n        {\\n          \\\"type\\\": \\\"icon\\\",\\n          \\\"data\\\": {\\n            \\\"w\\\": 80,\\n            \\\"h\\\": 80,\\n            \\\"url\\\": \\\"http://d1.cnnx.io/image/obj/6705665130;sq=100?mid=300829\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"title\\\",\\n          \\\"data\\\": {\\n            \\\"text\\\": \\\"Sonax Scheiben- und FensterTuch 1 Stück\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"cta\\\",\\n          \\\"data\\\": {\\n            \\\"text\\\": \\\"Learn More\\\"\\n          }\\n        }\\n      ],\\n      \\\"meta\\\": [\\n        {\\n          \\\"type\\\": \\\"contentinfo\\\",\\n          \\\"data\\\": {\\n            \\\"link\\\": \\\"http://pubnative.net/content-info\\\",\\n            \\\"icon\\\": \\\"http://cdn.pubnative.net/static/adserver/contentinfo.png\\\",\\n            \\\"text\\\": \\\"Learn about this ad\\\"\\n          }\\n        }\\n      ],\\n      \\\"beacons\\\": [\\n        {\\n          \\\"type\\\": \\\"impression\\\",\\n          \\\"data\\\": {\\n            \\\"url\\\": \\\"http://tr.pubnative.net/impression?aid=1004319&t=Q1oQ8Hde_eT8gdYu8sqsQ5g6BUcy9_7EUXT4PFVrUFj8Cu9hJaL8d9m5AiWRcJcm7Z8Nrcg2lz2cIqVhc_-3zX09x9Ck79tFgqBm5LV5ut9PAhjpdGwWCoJRFm_wMd_nMXOY1rafFQS6424LgYZHuffzHoub7xXK9H38LAdnRzMPUwjN1f7WKtiUismkcz0O6ZRCgmEplBA7WooWdvj9zVX2kEgJe_DlzD2sRzcAzlFFEmHzZgxz56dDdZcXRRi8FYUe4R0oVfQR-aUEWwDepadnVoT9Qsi-2gfWInThGuf1AZz8q-eKO13gb8geNzcHT-iJx1kJR7SpDI86l3eXetWlEiUVuZHpmhK-N5aV5I3pm8pNMKa_-l2wBDwYBW-yIMqpRYKo3td8ws-4syx9YWDU_iFj7JjShINdsbqwWhx67m52S30ek0PCzOhOEnEfc90v4JEoMOxS&tl=460\\\"\\n          }\\n        }\\n      ]\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample response for ad layout `s`\"\n    },\n    {\n      \"code\": \"{\\n    \\\"status\\\": \\\"ok\\\",\\n    \\\"ads\\\": [\\n        {\\n            \\\"link\\\": \\\"http://tr.pubnative.net/click/native?aid=1004319&t=MOPD_cKr-eWMtv3sqzuWXuDVUW_LiNxASK3_o6wlkELmaWlflIeGYSAltF1QsytWKUh24IYsVu_zdDHxT_plbKIL6P0Wg0NRs4Yqo3GvYPYsDELH-V3sFNH4CzW_Cdu8btMyXnK5qbTirbr3uQeee8-gEcOae0pC5nr44AklC6qK4RMWy0fUyfU-iU5fs8ewVY8EkpBc6G0EWxDZEyHn3QCQM5bs_qAjMTrov2xPeL4IyPsyVngrXNpMvn_-GIcOysBK3fzIRAlipO_r8rWOTU_gqGPexDhGcw-Etp0pKJRsC6hbGJi9SIkZ-_UHS9Wotn6c9a9S_OcFAoVZt2DEKTbvyslDyc32Kesq3AUeORS7Q9vVGpb4MI8htz4BRAw8bc64z9wlZu8rPNJzSwNpJoJSI8pzh0A215_VQcOCy3Ae3BykUOtxcJL3HGNnjhaTaRnSiAo_vBesg2ejpk3HES0O0o5JeekypdsLyaJv5j4ZPf3mHB6LwpKaN5cr-4vtDb3sIaCSDyVK5wrxnOOqZGF6BFiqyliwnEDWjIumklsJb1L08JxXNgsb7roPc365ai58_DAyBrKNey1JbynFB143qkBmIzdYSTei4kITYTobOM5bBlb85heEWV_4_2Y23-kgeGACHm9DG4n5jDbVI_gZCAKSmqq9mQ3kRU_SZ91PRBgmSrdaPBeMGTANFH1qSKCC1yVL7zallvU0BcZjuRrYttzoDZI\\\",\\n            \\\"assetgroupid\\\": 5,\\n            \\\"assets\\\": [\\n                {\\n                    \\\"type\\\": \\\"icon\\\",\\n                    \\\"data\\\": {\\n                        \\\"w\\\": 80,\\n                        \\\"h\\\": 80,\\n                        \\\"url\\\": \\\"http://cdn.pubnative.net/games/icons/001/003/654/dimension_80x80.jpg?20161020002159\\\"\\n                    }\\n                },\\n                {\\n                    \\\"type\\\": \\\"banner\\\",\\n                    \\\"data\\\": {\\n                        \\\"w\\\": 1200,\\n                        \\\"h\\\": 627,\\n                        \\\"url\\\": \\\"http://cdn.pubnative.net/games/promo_images_landscape/001/003/654/dimension_1200x627.jpg?20160622173518\\\"\\n                    }\\n                },\\n                {\\n                    \\\"type\\\": \\\"title\\\",\\n                    \\\"data\\\": {\\n                        \\\"text\\\": \\\"Yandex.Browser\\\"\\n                    }\\n                },\\n                {\\n                    \\\"type\\\": \\\"description\\\",\\n                    \\\"data\\\": {\\n                        \\\"text\\\": \\\"Suchst Du eine neue, coole App? Lade mich jetzt runter.\\\"\\n                    }\\n                },\\n                {\\n                    \\\"type\\\": \\\"rating\\\",\\n                    \\\"data\\\": {\\n                        \\\"number\\\": 4\\n                    }\\n                },\\n                {\\n                    \\\"type\\\": \\\"cta\\\",\\n                    \\\"data\\\": {\\n                        \\\"text\\\": \\\"Installieren\\\"\\n                    }\\n                }\\n            ],\\n            \\\"meta\\\": [\\n                {\\n                    \\\"type\\\": \\\"contentinfo\\\",\\n                    \\\"data\\\": {\\n                        \\\"link\\\": \\\"http://pubnative.net/content-info\\\",\\n                        \\\"icon\\\": \\\"http://cdn.pubnative.net/static/adserver/contentinfo.png\\\",\\n                        \\\"text\\\": \\\"Learn about this ad\\\"\\n                    }\\n                }\\n            ],\\n            \\\"beacons\\\": [\\n                {\\n                    \\\"type\\\": \\\"impression\\\",\\n                    \\\"data\\\": {\\n                        \\\"url\\\": \\\"http://tr.pubnative.net/impression?aid=1004319&t=850LJyZtlV7VTjsCnU0ENjImKPDAuvtZi0cEPKN4R4BUzDw7_94DOb2w_mSXhiLCANHavvkqa8O7fdUrpL5bhoQoO9_Rf-aJSujnPfUHhCZaHwTwAx_qRU-Yn2cmrSFWBT3VR7NSOF536DUxFHI3LUA7TeRx6zOEoUFm_YFphMSEwnIK3uFN-BNv2FmCjnG-3JfaZwMclHpjUiHDzRFUvQOR5xEahdG8JiIkc36YwJYfSW61tLoTHqmnxIIGHl6OXVjM-8SSYnabYjY2U-CMt2RaUSwFzbIh-pDGq1TK2--p1LqFPJiingdp9CtF2JaV2Z4yMzsJlwQ69pXjMm5LjhC4pDapvq4mMRchRpdXoPle3mmcqRfH412UokAVH-saN6VkrRjB_4IA-MbW7pvTZt7NAijquOgWmpeBniEPgZvkHhojPiWkGh_82tjjn8T-_PvFpII&tl=455\\\"\\n                    }\\n                }\\n            ]\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample response for ad layout `m`\"\n    },\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"ok\\\",\\n  \\\"ads\\\": [\\n    {\\n      \\\"link\\\": \\\"http://tr.pubnative.net/click/native?aid=1004319&t=WTaJGCqlPrH8XmK54F09hlAg0x_iGpd1wKAF0HzaUc-sYzv-WlHY9kS1EiktZxbe3wqJ3LxBxGpcZfjADJuRMaGr8SCnA8dq9caT9gMCzLYrH1m8CwUwJNg0OPCbiOn-MhWTOy6TM70XZRkLLKxp2hRNltOx2Wryn6dEebHsrN5OqMPZ6DNDQhGTWSHS6PipHK-_HtjiKQCykbNf3C4_RfqQ-jTVzWw2Q7hkFXDFfg1TC4pc7IcnkFZgxUDeqwJ53dzEku50Ll8JJijBYfDaPPzeYnw0AXjjSqUTha1Z1S0CJmugK4nL9LViOWbCQ_xtxEW-ItC2llgnrOqCF-AhTD5CJGT0gstj7LGsK2Q_-wNeEZ2pq2pJPYaBhv0ozQsvsSUay0nIWRTqs5pAryKykqwMqHWTfw7xxCXIs-UrgJFnzRC2Irn2g1gGChnoaOskTW1EpRN2nhnsLG9yhUZkazHF7XyHY3rvrUd5na65UKXGRdd3xaC-J_JQWxQFKOtekQfGcvX7eGx3D8vRWvLqJRXVWPI4pp6HHgu0wl3ojRDu7e8FoxbBq6Hy5AjCkqbIDWd3AhJHZXOEC7sCY1m2PBnvuIxF_dNPdMAr0ZU9xk9lD5bxHbp3oOen3Z2j0XSurTCHO2-bhEJSEeOLYMy3QGRzHPK5v6UeFO8rvdMorhD7w-fze8m3SV7RPZNxOg\\\",\\n      \\\"assetgroupid\\\": 16,\\n      \\\"assets\\\": [\\n        {\\n          \\\"type\\\": \\\"icon\\\",\\n          \\\"data\\\": {\\n            \\\"w\\\": 80,\\n            \\\"h\\\": 80,\\n            \\\"url\\\": \\\"http://cdn.pubnative.net/games/icons/001/004/457/dimension_80x80.jpg?20161020023441\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"banner\\\",\\n          \\\"data\\\": {\\n            \\\"w\\\": 1200,\\n            \\\"h\\\": 627,\\n            \\\"url\\\": \\\"http://cdn.pubnative.net/games/promo_images_landscape/001/004/457/dimension_1200x627.jpg?20160622175810\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"title\\\",\\n          \\\"data\\\": {\\n            \\\"text\\\": \\\"Hearthstone Heroes of Warcraft\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"description\\\",\\n          \\\"data\\\": {\\n            \\\"text\\\": \\\"TÄUSCHEND EINFACH. WAHNSINNIG UNTERHALTSAM. Nimm deine Karten und stelle dich der Herausforderung!\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"rating\\\",\\n          \\\"data\\\": {\\n            \\\"number\\\": 4\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"cta\\\",\\n          \\\"data\\\": {\\n            \\\"text\\\": \\\"Installieren\\\"\\n          }\\n        }\\n      ],\\n      \\\"meta\\\": [\\n        {\\n          \\\"type\\\": \\\"contentinfo\\\",\\n          \\\"data\\\": {\\n            \\\"link\\\": \\\"http://pubnative.net/content-info\\\",\\n            \\\"icon\\\": \\\"http://cdn.pubnative.net/static/adserver/contentinfo.png\\\",\\n            \\\"text\\\": \\\"Learn about this ad\\\"\\n          }\\n        }\\n      ],\\n      \\\"beacons\\\": [\\n        {\\n          \\\"type\\\": \\\"impression\\\",\\n          \\\"data\\\": {\\n            \\\"url\\\": \\\"http://tr.pubnative.net/impression?aid=1004319&t=nEwDu8f3q3lOFWu9DyK7zdRC35g5CMeNRBkaY6Uh0DJD46AOz7xasaXWTAkIzBAplpxgBinSgq88evjam4WqmaYzXinpA2ygZBVTHyGNN_ckpG3y8JQW5C_-jhKEdqznVoPy8pba5SdNPjZg5mAShNPq6S7CHo5Y6ZnccoqZh5dyEi5VYHrAdFcM_6oBDdg1OFirXh3ifCsfKXiwE_ZQSOz7jDXjwmX1pAm0loPZvIj0sEYUvHjpDTx0IRaFt0M7ZgU7ZvbhWfXwaILek-ok7BPc2P3tHTOBQYsC49hhuzqy7Yf-dCF6OSh56jnPVsIGT6ee-x1PDfWnz5Ylto2UUt6mR59Rm1-pP_G4od2r_CsSkbnpqHbHmWLPhjHDg_do4t8aZDYXOE1Hoh_RHLEVO1HsiZ1ekMudY2cIV0P5HVIdWMKB-s2ggNpAgnqz-kaQ3hac9alapQ&tl=458\\\"\\n          }\\n        }\\n      ]\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample response for ad layout `l`\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div>\\n<table>\\n  <caption><h3><font color=\\\"#7d0a80\\\">Response</caption></h3></font>\\n  <tr>\\n    <th>Field/Object</th>\\n    <th>Description</th>\\n    <th>Format</th>\\n  </tr>\\n  <tr>\\n    <td>link</td>\\n    <td>Click through URL</td>\\n    <td>string</td>\\n  </tr>\\n  <tr>\\n    <td>assets object</td>\\n    <td>Asset object contains information of all assets requested via the 'al' parameter. The asset group id served will be mentioned.</td>\\n    <td>string</td>\\n  </tr>\\n  <tr>\\n    <td>meta object</td>\\n    <td>Meta object contains information of all meta properties requested via the 'mf' parameter</td>\\n    <td>string</td>\\n  </tr>\\n  <tr>\\n    <td>beacons object</td>\\n    <td>Beacons Object contains URL beacon used to confirm impressions and clicks</td>\\n    <td>url</td>\\n    <td>YES</td>\\n  </tr>\\n</table>\\n</div>\\n\\n<style></style>\"\n}\n[/block]\n\n##Asset Type\n* For accessing our native demand publisher should support following asset type:\n  icon, title, description, rating, banner. \n* In case of cross-format support following asset type should also be supported:\n  standardBanner, htmlBanner and vast2. Please refer to [Client API section](http://developers.pubnative.net/docs/client-api-v30) for detailed information about asset group and formats supported Pubnative\n* The asset type will be mentioned explicitly.\n* In the case of icon, banner, standardBanner, htmlBanner sizes will be returned in the response.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"##Sample icon\\n{\\n          \\\"type\\\": \\\"icon\\\",\\n          \\\"data\\\": {\\n            \\\"w\\\": 80,\\n            \\\"h\\\": 80,\\n            \\\"url\\\": \\\"http://cdn.pubnative.net/games/icons/001/010/700/dimension_80x80.jpg?20160706190952\\\"\\n          }\\n        }\\n\\n##Sample Banner\\n{\\n          \\\"type\\\": \\\"banner\\\",\\n          \\\"data\\\": {\\n            \\\"w\\\": 1200,\\n            \\\"h\\\": 627,\\n            \\\"url\\\": \\\"http://cdn.pubnative.net/games/promo_images_landscape/001/010/700/dimension_1200x627.jpg?20160622183653\\\"\\n          }\\n}\\n\\n##Sample StandardBanner\\n{\\n          \\\"type\\\": \\\"standardbanner\\\",\\n          \\\"data\\\": {\\n            \\\"w\\\": 300,\\n            \\\"h\\\": 250,\\n            \\\"url\\\": \\\"http://cdn.pubnative.net/games/promo_images_landscape/001/010ssssnsion_1200x627.jpg?20160622183653\\\"\\n          }\\n}\\n##Sample HtmlBanner\\n\\n\\\"type\\\": \\\"htmlbanner\\\",\\n\\\"data\\\": {\\n\\\"w\\\": 300,\\n\\\"h\\\": 250,\\n\\\"html\\\": \\\"<span class=\\\\\\\"PubAPIAd\\\\\\\"><STYLE>body{margin: auto;}</STYLE><DIV><A target=\\\\\\\"_blank\\\\\\\" href=\\\\\\\"http://track.NETWORK.com/AdServer/AdDisplayTrackerServlet?clickData=JnB1YklkPTE1NTk3NSZzaXRlSWQ9MTU5NjA2JmFkSWQ9ODIwMjE1JmthZHNpemVpZD05JnRsZElkPTAmY2FtcGFpZ25JZD0xNTIwOCZjcmVhdGl2ZUlkPTAmYWRTZXJ2ZXJJZD0yNDMmaW1waWQ9MkY4QjNBMTktQ0EyNy00MzEzLUE1RTEtMEIyNkQ4QzRBNzNEJm1vYmZsYWc9MSZpc21vYmlsZWFwcD0xJmNhcnJpZXJpZD0xNTAmcGFzc2JhY2s9MA==_url=http%3A%2F%2Fclickus.basebanner.com%2Fst%3Fcipid%3D2621000%26excid%3D23%26ttype%3D1%26dast%3Dv1_2621000_-1_3o1_884DB89344267722021886610003__4230937_14ch7_778_884DB8934426772201993852600_n_0_-7041993656288223481_820215____2g_4oa7_0_%26cipp%3D0.0219582271%26excid%3D23%26cisid%3D884DB89344267722021886610003%26pix%3D31581939%26tgt%3Dhttps%253A%252F%252Fwww.glassesusa.com%252Fcoupons-and-promotions%253Fsr%253D7742381\\\\\\\"><IMG border=0 width=300 height=250 id=\\\\\\\"_ci4230937_b4074867\\\\\\\" alt=\\\\\\\"\\\\\\\" src=\\\\\\\"http://d94r1llj8z8wm.clossudfront.net/uploads/1456266446847_300x250-mirror.gif\\\\\\\"/></A>\\\\r\\\\n</DIV>\\\\r\\\\n<script type=\\\\\\\"text/javascript\\\\\\\" src=\\\\\\\"http://imprusmp.basssssebanner.com/st?cipid=2621000&ttype=0&cirid=884DB8934426772201993852600&cicmp=1192487&cijs=1&dast=bXRtZGxpZD0zMjAzMTAwMjU4NyZjbXQ9LTEmZnJtaT0wJm1tdD0tMSZwcnJwPTEwMDAwMC4wJnBmcnA9LTEuMCZleGNpZD0U5OTgwMzQwNDYmc2VydmluZ0RvbWFpbj1iYXNlYmFubmVyLmNvbSZsYXQ9NDkuNDU2MyZsb25nPTguMDgxNCZjaXRicD0wLjAyNTE1Mzg0NjE1Mzg0NjE1&cipp=0.0219582271&excid=23\\\\\\\"></script></span> <!-- NETWORK Ad Ends -->\\\"\\n}\\n}\\n        \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n## Meta types\n\nPublishers requests the following meta types:\n* 'points' specifies payout associated to the campaign\n* 'revenuemodel' is the revenue model of the campaign returned\n* 'campaignid' is the PubNative campaign id\n* 'bundleid' is the bundle id of the app associated to the campaign \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"meta\\\": [\\n        {\\n          \\\"type\\\": \\\"points\\\",\\n          \\\"data\\\": {\\n            \\\"number\\\": 2420\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"revenuemodel\\\",\\n          \\\"data\\\": {\\n            \\\"text\\\": \\\"cpa\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"campaignid\\\",\\n          \\\"data\\\": {\\n            \\\"text\\\": \\\"3229480\\\"\\n          }\\n        },\\n        {\\n          \\\"type\\\": \\\"creativeid\\\",\\n          \\\"data\\\": {}\\n        },\\n\\t\\t\\t\\t{\\n          \\\"type\\\": \\\"contentinfo\\\",\\n          \\\"data\\\": {\\n          \\\"link\\\": \\\"http://pubnative.net/ad-choices\\\",\\n          \\\"icon\\\": \\\"http://cdn.pubnative.net/static/adserver/pnadchoices.png\\\",\\n          \\\"text\\\": \\\"Learn about this ad\\\"\\n                  }\\n        },\\n        {\\n        \\\"type\\\": \\\"bundleid\\\",\\n        \\\"data\\\": {}\\n        }\\n      ]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n## Beacon Type\n\nPubnative response contain following beacon types:\n\n**1. Impression beacon - Type URL**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"beacons\\\": [\\n        {\\n      \\\"type\\\": \\\"impression\\\",\\n\\t\\t\\t\\\"data\\\": {\\n\\t\\t  \\\"url\\\": \\\"http://tr.pubnative.net/impression?aid=1012003&t=uuJqdX8Q6ULYwTQwCxFTg8LdkPsKhhVL9UbAFc49jFQ6V8VFueXVyEw9w5CXp65y-FO_MkzYnsf9mCe6PPO1TzZCr-0BK3pM6Qj3cTVT6hJPGDQ-WwtnefolN05Go396WkFb0-L5b_yjE0J9X4yv46ZSEpPVx4whFUAhY0ztOdXHG7ILQe7iqYKXzAhW7UG2N4JYioWM2kXBcFB_9E8vk_Wk6wjHqPJ_gtlMuZkX3F_fp-dukRmtd4BzMlZraJg8Z7pZvFE1u0GaBaup9FYs-B26K8X9OONmEke3J5TAWhxZuqRD9c6SuYuZUhWtDJaFh5Vq4ApEuIqnb9HKt6n-zkMRPKQ8EIzYxJ-FJUNwhyVcsTqMws_udHtpZt-W68ygffT0pHiZ8DasPMgH73-Xld0uZ8qE7kHwSdWtZxB_7UPupUj-BhARg67QEQ5FwiQ_p8ghOBCGm56BhdrxinP1GQlCR2gIWrccVjSOH1MmlkQgBtjou_KCVZfzAfI2kIvWnQ6awfZo-gM3JLaooOoHJ2f81tAL_Q4LZ7fbWlJLp52b6XLeQUlPIBgPsG2WSZ0AU5j3M-6MqmxxJoRg5et9OcKmkg2Y6ovprNrvghccl9Ao&tl=620\\\"\\n\\t\\t\\t}\\n\\t\\t}, {\\n\\t\\t\\t\\\"type\\\": \\\"impression\\\",\\n\\t\\t\\t\\\"data\\\": {\\n\\t\\t\\t\\\"url\\\": \\\"https://NETWORKDOMAIN/c.asm/C/t/eh069iuvof/1pym/s/1h/db/u/0/0/0/eyJVSUQiOiIzYjY3Nzg4My1kOWI3LTQ3YzctYWNjNC0wZWFmYWIzN2U0MWQiLCJHUElEIjoiM2I2Nzc4ODMtZDliNy00N2M3LWFjYzQtMGVhZmFiMzdlNDFkIn0~/08ebd7a8-0157-1000-f8f2-3e92681100d0/-1/0/14/0/0/49.43330001831055,6.849999904632568,0.0/13494882/NW/2t/0/api/3.0.0/dir/Y29tLnRocmVldXBwbHVzLlByb19TbmlwZXJfU3RpY2ttYW5fRnJlZQ~~/Fp4oFsCNtwEW3ODqzNFVN5yijIBTlGE_FBwXAAAAAAAA8D8XVfbbM2QYZT8XAAAAAAAAAAAUBBIYODVZMHJtcTlvZVcrcW94QXNOa29TSldMK0Z2eS9HQ1JMTnJvOWFJZHc3RndBU0pUdVFZS0VlZz09GAZOQVRJVkUcFAAUAhwcFoDAuJWA6uvrERbf1Oe8wtvglg8AFoD208rquMLqTBUAEgAAORXAPiEUABbE5PiK6lEUBBgYcGVyZi1hZHBvb2wxMDAxLnBlcmYudWgxFAISPBUCACwVAgBTBgA=/-1/AA==/6/40d5d6fc?m=18&ts=$TS\\\"\\n          }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**2. Impression beacon - Type JS**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"beacons\\\": [\\n         {\\n          \\\"type\\\": \\\"impression\\\",\\n          \\\"data\\\": {\\n            \\\"js\\\": \\\"<script></script>\\\"\\n          }\\n        }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**3. Click Beacon - Type URL**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"beacons\\\": [\\n        {\\n         \\t\\\"type\\\": \\\"click\\\",\\n\\t\\t\\t\\\"data\\\": {\\n\\t\\t\\t\\t\\\"url\\\": \\\"https://NETWORKDOMAIN/c.asm/C/t/eh069iuvof/1pym/s/1h/db/u/0/0/0/eyJVSUQiOiIzYjY3Nzg4My1kOWI3LTQ3YzctYWNjNC0wZWFmYWIzN2U0MWQiLCJHUElEIjoiM2I2Nzc4ODMtZDliNy00N2M3LWFjYzQtMGVhZmFiMzdlNDFkIn0~/08ebd7a8-0157-1000-f8f2-3e92681100d0/-1/0/14/0/0/49.43330001831055,6.849999904632568,0.0/13494882/NW/2t/0/api/3.0.0/dir/Y29tLnRocmVldXBwbHVzLlByb19TbmlwZXJfU3RpY2ttYW5fRnJlZQ~~/Fp4oFsCNtwEW3ODqzNFVN5yijIBTlGE_FBwXAAAAAAAA8D8XVfbbM2QYZT8XAAAAAAAAAAAUBBIYODVZMHJtcTlvZVcrcW94QXNOa29TSldMK0Z2eS9HQ1JMTnJvOWFJZHc3RndBU0pUdVFZS0VlZz09GAZOQVRJVkUcFAAUAhwcFoDAuJWA6uvrERbf1Oe8wtvglg8AFoD208rquMLqTBUAEgAAORXAPiEUABbE5PiK6lEUBBgYcGVyZi1hZHBvb2wxMDAxLnBlcmYudWgxFAISPBUCACwVAgBTBgA=/-1/AA==/6/40d5d6fc?m=8&ts=$TS\\\"\\n\\t\\t\\t}\\n\\t\\t}, {\\n\\t\\t\\t\\\"type\\\": \\\"click\\\",\\n\\t\\t\\t\\\"data\\\": {\\n\\t\\t\\t\\t\\\"url\\\": \\\"https://NETWORKDOMAIN/c.asm/C/t/eh069iuvof/1pym/s/1h/db/u/0/0/0/eyJVSUQiOiIzYjY3Nzg4My1kOWI3LTQ3YzctYWNjNC0wZWFmYWIzN2U0MWQiLCJHUElEIjoiM2I2Nzc4ODMtZDliNy00N2M3LWFjYzQtMGVhZmFiMzdlNDFkIn0~/08ebd7a8-0157-1000-f8f2-3e92681100d0/-1/0/14/1/0/49.43330001831055,6.849999904632568,0.0/13494882/NW/2t/0/api/3.0.0/dir/Y29tLnRocmVldXBwbHVzLlByb19TbmlwZXJfU3RpY2ttYW5fRnJlZQ~~/Fp4oFsCNtwEW3ODqzNFVN5yijIBTlGE_FBwXAAAAAAAA8D8XVfbbM2QYZT8XAAAAAAAAAAAUBBIYODVZMHJtcTlvZVcrcW94QXNOa29TSldMK0Z2eS9HQ1JMTnJvOWFJZHc3RndBU0pUdVFZS0VlZz09GAZOQVRJVkUcFAAUAhwcFoDAuJWA6uvrERbf1Oe8wtvglg8AFoD208rquMLqTBUAEgAAORXAPiEUABbE5PiK6lEUBBgYcGVyZi1hZHBvb2wxMDAxLnBlcmYudWgxFAISPBUCACwVAgBTBgA=/-1/AA==/6/1d0f464a?at=1&am=0&ct=$TS\\\"\\n          }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"isa_info\\\">\\n  <strong>Impression and click beacons MUST be confirmed client side</strong>. PubNative provides a complex mix of demand sources from premium advertisers to performance marketing partners and OpenRTB exchanges. The programmatic buyers are paying only when their impressions and clicks are confirmed in real-time. That is why it is essential to confirm the impression and click beacons in real time.\\n<p>Please be noted as soon as an impression (=creative) is shown to the user and ONLY after the ad has been viewed for 1 second should the impression be confirmed. This is the guideline is in order to respect IAB view-ability terms.</p>\\n<dl>\\n  <dt>How are impression and click beacons confirmed?</dt>\\n  \\t<dd>\\n      <ul>\\n        <li>In case the beacon is of type url, then you must send us a GET request to the URL which is specified in impression beacon client side.</li>\\n        <li>In case the beacon is of type js, then you must render js script in a web view and confirm the impression on client side.</li>\\n      </ul>\\n  \\t</dd>\\n<p><b>Note:</b> Number of impression and click beacons depend on the demand partner. The integration must be done in such a way that the app is in a position to confirm all beacons -impression and click.</p>     \\n</div> \"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How to use?\"\n}\n[/block]\n* The server generates a GET request to the relevant ad-format together with the url param, the server returns a json response\n* The server parses the json according to the ad format\n* When the ad is shown, our server must be notified about the impression (as mentioned above)\n* When user clicks on the ad, the server should redirect to the URL which is specified in ad's link, and the click beacon must be confirmed\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"ads\\\": [\\n    {\\n      \\\"link\\\": \\\"http://tr.pubnative.net/click/native?aid=4&t=qyaUDc7fF-_rqXR6BLs_t9z2cpmf_SpRnCmC-r7BpFpxRSBSM_LdwFFbF5yN9Tdz7mkuMpTws22UFVb24k4TmeQRGqSStKi3CzFmqppwCiLPxGANFs88oQlWiex6kqFXZbubHWjBKb9ZdBWrKzgnCmEREdAOEMDvV3W8MVQ-loUv5cgnlQF-gXf-wsBKAytCF4m6zQN2w-TcUYkGH......\\\"\\n\",\n      \"language\": \"json\",\n      \"name\": \"Click link structure\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"isa_info\\\">\\n  <strong><font color=\\\"7d0a80\\\">Revenue models supported: </font></strong>  \\n  \\t<ul>\\n      <li>CPA (Cost Per Action, which means users have to download and open the app for conversion)</li>\\n      <li>CPC (Cost Per Click)</li>\\n      <li>CPM (Cost Per Mile, which is a cost for every 1,000 impressions)</li>\\n  \\t</ul>\\n<p>Points Calculation:</p>\\n  <ul>\\n    <li>CPA campaign : 1 point = 0.001 USD (per 1 conversion)</li>\\n    <li>CPM campaign : 1 point = 0.001 USD (per 1,000 impressions)</li>\\n    <li>CPC campaign : 1 point = 0.001 USD (per 1 click)</li>\\n  </ul>\\n<b>If the point value is 0, please send inquiry to the PubNative team</b>     \\n</div> \"\n}\n[/block]\n## Frequently Asked Questions\n**1. What is impression confirmation**\nWhen the ad is shown, our server must be notified about the impression in order to track the campaign performance correctly\n**2. Why is impression confirmation required?**\nThe impression confirmation is a critical part of RTB compliance as well as for the eCPM maximization algorithm and the impression beacon should be triggered when the user actually sees the ad. One of the reasons for this is that campaigns available via RTB are CPM based and if we do not have the impression confirmation at 'seeing' stage, then the revenue will not be counted properly.\n[block:html]\n{\n  \"html\": \"<div class=\\\"isa_info\\\">\\n  <strong><font color=\\\"7d0a80\\\">Use all available parameters:</font></strong>  Please be noted that overall performance depends on the number of submitted targeting criteria. For example if you decide to share age, gender, location and other demographics in the request it makes it easier to win impressions for RTB demands so we highly recommend to send us all the parameters you can possibly send.\\n</div> \"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Checklist Before Activation\"\n}\n[/block]\nAfter the integration is complete, all that remains is to test the integration and make sure everything is working well. \n\n## Request\n* Your request URL includes all required parameters with correct values\n* Your request URL includes user identifiers. (Android Advertiser ID or Apple IDFA)\n* You are sending requests when user reaches the ad inventory and with planned frequency.\n* The best practice is to request a maximum of 3 ads per user session. Ads should be refreshed after an event (click or download) or after period of non-engagement. This period depends on the length of user sessions and can be from 1 minute to 3 minutes.\n\n## Response\nYour app works correctly even when there is no fill (API returns no ads). In case anything is wrong with the app, PubNative can disable the fill and later enable it back on when the encountered problems are fixed.\n \n## Impression\n* You are confirming impressions when the user sees the ad for the first time for a minimum duration of 1 second.\n* You need to confirm ALL impression beacons served in the response.\n* You are confirming impressions immediately, in real-time.\n* You shouldn’t confirm impressions twice, even if the user sees the same ad again. One (initial) confirmation is enough.\n\n## Clicks\n* Click happens when the user clicks the advertisement which is linked with the click URL PubNative provides.\n* If click beacons exist then ALL click beacons served in the response should be confirmed on the event of click\n* The click event has to be done by a genuine user and should not be an automated bot or incentivized (rewarded) click\n* Depending on the type of campaign (app promotion or mobile landing page) the redirect behaviour should be considered\n* For App promotion campaigns, background redirect (hidden browser/webview) is permitted in order to maintain the user experience\n* For mobile landing pages, at the end of the redirect you must make sure to either show an internal browser window (better user experience) or send the user directly to the default mobile browser\n\n**Please also send your request URL to PubNative team so we can help you to make sure everything is properly setup and ready to go live!**\n\n**If you have any questions, don’t hesitate to get in touch: support:::at:::pubnative.net**\n[block:html]\n{\n  \"html\": \"<style>\\n.isa_info {\\nmargin: 10px 0px !important;\\npadding:12px !important;\\n}\\n\\n.isa_info {\\n    color: #424242 !important;\\n    background-color: #dcdcdc !important;\\n}\\n\\n.isa_info i {\\n    margin:10px 22px !important;\\n    font-size:16px !important;\\n    vertical-align:middle !important;\\n}\\n</style>\"\n}\n[/block]","excerpt":"","slug":"quick-start-guide-for-api-v3","type":"basic","title":"Quick Start Guide For API v3"}

Quick Start Guide For API v3


Using Pubnative APIv3 you can either do client side or server side integration This document will provide you the necessary information about API v3 for accessing our native demand. ##Improvements * Support for contentinfo * Support for multiple impression trackers and click trackers * Client-side impression and click ocnfirmation enabling access to more extensive demand * Improved user and display confirmation granting access to more CPM and CPC demand partners ## Base URL `http://api.pubnative.net/api/v3/native?{params}` ##Additional Request Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Format", "h-2": "Description", "10-0": "srvi", "11-0": "adcount", "12-0": "ua", "14-0": "ip", "15-0": "locale", "16-0": "lat", "17-0": "long", "18-0": "gender", "19-0": "age", "20-0": "keywords", "21-0": "secure", "22-0": "idfamd5", "23-0": "idfasha1", "24-0": "gidmd5", "25-0": "gidsha1", "10-1": "Boolean", "10-2": "1 - server to server integration. If set to 1, need to pass set ip and ua", "11-2": "Number of Apps to return. Possible values: 1 (default) to 20", "12-2": "User Agent String. Required when srvi is set to 1", "14-2": "IP address of the client device", "15-2": "The locale used. i.e. DE", "16-2": "The current latitude of the requesting device. Don´t send param if value is unknown.", "17-2": "The current longitude of the requesting device. Don´t send param if value is unknown.", "18-2": "The user's gender. Possible values: \"male\", \"female\", \"other\"", "19-2": "The user's age", "20-2": "A comma separated list of keywords", "21-2": "Default is http. Can use https secure parameter for overding", "22-2": "Apple ID for Advertising (md5)", "23-2": "Apple ID for Advertising (sha1)", "24-2": "Android Advertiser Id(md5)", "25-2": "Android Advertiser Id(sha1)", "11-1": "String", "12-1": "String", "14-1": "String", "15-1": "String", "16-1": "String", "17-1": "String", "18-1": "String", "19-1": "String", "20-1": "String", "21-1": "String", "22-1": "String", "23-1": "String", "24-1": "String", "25-1": "String", "0-0": "apptoken", "9-0": "gid", "0-1": "String \nRequired", "9-1": "String. \nRequired when request generated from a Android device", "0-2": "This is your internal app token which you fetch from the publisher dashboard.", "9-2": "Android ID for Advertising.", "8-0": "idfa", "8-1": "String. \nRequired when request generated from a Apple device", "8-2": "Apple ID for Advertising.", "1-0": "os", "2-0": "osver", "3-0": "devicemodel", "4-0": "dnt", "5-0": "al", "6-0": "mf", "1-1": "String\nRequired", "2-1": "String\nRequired", "3-1": "String\nRequired", "4-1": "String\nRequired", "5-1": "String\nRequired", "6-1": "String", "1-2": "The operating system of requesting device, i.e. ios, android", "2-2": "The operating system version of the requesting device", "3-2": "The model name of the device", "4-2": "0 - Track user ; 1 - Do not track user", "5-2": "Ad layouts that need to be requested. To access native demand we recommend \"m\" \nPossible values are - s,m,l\nFor more info about [ad layouts](http://developers.pubnative.net/docs/client-api-v30#ad-layouts)", "6-2": "Specify the meta data. i.e. points, revenuemodel, campaignid, creativeid, contentinfo", "7-0": "zoneid", "7-1": "String\nRequired", "7-2": "The ad zone identifier. Zones need to be created in Pubnative Dashboard prior to use.", "13-0": "bundleid", "13-1": "String", "13-2": "The bundle identifier of the requesting app. i.e. com.my.app, 422689480", "26-0": "coppa", "26-1": "String", "26-2": "Flag indicating if this request is subject to the COPPA regulations established by the FTC, where 0 = no, 1 = yes." }, "cols": 3, "rows": 27 } [/block] [block:html] { "html": "<div class=\"isa_info\">\n <strong><font color=\"7d0a80\">Ad layout:</font></strong> Ad layouts is standardized of requesting specific assets depending upon the size or type of your placement. Possible values s, m, l.\n</div> " } [/block] ## Sample Request [block:code] { "codes": [ { "code": "GET /api/v3/native?apptoken=YOURAPPTOKEN&os=android&devicemodel=iphone&osver=9.1&dnt=1&zoneid=1&mf=points,revenuemodel,campaignid,creativeid&al=m HTTP/1.1\nHost: api.pubnative.net\nCache-Control: no-cache", "language": "curl", "name": "Client API" }, { "code": "GET /api/v3/native?apptoken=YOURAPPTOKEN&os=Android&devicemodel=iphone&osver=9.1&dnt=0&mf=points,revenuemodel,campaignid,creativeid&al=m&srvi=1&zoneid=1&ua=Mozilla&ip=88.134.178.169&gid=E2BF1F85-2D66-49CA-A44E-13E30906230B \nHost: api.pubnative.net\nCache-Control: no-cache", "language": "curl", "name": "Server-to-Server" } ] } [/block] [block:html] { "html": "<div class=\"isa_info\">\n <strong><font color=\"7d0a80\">Server-to-Server Integration:</font></strong> In case you plan to do the integration on the server side, the following params need to be set:\n <ul>\n <li>\"srvi\" param needs to be set to '1'</li>\n <li>\"ua\" and \"ip\" params need to be set</li>\n </ul>\nNote: Confirmation of ALL beacons namely the types - click and impression still need to be done on client side.</b>\n</div>" } [/block] ##Response Below are sample responses for ad layouts type - s, m, l [block:code] { "codes": [ { "code": "{\n \"status\": \"ok\",\n \"ads\": [\n {\n \"link\": \"http://tr.pubnative.net/click/s2s?aid=1004319&t=Y3j8NEmpUJcxUeTbk8iAfl8IxnITsF9v2yBrnz7VwjRtltJfTtpptKcQGCEjlJBCRaiXhfAoRV_2BiyLv-dhfkPs8h4xCF8l6meTuZLjsCXbWcSBknDsJy4_0oKJYfMLTbgX-ic_xY6oONdR1mnb1OinmDFYg7dIOJt4OqyOPEWUcLlBeqg9QNgt_uX8xu2s-4WSUsNu9oIDa-ZhtkLZSwe2pYac1c6oaOyi2Ssb03abSoUHCk0xGo_Rp7rpFNkrVi1TVXRKSUXb6_QWhkUQg6jJjEMAqI1PsC1W8EtSDUAZ0UQfBGf6A-MsZgc8rkn8C1tTppOL7RG0WAmd4KRNwcSp5nMwRxH8vzA947tgTJqekpOZvimbISsGDm2KWVBrEodv3fBeYDUBhpybEWH6GVkampQt2O27BbsKHAI0dRDKfR8iUFk5Ro4zBrqIEEXpcXKZVuBYIH0Omhka2VPeuRNLVqIR_RJv2SOt496tseTpM7uqSXLGxL7DSyRl7l1DrfHNyYa-_F2mGACa09w-edE_gX8dzeergsghd42XFA0ymqN6Q3NSmA0uWsDlz_-BrE44XPkzKYVa7XRudyA8FIR5yPvlfCpEB0qCfQBUUdJ5vhyQwQbYaqxzhR-Ldt0FKyWXsoR6C4_aOkrW_oiGfJG9s2mmrdrAO2ypfHMxeWEY0zWs-m0BD6I8Sj89r5S3TluSiU2_TfX07Wgz09dUea1wQ1gS0A_jkOE_n3LVC7PoKClvVErJNjDJtA1eYF2S1GBitOmAH_JcASvnGlcc-qTZMJapirdi7jxtFSH--BhTxgS-98-nn__thftGvqePCvLzTpMz4N1pIPxfN-kxl14UwkqaZakxY24G56c88sILzPQ_mvnYg9jutOZ6ox6emerO28BOtTjTF3x5-JhB-PfH1BpktC--6LnrTq-O4_ubg8KiMY_ZfaNV3KEfU_4OxVBNON3HYqXR0PHX5Yz3Zjf0y5TK8UzcyKvasA4KkbSa4c0O5swReJN5DXUI2x-lXtl8SGzR0b6gQrzYA9zDUmseDR5afdGD6Nk7fV3amg7ebDqWZpIdZ0XEoQVG00SMjH1GXlCYS6_xqd4qTMtMliH6gyXR\",\n \"assetgroupid\": 1,\n \"assets\": [\n {\n \"type\": \"icon\",\n \"data\": {\n \"w\": 80,\n \"h\": 80,\n \"url\": \"http://d1.cnnx.io/image/obj/6705665130;sq=100?mid=300829\"\n }\n },\n {\n \"type\": \"title\",\n \"data\": {\n \"text\": \"Sonax Scheiben- und FensterTuch 1 Stück\"\n }\n },\n {\n \"type\": \"cta\",\n \"data\": {\n \"text\": \"Learn More\"\n }\n }\n ],\n \"meta\": [\n {\n \"type\": \"contentinfo\",\n \"data\": {\n \"link\": \"http://pubnative.net/content-info\",\n \"icon\": \"http://cdn.pubnative.net/static/adserver/contentinfo.png\",\n \"text\": \"Learn about this ad\"\n }\n }\n ],\n \"beacons\": [\n {\n \"type\": \"impression\",\n \"data\": {\n \"url\": \"http://tr.pubnative.net/impression?aid=1004319&t=Q1oQ8Hde_eT8gdYu8sqsQ5g6BUcy9_7EUXT4PFVrUFj8Cu9hJaL8d9m5AiWRcJcm7Z8Nrcg2lz2cIqVhc_-3zX09x9Ck79tFgqBm5LV5ut9PAhjpdGwWCoJRFm_wMd_nMXOY1rafFQS6424LgYZHuffzHoub7xXK9H38LAdnRzMPUwjN1f7WKtiUismkcz0O6ZRCgmEplBA7WooWdvj9zVX2kEgJe_DlzD2sRzcAzlFFEmHzZgxz56dDdZcXRRi8FYUe4R0oVfQR-aUEWwDepadnVoT9Qsi-2gfWInThGuf1AZz8q-eKO13gb8geNzcHT-iJx1kJR7SpDI86l3eXetWlEiUVuZHpmhK-N5aV5I3pm8pNMKa_-l2wBDwYBW-yIMqpRYKo3td8ws-4syx9YWDU_iFj7JjShINdsbqwWhx67m52S30ek0PCzOhOEnEfc90v4JEoMOxS&tl=460\"\n }\n }\n ]\n }\n ]\n}", "language": "json", "name": "Sample response for ad layout `s`" }, { "code": "{\n \"status\": \"ok\",\n \"ads\": [\n {\n \"link\": \"http://tr.pubnative.net/click/native?aid=1004319&t=MOPD_cKr-eWMtv3sqzuWXuDVUW_LiNxASK3_o6wlkELmaWlflIeGYSAltF1QsytWKUh24IYsVu_zdDHxT_plbKIL6P0Wg0NRs4Yqo3GvYPYsDELH-V3sFNH4CzW_Cdu8btMyXnK5qbTirbr3uQeee8-gEcOae0pC5nr44AklC6qK4RMWy0fUyfU-iU5fs8ewVY8EkpBc6G0EWxDZEyHn3QCQM5bs_qAjMTrov2xPeL4IyPsyVngrXNpMvn_-GIcOysBK3fzIRAlipO_r8rWOTU_gqGPexDhGcw-Etp0pKJRsC6hbGJi9SIkZ-_UHS9Wotn6c9a9S_OcFAoVZt2DEKTbvyslDyc32Kesq3AUeORS7Q9vVGpb4MI8htz4BRAw8bc64z9wlZu8rPNJzSwNpJoJSI8pzh0A215_VQcOCy3Ae3BykUOtxcJL3HGNnjhaTaRnSiAo_vBesg2ejpk3HES0O0o5JeekypdsLyaJv5j4ZPf3mHB6LwpKaN5cr-4vtDb3sIaCSDyVK5wrxnOOqZGF6BFiqyliwnEDWjIumklsJb1L08JxXNgsb7roPc365ai58_DAyBrKNey1JbynFB143qkBmIzdYSTei4kITYTobOM5bBlb85heEWV_4_2Y23-kgeGACHm9DG4n5jDbVI_gZCAKSmqq9mQ3kRU_SZ91PRBgmSrdaPBeMGTANFH1qSKCC1yVL7zallvU0BcZjuRrYttzoDZI\",\n \"assetgroupid\": 5,\n \"assets\": [\n {\n \"type\": \"icon\",\n \"data\": {\n \"w\": 80,\n \"h\": 80,\n \"url\": \"http://cdn.pubnative.net/games/icons/001/003/654/dimension_80x80.jpg?20161020002159\"\n }\n },\n {\n \"type\": \"banner\",\n \"data\": {\n \"w\": 1200,\n \"h\": 627,\n \"url\": \"http://cdn.pubnative.net/games/promo_images_landscape/001/003/654/dimension_1200x627.jpg?20160622173518\"\n }\n },\n {\n \"type\": \"title\",\n \"data\": {\n \"text\": \"Yandex.Browser\"\n }\n },\n {\n \"type\": \"description\",\n \"data\": {\n \"text\": \"Suchst Du eine neue, coole App? Lade mich jetzt runter.\"\n }\n },\n {\n \"type\": \"rating\",\n \"data\": {\n \"number\": 4\n }\n },\n {\n \"type\": \"cta\",\n \"data\": {\n \"text\": \"Installieren\"\n }\n }\n ],\n \"meta\": [\n {\n \"type\": \"contentinfo\",\n \"data\": {\n \"link\": \"http://pubnative.net/content-info\",\n \"icon\": \"http://cdn.pubnative.net/static/adserver/contentinfo.png\",\n \"text\": \"Learn about this ad\"\n }\n }\n ],\n \"beacons\": [\n {\n \"type\": \"impression\",\n \"data\": {\n \"url\": \"http://tr.pubnative.net/impression?aid=1004319&t=850LJyZtlV7VTjsCnU0ENjImKPDAuvtZi0cEPKN4R4BUzDw7_94DOb2w_mSXhiLCANHavvkqa8O7fdUrpL5bhoQoO9_Rf-aJSujnPfUHhCZaHwTwAx_qRU-Yn2cmrSFWBT3VR7NSOF536DUxFHI3LUA7TeRx6zOEoUFm_YFphMSEwnIK3uFN-BNv2FmCjnG-3JfaZwMclHpjUiHDzRFUvQOR5xEahdG8JiIkc36YwJYfSW61tLoTHqmnxIIGHl6OXVjM-8SSYnabYjY2U-CMt2RaUSwFzbIh-pDGq1TK2--p1LqFPJiingdp9CtF2JaV2Z4yMzsJlwQ69pXjMm5LjhC4pDapvq4mMRchRpdXoPle3mmcqRfH412UokAVH-saN6VkrRjB_4IA-MbW7pvTZt7NAijquOgWmpeBniEPgZvkHhojPiWkGh_82tjjn8T-_PvFpII&tl=455\"\n }\n }\n ]\n }\n ]\n}", "language": "json", "name": "Sample response for ad layout `m`" }, { "code": "{\n \"status\": \"ok\",\n \"ads\": [\n {\n \"link\": \"http://tr.pubnative.net/click/native?aid=1004319&t=WTaJGCqlPrH8XmK54F09hlAg0x_iGpd1wKAF0HzaUc-sYzv-WlHY9kS1EiktZxbe3wqJ3LxBxGpcZfjADJuRMaGr8SCnA8dq9caT9gMCzLYrH1m8CwUwJNg0OPCbiOn-MhWTOy6TM70XZRkLLKxp2hRNltOx2Wryn6dEebHsrN5OqMPZ6DNDQhGTWSHS6PipHK-_HtjiKQCykbNf3C4_RfqQ-jTVzWw2Q7hkFXDFfg1TC4pc7IcnkFZgxUDeqwJ53dzEku50Ll8JJijBYfDaPPzeYnw0AXjjSqUTha1Z1S0CJmugK4nL9LViOWbCQ_xtxEW-ItC2llgnrOqCF-AhTD5CJGT0gstj7LGsK2Q_-wNeEZ2pq2pJPYaBhv0ozQsvsSUay0nIWRTqs5pAryKykqwMqHWTfw7xxCXIs-UrgJFnzRC2Irn2g1gGChnoaOskTW1EpRN2nhnsLG9yhUZkazHF7XyHY3rvrUd5na65UKXGRdd3xaC-J_JQWxQFKOtekQfGcvX7eGx3D8vRWvLqJRXVWPI4pp6HHgu0wl3ojRDu7e8FoxbBq6Hy5AjCkqbIDWd3AhJHZXOEC7sCY1m2PBnvuIxF_dNPdMAr0ZU9xk9lD5bxHbp3oOen3Z2j0XSurTCHO2-bhEJSEeOLYMy3QGRzHPK5v6UeFO8rvdMorhD7w-fze8m3SV7RPZNxOg\",\n \"assetgroupid\": 16,\n \"assets\": [\n {\n \"type\": \"icon\",\n \"data\": {\n \"w\": 80,\n \"h\": 80,\n \"url\": \"http://cdn.pubnative.net/games/icons/001/004/457/dimension_80x80.jpg?20161020023441\"\n }\n },\n {\n \"type\": \"banner\",\n \"data\": {\n \"w\": 1200,\n \"h\": 627,\n \"url\": \"http://cdn.pubnative.net/games/promo_images_landscape/001/004/457/dimension_1200x627.jpg?20160622175810\"\n }\n },\n {\n \"type\": \"title\",\n \"data\": {\n \"text\": \"Hearthstone Heroes of Warcraft\"\n }\n },\n {\n \"type\": \"description\",\n \"data\": {\n \"text\": \"TÄUSCHEND EINFACH. WAHNSINNIG UNTERHALTSAM. Nimm deine Karten und stelle dich der Herausforderung!\"\n }\n },\n {\n \"type\": \"rating\",\n \"data\": {\n \"number\": 4\n }\n },\n {\n \"type\": \"cta\",\n \"data\": {\n \"text\": \"Installieren\"\n }\n }\n ],\n \"meta\": [\n {\n \"type\": \"contentinfo\",\n \"data\": {\n \"link\": \"http://pubnative.net/content-info\",\n \"icon\": \"http://cdn.pubnative.net/static/adserver/contentinfo.png\",\n \"text\": \"Learn about this ad\"\n }\n }\n ],\n \"beacons\": [\n {\n \"type\": \"impression\",\n \"data\": {\n \"url\": \"http://tr.pubnative.net/impression?aid=1004319&t=nEwDu8f3q3lOFWu9DyK7zdRC35g5CMeNRBkaY6Uh0DJD46AOz7xasaXWTAkIzBAplpxgBinSgq88evjam4WqmaYzXinpA2ygZBVTHyGNN_ckpG3y8JQW5C_-jhKEdqznVoPy8pba5SdNPjZg5mAShNPq6S7CHo5Y6ZnccoqZh5dyEi5VYHrAdFcM_6oBDdg1OFirXh3ifCsfKXiwE_ZQSOz7jDXjwmX1pAm0loPZvIj0sEYUvHjpDTx0IRaFt0M7ZgU7ZvbhWfXwaILek-ok7BPc2P3tHTOBQYsC49hhuzqy7Yf-dCF6OSh56jnPVsIGT6ee-x1PDfWnz5Ylto2UUt6mR59Rm1-pP_G4od2r_CsSkbnpqHbHmWLPhjHDg_do4t8aZDYXOE1Hoh_RHLEVO1HsiZ1ekMudY2cIV0P5HVIdWMKB-s2ggNpAgnqz-kaQ3hac9alapQ&tl=458\"\n }\n }\n ]\n }\n ]\n}", "language": "json", "name": "Sample response for ad layout `l`" } ] } [/block] [block:html] { "html": "<div>\n<table>\n <caption><h3><font color=\"#7d0a80\">Response</caption></h3></font>\n <tr>\n <th>Field/Object</th>\n <th>Description</th>\n <th>Format</th>\n </tr>\n <tr>\n <td>link</td>\n <td>Click through URL</td>\n <td>string</td>\n </tr>\n <tr>\n <td>assets object</td>\n <td>Asset object contains information of all assets requested via the 'al' parameter. The asset group id served will be mentioned.</td>\n <td>string</td>\n </tr>\n <tr>\n <td>meta object</td>\n <td>Meta object contains information of all meta properties requested via the 'mf' parameter</td>\n <td>string</td>\n </tr>\n <tr>\n <td>beacons object</td>\n <td>Beacons Object contains URL beacon used to confirm impressions and clicks</td>\n <td>url</td>\n <td>YES</td>\n </tr>\n</table>\n</div>\n\n<style></style>" } [/block] ##Asset Type * For accessing our native demand publisher should support following asset type: icon, title, description, rating, banner. * In case of cross-format support following asset type should also be supported: standardBanner, htmlBanner and vast2. Please refer to [Client API section](http://developers.pubnative.net/docs/client-api-v30) for detailed information about asset group and formats supported Pubnative * The asset type will be mentioned explicitly. * In the case of icon, banner, standardBanner, htmlBanner sizes will be returned in the response. [block:code] { "codes": [ { "code": "##Sample icon\n{\n \"type\": \"icon\",\n \"data\": {\n \"w\": 80,\n \"h\": 80,\n \"url\": \"http://cdn.pubnative.net/games/icons/001/010/700/dimension_80x80.jpg?20160706190952\"\n }\n }\n\n##Sample Banner\n{\n \"type\": \"banner\",\n \"data\": {\n \"w\": 1200,\n \"h\": 627,\n \"url\": \"http://cdn.pubnative.net/games/promo_images_landscape/001/010/700/dimension_1200x627.jpg?20160622183653\"\n }\n}\n\n##Sample StandardBanner\n{\n \"type\": \"standardbanner\",\n \"data\": {\n \"w\": 300,\n \"h\": 250,\n \"url\": \"http://cdn.pubnative.net/games/promo_images_landscape/001/010ssssnsion_1200x627.jpg?20160622183653\"\n }\n}\n##Sample HtmlBanner\n\n\"type\": \"htmlbanner\",\n\"data\": {\n\"w\": 300,\n\"h\": 250,\n\"html\": \"<span class=\\\"PubAPIAd\\\"><STYLE>body{margin: auto;}</STYLE><DIV><A target=\\\"_blank\\\" href=\\\"http://track.NETWORK.com/AdServer/AdDisplayTrackerServlet?clickData=JnB1YklkPTE1NTk3NSZzaXRlSWQ9MTU5NjA2JmFkSWQ9ODIwMjE1JmthZHNpemVpZD05JnRsZElkPTAmY2FtcGFpZ25JZD0xNTIwOCZjcmVhdGl2ZUlkPTAmYWRTZXJ2ZXJJZD0yNDMmaW1waWQ9MkY4QjNBMTktQ0EyNy00MzEzLUE1RTEtMEIyNkQ4QzRBNzNEJm1vYmZsYWc9MSZpc21vYmlsZWFwcD0xJmNhcnJpZXJpZD0xNTAmcGFzc2JhY2s9MA==_url=http%3A%2F%2Fclickus.basebanner.com%2Fst%3Fcipid%3D2621000%26excid%3D23%26ttype%3D1%26dast%3Dv1_2621000_-1_3o1_884DB89344267722021886610003__4230937_14ch7_778_884DB8934426772201993852600_n_0_-7041993656288223481_820215____2g_4oa7_0_%26cipp%3D0.0219582271%26excid%3D23%26cisid%3D884DB89344267722021886610003%26pix%3D31581939%26tgt%3Dhttps%253A%252F%252Fwww.glassesusa.com%252Fcoupons-and-promotions%253Fsr%253D7742381\\\"><IMG border=0 width=300 height=250 id=\\\"_ci4230937_b4074867\\\" alt=\\\"\\\" src=\\\"http://d94r1llj8z8wm.clossudfront.net/uploads/1456266446847_300x250-mirror.gif\\\"/></A>\\r\\n</DIV>\\r\\n<script type=\\\"text/javascript\\\" src=\\\"http://imprusmp.basssssebanner.com/st?cipid=2621000&ttype=0&cirid=884DB8934426772201993852600&cicmp=1192487&cijs=1&dast=bXRtZGxpZD0zMjAzMTAwMjU4NyZjbXQ9LTEmZnJtaT0wJm1tdD0tMSZwcnJwPTEwMDAwMC4wJnBmcnA9LTEuMCZleGNpZD0U5OTgwMzQwNDYmc2VydmluZ0RvbWFpbj1iYXNlYmFubmVyLmNvbSZsYXQ9NDkuNDU2MyZsb25nPTguMDgxNCZjaXRicD0wLjAyNTE1Mzg0NjE1Mzg0NjE1&cipp=0.0219582271&excid=23\\\"></script></span> <!-- NETWORK Ad Ends -->\"\n}\n}\n ", "language": "json" } ] } [/block] ## Meta types Publishers requests the following meta types: * 'points' specifies payout associated to the campaign * 'revenuemodel' is the revenue model of the campaign returned * 'campaignid' is the PubNative campaign id * 'bundleid' is the bundle id of the app associated to the campaign [block:code] { "codes": [ { "code": "\"meta\": [\n {\n \"type\": \"points\",\n \"data\": {\n \"number\": 2420\n }\n },\n {\n \"type\": \"revenuemodel\",\n \"data\": {\n \"text\": \"cpa\"\n }\n },\n {\n \"type\": \"campaignid\",\n \"data\": {\n \"text\": \"3229480\"\n }\n },\n {\n \"type\": \"creativeid\",\n \"data\": {}\n },\n\t\t\t\t{\n \"type\": \"contentinfo\",\n \"data\": {\n \"link\": \"http://pubnative.net/ad-choices\",\n \"icon\": \"http://cdn.pubnative.net/static/adserver/pnadchoices.png\",\n \"text\": \"Learn about this ad\"\n }\n },\n {\n \"type\": \"bundleid\",\n \"data\": {}\n }\n ]", "language": "json" } ] } [/block] ## Beacon Type Pubnative response contain following beacon types: **1. Impression beacon - Type URL** [block:code] { "codes": [ { "code": "\"beacons\": [\n {\n \"type\": \"impression\",\n\t\t\t\"data\": {\n\t\t \"url\": \"http://tr.pubnative.net/impression?aid=1012003&t=uuJqdX8Q6ULYwTQwCxFTg8LdkPsKhhVL9UbAFc49jFQ6V8VFueXVyEw9w5CXp65y-FO_MkzYnsf9mCe6PPO1TzZCr-0BK3pM6Qj3cTVT6hJPGDQ-WwtnefolN05Go396WkFb0-L5b_yjE0J9X4yv46ZSEpPVx4whFUAhY0ztOdXHG7ILQe7iqYKXzAhW7UG2N4JYioWM2kXBcFB_9E8vk_Wk6wjHqPJ_gtlMuZkX3F_fp-dukRmtd4BzMlZraJg8Z7pZvFE1u0GaBaup9FYs-B26K8X9OONmEke3J5TAWhxZuqRD9c6SuYuZUhWtDJaFh5Vq4ApEuIqnb9HKt6n-zkMRPKQ8EIzYxJ-FJUNwhyVcsTqMws_udHtpZt-W68ygffT0pHiZ8DasPMgH73-Xld0uZ8qE7kHwSdWtZxB_7UPupUj-BhARg67QEQ5FwiQ_p8ghOBCGm56BhdrxinP1GQlCR2gIWrccVjSOH1MmlkQgBtjou_KCVZfzAfI2kIvWnQ6awfZo-gM3JLaooOoHJ2f81tAL_Q4LZ7fbWlJLp52b6XLeQUlPIBgPsG2WSZ0AU5j3M-6MqmxxJoRg5et9OcKmkg2Y6ovprNrvghccl9Ao&tl=620\"\n\t\t\t}\n\t\t}, {\n\t\t\t\"type\": \"impression\",\n\t\t\t\"data\": {\n\t\t\t\"url\": \"https://NETWORKDOMAIN/c.asm/C/t/eh069iuvof/1pym/s/1h/db/u/0/0/0/eyJVSUQiOiIzYjY3Nzg4My1kOWI3LTQ3YzctYWNjNC0wZWFmYWIzN2U0MWQiLCJHUElEIjoiM2I2Nzc4ODMtZDliNy00N2M3LWFjYzQtMGVhZmFiMzdlNDFkIn0~/08ebd7a8-0157-1000-f8f2-3e92681100d0/-1/0/14/0/0/49.43330001831055,6.849999904632568,0.0/13494882/NW/2t/0/api/3.0.0/dir/Y29tLnRocmVldXBwbHVzLlByb19TbmlwZXJfU3RpY2ttYW5fRnJlZQ~~/Fp4oFsCNtwEW3ODqzNFVN5yijIBTlGE_FBwXAAAAAAAA8D8XVfbbM2QYZT8XAAAAAAAAAAAUBBIYODVZMHJtcTlvZVcrcW94QXNOa29TSldMK0Z2eS9HQ1JMTnJvOWFJZHc3RndBU0pUdVFZS0VlZz09GAZOQVRJVkUcFAAUAhwcFoDAuJWA6uvrERbf1Oe8wtvglg8AFoD208rquMLqTBUAEgAAORXAPiEUABbE5PiK6lEUBBgYcGVyZi1hZHBvb2wxMDAxLnBlcmYudWgxFAISPBUCACwVAgBTBgA=/-1/AA==/6/40d5d6fc?m=18&ts=$TS\"\n }", "language": "json" } ] } [/block] **2. Impression beacon - Type JS** [block:code] { "codes": [ { "code": "\"beacons\": [\n {\n \"type\": \"impression\",\n \"data\": {\n \"js\": \"<script></script>\"\n }\n }", "language": "json" } ] } [/block] **3. Click Beacon - Type URL** [block:code] { "codes": [ { "code": "\"beacons\": [\n {\n \t\"type\": \"click\",\n\t\t\t\"data\": {\n\t\t\t\t\"url\": \"https://NETWORKDOMAIN/c.asm/C/t/eh069iuvof/1pym/s/1h/db/u/0/0/0/eyJVSUQiOiIzYjY3Nzg4My1kOWI3LTQ3YzctYWNjNC0wZWFmYWIzN2U0MWQiLCJHUElEIjoiM2I2Nzc4ODMtZDliNy00N2M3LWFjYzQtMGVhZmFiMzdlNDFkIn0~/08ebd7a8-0157-1000-f8f2-3e92681100d0/-1/0/14/0/0/49.43330001831055,6.849999904632568,0.0/13494882/NW/2t/0/api/3.0.0/dir/Y29tLnRocmVldXBwbHVzLlByb19TbmlwZXJfU3RpY2ttYW5fRnJlZQ~~/Fp4oFsCNtwEW3ODqzNFVN5yijIBTlGE_FBwXAAAAAAAA8D8XVfbbM2QYZT8XAAAAAAAAAAAUBBIYODVZMHJtcTlvZVcrcW94QXNOa29TSldMK0Z2eS9HQ1JMTnJvOWFJZHc3RndBU0pUdVFZS0VlZz09GAZOQVRJVkUcFAAUAhwcFoDAuJWA6uvrERbf1Oe8wtvglg8AFoD208rquMLqTBUAEgAAORXAPiEUABbE5PiK6lEUBBgYcGVyZi1hZHBvb2wxMDAxLnBlcmYudWgxFAISPBUCACwVAgBTBgA=/-1/AA==/6/40d5d6fc?m=8&ts=$TS\"\n\t\t\t}\n\t\t}, {\n\t\t\t\"type\": \"click\",\n\t\t\t\"data\": {\n\t\t\t\t\"url\": \"https://NETWORKDOMAIN/c.asm/C/t/eh069iuvof/1pym/s/1h/db/u/0/0/0/eyJVSUQiOiIzYjY3Nzg4My1kOWI3LTQ3YzctYWNjNC0wZWFmYWIzN2U0MWQiLCJHUElEIjoiM2I2Nzc4ODMtZDliNy00N2M3LWFjYzQtMGVhZmFiMzdlNDFkIn0~/08ebd7a8-0157-1000-f8f2-3e92681100d0/-1/0/14/1/0/49.43330001831055,6.849999904632568,0.0/13494882/NW/2t/0/api/3.0.0/dir/Y29tLnRocmVldXBwbHVzLlByb19TbmlwZXJfU3RpY2ttYW5fRnJlZQ~~/Fp4oFsCNtwEW3ODqzNFVN5yijIBTlGE_FBwXAAAAAAAA8D8XVfbbM2QYZT8XAAAAAAAAAAAUBBIYODVZMHJtcTlvZVcrcW94QXNOa29TSldMK0Z2eS9HQ1JMTnJvOWFJZHc3RndBU0pUdVFZS0VlZz09GAZOQVRJVkUcFAAUAhwcFoDAuJWA6uvrERbf1Oe8wtvglg8AFoD208rquMLqTBUAEgAAORXAPiEUABbE5PiK6lEUBBgYcGVyZi1hZHBvb2wxMDAxLnBlcmYudWgxFAISPBUCACwVAgBTBgA=/-1/AA==/6/1d0f464a?at=1&am=0&ct=$TS\"\n }", "language": "json" } ] } [/block] [block:html] { "html": "<div class=\"isa_info\">\n <strong>Impression and click beacons MUST be confirmed client side</strong>. PubNative provides a complex mix of demand sources from premium advertisers to performance marketing partners and OpenRTB exchanges. The programmatic buyers are paying only when their impressions and clicks are confirmed in real-time. That is why it is essential to confirm the impression and click beacons in real time.\n<p>Please be noted as soon as an impression (=creative) is shown to the user and ONLY after the ad has been viewed for 1 second should the impression be confirmed. This is the guideline is in order to respect IAB view-ability terms.</p>\n<dl>\n <dt>How are impression and click beacons confirmed?</dt>\n \t<dd>\n <ul>\n <li>In case the beacon is of type url, then you must send us a GET request to the URL which is specified in impression beacon client side.</li>\n <li>In case the beacon is of type js, then you must render js script in a web view and confirm the impression on client side.</li>\n </ul>\n \t</dd>\n<p><b>Note:</b> Number of impression and click beacons depend on the demand partner. The integration must be done in such a way that the app is in a position to confirm all beacons -impression and click.</p> \n</div> " } [/block] [block:api-header] { "type": "basic", "title": "How to use?" } [/block] * The server generates a GET request to the relevant ad-format together with the url param, the server returns a json response * The server parses the json according to the ad format * When the ad is shown, our server must be notified about the impression (as mentioned above) * When user clicks on the ad, the server should redirect to the URL which is specified in ad's link, and the click beacon must be confirmed [block:code] { "codes": [ { "code": "\"ads\": [\n {\n \"link\": \"http://tr.pubnative.net/click/native?aid=4&t=qyaUDc7fF-_rqXR6BLs_t9z2cpmf_SpRnCmC-r7BpFpxRSBSM_LdwFFbF5yN9Tdz7mkuMpTws22UFVb24k4TmeQRGqSStKi3CzFmqppwCiLPxGANFs88oQlWiex6kqFXZbubHWjBKb9ZdBWrKzgnCmEREdAOEMDvV3W8MVQ-loUv5cgnlQF-gXf-wsBKAytCF4m6zQN2w-TcUYkGH......\"\n", "language": "json", "name": "Click link structure" } ] } [/block] [block:html] { "html": "<div class=\"isa_info\">\n <strong><font color=\"7d0a80\">Revenue models supported: </font></strong> \n \t<ul>\n <li>CPA (Cost Per Action, which means users have to download and open the app for conversion)</li>\n <li>CPC (Cost Per Click)</li>\n <li>CPM (Cost Per Mile, which is a cost for every 1,000 impressions)</li>\n \t</ul>\n<p>Points Calculation:</p>\n <ul>\n <li>CPA campaign : 1 point = 0.001 USD (per 1 conversion)</li>\n <li>CPM campaign : 1 point = 0.001 USD (per 1,000 impressions)</li>\n <li>CPC campaign : 1 point = 0.001 USD (per 1 click)</li>\n </ul>\n<b>If the point value is 0, please send inquiry to the PubNative team</b> \n</div> " } [/block] ## Frequently Asked Questions **1. What is impression confirmation** When the ad is shown, our server must be notified about the impression in order to track the campaign performance correctly **2. Why is impression confirmation required?** The impression confirmation is a critical part of RTB compliance as well as for the eCPM maximization algorithm and the impression beacon should be triggered when the user actually sees the ad. One of the reasons for this is that campaigns available via RTB are CPM based and if we do not have the impression confirmation at 'seeing' stage, then the revenue will not be counted properly. [block:html] { "html": "<div class=\"isa_info\">\n <strong><font color=\"7d0a80\">Use all available parameters:</font></strong> Please be noted that overall performance depends on the number of submitted targeting criteria. For example if you decide to share age, gender, location and other demographics in the request it makes it easier to win impressions for RTB demands so we highly recommend to send us all the parameters you can possibly send.\n</div> " } [/block] [block:api-header] { "type": "basic", "title": "Checklist Before Activation" } [/block] After the integration is complete, all that remains is to test the integration and make sure everything is working well. ## Request * Your request URL includes all required parameters with correct values * Your request URL includes user identifiers. (Android Advertiser ID or Apple IDFA) * You are sending requests when user reaches the ad inventory and with planned frequency. * The best practice is to request a maximum of 3 ads per user session. Ads should be refreshed after an event (click or download) or after period of non-engagement. This period depends on the length of user sessions and can be from 1 minute to 3 minutes. ## Response Your app works correctly even when there is no fill (API returns no ads). In case anything is wrong with the app, PubNative can disable the fill and later enable it back on when the encountered problems are fixed. ## Impression * You are confirming impressions when the user sees the ad for the first time for a minimum duration of 1 second. * You need to confirm ALL impression beacons served in the response. * You are confirming impressions immediately, in real-time. * You shouldn’t confirm impressions twice, even if the user sees the same ad again. One (initial) confirmation is enough. ## Clicks * Click happens when the user clicks the advertisement which is linked with the click URL PubNative provides. * If click beacons exist then ALL click beacons served in the response should be confirmed on the event of click * The click event has to be done by a genuine user and should not be an automated bot or incentivized (rewarded) click * Depending on the type of campaign (app promotion or mobile landing page) the redirect behaviour should be considered * For App promotion campaigns, background redirect (hidden browser/webview) is permitted in order to maintain the user experience * For mobile landing pages, at the end of the redirect you must make sure to either show an internal browser window (better user experience) or send the user directly to the default mobile browser **Please also send your request URL to PubNative team so we can help you to make sure everything is properly setup and ready to go live!** **If you have any questions, don’t hesitate to get in touch: support@pubnative.net** [block:html] { "html": "<style>\n.isa_info {\nmargin: 10px 0px !important;\npadding:12px !important;\n}\n\n.isa_info {\n color: #424242 !important;\n background-color: #dcdcdc !important;\n}\n\n.isa_info i {\n margin:10px 22px !important;\n font-size:16px !important;\n vertical-align:middle !important;\n}\n</style>" } [/block]