{"_id":"57ebe174d8e83117000eb140","user":"5731f40dd720220e008ea18b","__v":0,"category":{"_id":"56858d693703ed1700e420b2","project":"564621e00c30fb2100ba3814","__v":1,"pages":["5685a6b93703ed1700e420d4"],"version":"564621e10c30fb2100ba3817","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-31T20:17:45.077Z","from_sync":false,"order":2,"slug":"dsp-resources","title":"DSP Resources"},"parentDoc":null,"project":"564621e00c30fb2100ba3814","version":{"_id":"564621e10c30fb2100ba3817","__v":14,"project":"564621e00c30fb2100ba3814","createdAt":"2015-11-13T17:46:09.275Z","releaseDate":"2015-11-13T17:46:09.275Z","categories":["564621e10c30fb2100ba3818","564624cf0c30fb2100ba3822","564628d69f3f550d00fa3db6","564dafeeda00e82b00ed601d","564daff8fc36dc3700882b95","564db0ccda00e82b00ed601f","564dcf87d3320b0d0028ca10","5661a6e436398e0d00f79566","568585153703ed1700e420b0","56858767d96a760d00545da6","56858d693703ed1700e420b2","56858d8d22c41b0d00e4666c","56859e9c009a8d0d00797130","5685a6453703ed1700e420d3"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-28T15:27:48.621Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"The MobFox Native Ad-Request API can be used to request native ads from the MobFox Publisher Platform. By default, the Native Ad API returns the requested **RTB Native Ad Assets** in an easy to use JSON format. You can then parse the JSON and render the ad as you wish.\n\nBellow we will give a sample **RTB 2.3 native bid request**. Note that the payload found at **imp.native.request** is a JSON encoded payload which conforms with the [Native ad 1.1 specifications](http://www.iab.com/wp-content/uploads/2016/03/OpenRTB-Native-Ads-Specification-1-1_2016.pdf). \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"app\\\": {\\n        \\\"bundle\\\": \\\"393760245\\\",\\n        \\\"cat\\\": [\\n            \\\"IAB19\\\"\\n        ],\\n        \\\"domain\\\": \\\"https://itunes.apple.com/gb/app/bwin-sports/id393760245?mt=8\\\",\\n        \\\"id\\\": \\\"57949\\\",\\n        \\\"name\\\": \\\"Bwin betting app\\\",\\n        \\\"publisher\\\": {\\n            \\\"id\\\": \\\"14566\\\"\\n        },\\n        \\\"storeurl\\\": \\\"https://itunes.apple.com/gb/app/bwin-sports/id393760245?mt=8\\\"\\n    },\\n    \\\"at\\\": 2,\\n    \\\"bcat\\\": [\\n        \\\"IAB26\\\",\\n        \\\"IAB25\\\",\\n        \\\"IAB24\\\"\\n    ],\\n    \\\"cur\\\": [\\n        \\\"USD\\\"\\n    ],\\n    \\\"device\\\": {\\n        \\\"connectiontype\\\": 2,\\n        \\\"devicetype\\\": 4,\\n        \\\"dnt\\\": 0,\\n        \\\"dpidmd5\\\": \\\"2D20AF98F011570F75A9606D41D9B300\\\",\\n        \\\"dpidsha1\\\": \\\"7EBF6FABAB3B9CACC5BC087F8EAE55D84586705E\\\",\\n        \\\"geo\\\": {\\n            \\\"country\\\": \\\"AUT\\\",\\n            \\\"lat\\\": 48.12,\\n            \\\"lon\\\": 16.12,\\n            \\\"type\\\": 1\\n        },\\n        \\\"ifa\\\": \\\"1976F519-26D0-4428-9891-3133253A453F\\\",\\n        \\\"ip\\\": \\\"212.232.28.94\\\",\\n        \\\"js\\\": 1,\\n        \\\"make\\\": \\\"Apple\\\",\\n        \\\"model\\\": \\\"iPhone\\\",\\n        \\\"os\\\": \\\"iOS\\\",\\n        \\\"osv\\\": \\\"8.0\\\",\\n        \\\"ua\\\": \\\"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4\\\"\\n    },\\n    \\\"ext\\\": {\\n        \\\"udi\\\": {\\n            \\\"idfa\\\": \\\"1976F519-26D0-4428-9891-3133253A453F\\\"\\n        }\\n    },\\n    \\\"id\\\": \\\"6072C8C97CB1D80C3D5B466CB3DA8025\\\",\\n     \\\"imp\\\":[  \\n          {  \\n             \\\"ext\\\":{  \\n                \\\"brandsafe\\\":0\\n             },\\n             \\\"native\\\":{  \\n                \\\"request\\\":\\\"{\\\\\\\"ver\\\\\\\":\\\\\\\"1.1\\\\\\\",\\\\\\\"layout\\\\\\\":2,\\\\\\\"adunit\\\\\\\":4,\\\\\\\"assets\\\\\\\":[{\\\\\\\"id\\\\\\\":1,\\\\\\\"img\\\\\\\":{\\\\\\\"hmin\\\\\\\":80,\\\\\\\"type\\\\\\\":1,\\\\\\\"wmin\\\\\\\":80},\\\\\\\"required\\\\\\\":1},{\\\\\\\"id\\\\\\\":2,\\\\\\\"img\\\\\\\":{\\\\\\\"hmin\\\\\\\":627,\\\\\\\"type\\\\\\\":3,\\\\\\\"wmin\\\\\\\":1200},\\\\\\\"required\\\\\\\":1},{\\\\\\\"id\\\\\\\":3,\\\\\\\"title\\\\\\\":{\\\\\\\"len\\\\\\\":25},\\\\\\\"required\\\\\\\":1},{\\\\\\\"id\\\\\\\":4,\\\\\\\"data\\\\\\\":{\\\\\\\"len\\\\\\\":20,\\\\\\\"type\\\\\\\":12},\\\\\\\"required\\\\\\\":0},{\\\\\\\"id\\\\\\\":5,\\\\\\\"data\\\\\\\":{\\\\\\\"len\\\\\\\":25,\\\\\\\"type\\\\\\\":1},\\\\\\\"required\\\\\\\":0}],\\\\\\\"context\\\\\\\":3,\\\\\\\"plcmttype\\\\\\\":3}\\\",\\n                \\\"ver\\\":\\\"1.1\\\",\\n                \\\"battr\\\":[  \\n                   8,\\n                   10\\n                ]\\n             },\\n             \\\"displaymanager\\\":\\\"third_party_sdk\\\",\\n             \\\"displaymanagerver\\\":\\\"0\\\",\\n             \\\"bidfloor\\\":1.142857,\\n             \\\"bidfloorcur\\\":\\\"USD\\\",\\n             \\\"id\\\":\\\"1\\\",\\n             \\\"secure\\\":0,\\n             \\\"instl\\\":0\\n          }\\n       ],\\n    \\\"tmax\\\": 300,\\n    \\\"user\\\": {\\n        \\\"gender\\\": \\\"M\\\",\\n        \\\"id\\\": \\\"c6292267-56ad-4326-965d-deef6fcd5er9\\\",\\n        \\\"yob\\\": 1982\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"RTB 2.3 Native 1.1 Bid Request\"\n    }\n  ]\n}\n[/block]\nThe native ad JSON payload in the bid request is the following\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{    \\n  \\t\\\"ver\\\": \\\"1.1\\\",\\n    \\\"adunit\\\": 4,\\n    \\\"assets\\\": [\\n        {\\n            \\\"id\\\": 1,\\n            \\\"img\\\": {\\n                \\\"hmin\\\": 80,\\n                \\\"type\\\": 1,\\n                \\\"wmin\\\": 80\\n            },\\n            \\\"required\\\": 1\\n        },\\n        {\\n            \\\"id\\\": 2,\\n            \\\"img\\\": {\\n                \\\"hmin\\\": 627,\\n                \\\"type\\\": 3,\\n                \\\"wmin\\\": 1200\\n            },\\n            \\\"required\\\": 1\\n        },\\n        {\\n            \\\"id\\\": 3,\\n            \\\"title\\\": {\\n                \\\"len\\\": 25\\n            },\\n            \\\"required\\\": 1\\n        },\\n        {\\n            \\\"id\\\": 4,\\n            \\\"data\\\": {\\n                \\\"len\\\": 20,\\n                \\\"type\\\": 12\\n            },\\n            \\\"required\\\": 0\\n        },\\n        {\\n            \\\"id\\\": 5,\\n            \\\"data\\\": {\\n                \\\"len\\\": 25,\\n                \\\"type\\\": 1\\n            },\\n            \\\"required\\\": 0\\n        }\\n    ],\\n    \\\"context\\\": 3,\\n    \\\"layout\\\": 2,\\n    \\\"plcmttype\\\": 3\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Native 1.1 Bid Request Payload\"\n    }\n  ]\n}\n[/block]\nWe would then expect a valid RTB bid response with a native ad markup, similar to the following structure:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"bidid\\\": \\\"590E6EFF73B9875DB64651E847E19AE7\\\",\\n    \\\"cur\\\": \\\"USD\\\",\\n    \\\"id\\\": \\\"34D6BFD0C2FF398A79147280FBCCDB7B\\\",\\n    \\\"seatbid\\\": [\\n        {\\n            \\\"bid\\\": [\\n                {\\n                    \\\"id\\\": \\\"1\\\",\\n                    \\\"impid\\\": \\\"1\\\",\\n                    \\\"adid\\\": \\\"1118586585\\\",\\n                    \\\"price\\\": 9.99,\\n                    \\\"nurl\\\": \\\"http://tracking.yeahmobi.com/budget.php?auc_id=${AUCTION_ID}&bid_id=${AUCTION_BID_ID}&imp_id=${AUCTION_IMP_ID}&ad_id=${AUCTION_AD_ID}&price=${AUCTION_PRICE}&adx=mobfox&cr=0.000\\\",\\n                    \\\"adm\\\": \\\"{\\\\\\\"native\\\\\\\":{\\\\\\\"link\\\\\\\":{\\\\\\\"url\\\\\\\":\\\\\\\"http://mobfox.dev:50000/exchange.click.php?h=009830757c489d2cf7982155f3637fd6\\\\\\\"},\\\\\\\"assets\\\\\\\":[{\\\\\\\"id\\\\\\\":1,\\\\\\\"required\\\\\\\":0,\\\\\\\"type\\\\\\\":\\\\\\\"icon\\\\\\\",\\\\\\\"img\\\\\\\":{\\\\\\\"url\\\\\\\":\\\\\\\"http://cdn.admaxim.com/50_04014129782028373.png\\\\\\\",\\\\\\\"h\\\\\\\":128,\\\\\\\"w\\\\\\\":128}},{\\\\\\\"id\\\\\\\":2,\\\\\\\"required\\\\\\\":1,\\\\\\\"type\\\\\\\":\\\\\\\"main\\\\\\\",\\\\\\\"img\\\\\\\":{\\\\\\\"url\\\\\\\":\\\\\\\"http://cdn.admaxim.com/50_022759785729306437.png\\\\\\\",\\\\\\\"h\\\\\\\":627,\\\\\\\"w\\\\\\\":1200}},{\\\\\\\"id\\\\\\\":3,\\\\\\\"required\\\\\\\":1,\\\\\\\"type\\\\\\\":\\\\\\\"title\\\\\\\",\\\\\\\"title\\\\\\\":{\\\\\\\"text\\\\\\\":\\\\\\\"By Pratchett & Baxter\\\\\\\"}},{\\\\\\\"id\\\\\\\":4,\\\\\\\"required\\\\\\\":1,\\\\\\\"type\\\\\\\":\\\\\\\"desc\\\\\\\",\\\\\\\"data\\\\\\\":{\\\\\\\"value\\\\\\\":\\\\\\\"At last, the final book in The Long Earch series\\\\\\\"}},{\\\\\\\"id\\\\\\\":6,\\\\\\\"required\\\\\\\":0,\\\\\\\"type\\\\\\\":\\\\\\\"ctatext\\\\\\\",\\\\\\\"data\\\\\\\":{\\\\\\\"value\\\\\\\":\\\\\\\"READ IT NOW\\\\\\\"}},{\\\\\\\"id\\\\\\\":7,\\\\\\\"required\\\\\\\":0,\\\\\\\"type\\\\\\\":\\\\\\\"sponsored\\\\\\\",\\\\\\\"data\\\\\\\":{\\\\\\\"value\\\\\\\":\\\\\\\"Pratchett & Baxter\\\\\\\"}}],\\\\\\\"imptrackers\\\\\\\":[\\\\\\\"http://rtbstaging.admaxim.com/adtracker/track/track/imp?id=Z608Z61484Z-1Z18551_168282Z50Z0Z0ZZ1.0Z0.5Z0.0Z0.5ZatZviennaZviennaZ1100ZsamsungZandroid_4.4Zgt-i9505Za-0f1104a0-87dc-488b-822c-9905bd2b76a0Ziab1ZZagx4-gnx1Z0-0-Z-1Z1200x627Z227f3554f5a74061752f2cd90258c685ZZ1Z2ZZ18551Z-1Z2Z2ZZZ2Z1Z&ts=1475068457070&creative_id=61484:608&mobfoxBidPrice=0.204&auctionId=227F3554F5A74061752F2CD90258C685&ru=\\\\\\\",\\\\\\\"http://mobfox.dev:50000/exchange.pixel.php?h=009830757c489d2cf7982155f3637fd6\\\\\\\"]}}\\\",\\n                    \\\"adomain\\\": [\\n                        \\\"baxter.com\\\"\\n                    ],\\n                    \\\"bundle\\\": \\\"\\\",\\n                    \\\"iurl\\\": \\\"http://dogg2vbfv32xf.cloudfront.net/testad1.jpg\\\",\\n                    \\\"cid\\\": \\\"2356\\\",\\n                    \\\"crid\\\": \\\"1113335\\\",\\n                    \\\"h\\\": 50,\\n                    \\\"w\\\": 320,\\n                    \\\"ext\\\": {\\n                        \\\"adgroupid\\\": 2224,\\n                        \\\"userid\\\": 1238,\\n                        \\\"commissionrate\\\": 0\\n                    }\\n                }\\n            ]\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"RTB 2.3 Native Bid Response\"\n    }\n  ]\n}\n[/block]\nThe Native Ad JSON payload would look like the following: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n   \\\"native\\\": {\\n      \\\"link\\\": {\\n         \\\"url\\\": \\\"http://mobfox.dev:50000/exchange.click.php?h=009830757c489d2cf7982155f3637fd6\\\"\\n      },\\n      \\\"assets\\\": [\\n         {\\n            \\\"id\\\": 1,\\n            \\\"required\\\": 0,\\n            \\\"type\\\": \\\"icon\\\",\\n            \\\"img\\\": {\\n               \\\"url\\\": \\\"http://cdn.admaxim.com/50_04014129782028373.png\\\",\\n               \\\"h\\\": 128,\\n               \\\"w\\\": 128\\n            }\\n         },\\n         {\\n            \\\"id\\\": 2,\\n            \\\"required\\\": 1,\\n            \\\"type\\\": \\\"main\\\",\\n            \\\"img\\\": {\\n               \\\"url\\\": \\\"http://cdn.admaxim.com/50_022759785729306437.png\\\",\\n               \\\"h\\\": 627,\\n               \\\"w\\\": 1200\\n            }\\n         },\\n         {\\n            \\\"id\\\": 3,\\n            \\\"required\\\": 1,\\n            \\\"type\\\": \\\"title\\\",\\n            \\\"title\\\": {\\n               \\\"text\\\": \\\"By Pratchett & Baxter\\\"\\n            }\\n         },\\n         {\\n            \\\"id\\\": 4,\\n            \\\"required\\\": 1,\\n            \\\"type\\\": \\\"desc\\\",\\n            \\\"data\\\": {\\n               \\\"value\\\": \\\"At last, the final book in The Long Earch series\\\"\\n            }\\n         },\\n         {\\n            \\\"id\\\": 6,\\n            \\\"required\\\": 0,\\n            \\\"type\\\": \\\"ctatext\\\",\\n            \\\"data\\\": {\\n               \\\"value\\\": \\\"READ IT NOW\\\"\\n            }\\n         },\\n         {\\n            \\\"id\\\": 7,\\n            \\\"required\\\": 0,\\n            \\\"type\\\": \\\"sponsored\\\",\\n            \\\"data\\\": {\\n               \\\"value\\\": \\\"Pratchett & Baxter\\\"\\n            }\\n         }\\n      ],\\n      \\\"imptrackers\\\": [\\n         \\\"http://rtbstaging.admaxim.com/adtracker/track/track/imp?id=Z608Z61484Z-1Z18551_168282Z50Z0Z0ZZ1.0Z0.5Z0.0Z0.5ZatZviennaZviennaZ1100ZsamsungZandroid_4.4Zgt-i9505Za-0f1104a0-87dc-488b-822c-9905bd2b76a0Ziab1ZZagx4-gnx1Z0-0-Z-1Z1200x627Z227f3554f5a74061752f2cd90258c685ZZ1Z2ZZ18551Z-1Z2Z2ZZZ2Z1Z&ts=1475068457070&creative_id=61484:608&mobfoxBidPrice=0.204&auctionId=227F3554F5A74061752F2CD90258C685&ru=\\\",\\n         \\\"http://mobfox.dev:50000/exchange.pixel.php?h=009830757c489d2cf7982155f3637fd6\\\"\\n      ]\\n   }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Native Bid Response Payload\"\n    }\n  ]\n}\n[/block]\nWe proceed to validate your bid response checking for the following items:\n1. HTTP status must be **200 OK**\n2. The RTB JSON response must be **parseable**\n3. The RTB bid response must have a **bid section, a price and the ad markup** itself\n\nWe then check the native ad specifics:\n4. We check the native ad version. If we request 1.1 we accept 1.1 OR 1.0, but if we request 1.0 we can only accept 1.0\n5. All required assets **required : 1** must be present in the response payload and their **id fields must match**\n6. The title asset's length **must not exceed the max length** specified in the request\n7. Some data assets might specify a **len** value. All data assets must not exceed that max length value if it has been specified.\n7. All image assets, be it of the type **icon** or **main**, must have an url value.\n8. All image assets must send resources that are at least as large as the requested **hmin** or **wmin**","excerpt":"","slug":"native-ad-details","type":"basic","title":"Native Ad Details"}
The MobFox Native Ad-Request API can be used to request native ads from the MobFox Publisher Platform. By default, the Native Ad API returns the requested **RTB Native Ad Assets** in an easy to use JSON format. You can then parse the JSON and render the ad as you wish. Bellow we will give a sample **RTB 2.3 native bid request**. Note that the payload found at **imp.native.request** is a JSON encoded payload which conforms with the [Native ad 1.1 specifications](http://www.iab.com/wp-content/uploads/2016/03/OpenRTB-Native-Ads-Specification-1-1_2016.pdf). [block:code] { "codes": [ { "code": "{\n \"app\": {\n \"bundle\": \"393760245\",\n \"cat\": [\n \"IAB19\"\n ],\n \"domain\": \"https://itunes.apple.com/gb/app/bwin-sports/id393760245?mt=8\",\n \"id\": \"57949\",\n \"name\": \"Bwin betting app\",\n \"publisher\": {\n \"id\": \"14566\"\n },\n \"storeurl\": \"https://itunes.apple.com/gb/app/bwin-sports/id393760245?mt=8\"\n },\n \"at\": 2,\n \"bcat\": [\n \"IAB26\",\n \"IAB25\",\n \"IAB24\"\n ],\n \"cur\": [\n \"USD\"\n ],\n \"device\": {\n \"connectiontype\": 2,\n \"devicetype\": 4,\n \"dnt\": 0,\n \"dpidmd5\": \"2D20AF98F011570F75A9606D41D9B300\",\n \"dpidsha1\": \"7EBF6FABAB3B9CACC5BC087F8EAE55D84586705E\",\n \"geo\": {\n \"country\": \"AUT\",\n \"lat\": 48.12,\n \"lon\": 16.12,\n \"type\": 1\n },\n \"ifa\": \"1976F519-26D0-4428-9891-3133253A453F\",\n \"ip\": \"212.232.28.94\",\n \"js\": 1,\n \"make\": \"Apple\",\n \"model\": \"iPhone\",\n \"os\": \"iOS\",\n \"osv\": \"8.0\",\n \"ua\": \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4\"\n },\n \"ext\": {\n \"udi\": {\n \"idfa\": \"1976F519-26D0-4428-9891-3133253A453F\"\n }\n },\n \"id\": \"6072C8C97CB1D80C3D5B466CB3DA8025\",\n \"imp\":[ \n { \n \"ext\":{ \n \"brandsafe\":0\n },\n \"native\":{ \n \"request\":\"{\\\"ver\\\":\\\"1.1\\\",\\\"layout\\\":2,\\\"adunit\\\":4,\\\"assets\\\":[{\\\"id\\\":1,\\\"img\\\":{\\\"hmin\\\":80,\\\"type\\\":1,\\\"wmin\\\":80},\\\"required\\\":1},{\\\"id\\\":2,\\\"img\\\":{\\\"hmin\\\":627,\\\"type\\\":3,\\\"wmin\\\":1200},\\\"required\\\":1},{\\\"id\\\":3,\\\"title\\\":{\\\"len\\\":25},\\\"required\\\":1},{\\\"id\\\":4,\\\"data\\\":{\\\"len\\\":20,\\\"type\\\":12},\\\"required\\\":0},{\\\"id\\\":5,\\\"data\\\":{\\\"len\\\":25,\\\"type\\\":1},\\\"required\\\":0}],\\\"context\\\":3,\\\"plcmttype\\\":3}\",\n \"ver\":\"1.1\",\n \"battr\":[ \n 8,\n 10\n ]\n },\n \"displaymanager\":\"third_party_sdk\",\n \"displaymanagerver\":\"0\",\n \"bidfloor\":1.142857,\n \"bidfloorcur\":\"USD\",\n \"id\":\"1\",\n \"secure\":0,\n \"instl\":0\n }\n ],\n \"tmax\": 300,\n \"user\": {\n \"gender\": \"M\",\n \"id\": \"c6292267-56ad-4326-965d-deef6fcd5er9\",\n \"yob\": 1982\n }\n}", "language": "json", "name": "RTB 2.3 Native 1.1 Bid Request" } ] } [/block] The native ad JSON payload in the bid request is the following [block:code] { "codes": [ { "code": "{ \n \t\"ver\": \"1.1\",\n \"adunit\": 4,\n \"assets\": [\n {\n \"id\": 1,\n \"img\": {\n \"hmin\": 80,\n \"type\": 1,\n \"wmin\": 80\n },\n \"required\": 1\n },\n {\n \"id\": 2,\n \"img\": {\n \"hmin\": 627,\n \"type\": 3,\n \"wmin\": 1200\n },\n \"required\": 1\n },\n {\n \"id\": 3,\n \"title\": {\n \"len\": 25\n },\n \"required\": 1\n },\n {\n \"id\": 4,\n \"data\": {\n \"len\": 20,\n \"type\": 12\n },\n \"required\": 0\n },\n {\n \"id\": 5,\n \"data\": {\n \"len\": 25,\n \"type\": 1\n },\n \"required\": 0\n }\n ],\n \"context\": 3,\n \"layout\": 2,\n \"plcmttype\": 3\n}", "language": "json", "name": "Native 1.1 Bid Request Payload" } ] } [/block] We would then expect a valid RTB bid response with a native ad markup, similar to the following structure: [block:code] { "codes": [ { "code": "{\n \"bidid\": \"590E6EFF73B9875DB64651E847E19AE7\",\n \"cur\": \"USD\",\n \"id\": \"34D6BFD0C2FF398A79147280FBCCDB7B\",\n \"seatbid\": [\n {\n \"bid\": [\n {\n \"id\": \"1\",\n \"impid\": \"1\",\n \"adid\": \"1118586585\",\n \"price\": 9.99,\n \"nurl\": \"http://tracking.yeahmobi.com/budget.php?auc_id=${AUCTION_ID}&bid_id=${AUCTION_BID_ID}&imp_id=${AUCTION_IMP_ID}&ad_id=${AUCTION_AD_ID}&price=${AUCTION_PRICE}&adx=mobfox&cr=0.000\",\n \"adm\": \"{\\\"native\\\":{\\\"link\\\":{\\\"url\\\":\\\"http://mobfox.dev:50000/exchange.click.php?h=009830757c489d2cf7982155f3637fd6\\\"},\\\"assets\\\":[{\\\"id\\\":1,\\\"required\\\":0,\\\"type\\\":\\\"icon\\\",\\\"img\\\":{\\\"url\\\":\\\"http://cdn.admaxim.com/50_04014129782028373.png\\\",\\\"h\\\":128,\\\"w\\\":128}},{\\\"id\\\":2,\\\"required\\\":1,\\\"type\\\":\\\"main\\\",\\\"img\\\":{\\\"url\\\":\\\"http://cdn.admaxim.com/50_022759785729306437.png\\\",\\\"h\\\":627,\\\"w\\\":1200}},{\\\"id\\\":3,\\\"required\\\":1,\\\"type\\\":\\\"title\\\",\\\"title\\\":{\\\"text\\\":\\\"By Pratchett & Baxter\\\"}},{\\\"id\\\":4,\\\"required\\\":1,\\\"type\\\":\\\"desc\\\",\\\"data\\\":{\\\"value\\\":\\\"At last, the final book in The Long Earch series\\\"}},{\\\"id\\\":6,\\\"required\\\":0,\\\"type\\\":\\\"ctatext\\\",\\\"data\\\":{\\\"value\\\":\\\"READ IT NOW\\\"}},{\\\"id\\\":7,\\\"required\\\":0,\\\"type\\\":\\\"sponsored\\\",\\\"data\\\":{\\\"value\\\":\\\"Pratchett & Baxter\\\"}}],\\\"imptrackers\\\":[\\\"http://rtbstaging.admaxim.com/adtracker/track/track/imp?id=Z608Z61484Z-1Z18551_168282Z50Z0Z0ZZ1.0Z0.5Z0.0Z0.5ZatZviennaZviennaZ1100ZsamsungZandroid_4.4Zgt-i9505Za-0f1104a0-87dc-488b-822c-9905bd2b76a0Ziab1ZZagx4-gnx1Z0-0-Z-1Z1200x627Z227f3554f5a74061752f2cd90258c685ZZ1Z2ZZ18551Z-1Z2Z2ZZZ2Z1Z&ts=1475068457070&creative_id=61484:608&mobfoxBidPrice=0.204&auctionId=227F3554F5A74061752F2CD90258C685&ru=\\\",\\\"http://mobfox.dev:50000/exchange.pixel.php?h=009830757c489d2cf7982155f3637fd6\\\"]}}\",\n \"adomain\": [\n \"baxter.com\"\n ],\n \"bundle\": \"\",\n \"iurl\": \"http://dogg2vbfv32xf.cloudfront.net/testad1.jpg\",\n \"cid\": \"2356\",\n \"crid\": \"1113335\",\n \"h\": 50,\n \"w\": 320,\n \"ext\": {\n \"adgroupid\": 2224,\n \"userid\": 1238,\n \"commissionrate\": 0\n }\n }\n ]\n }\n ]\n}", "language": "json", "name": "RTB 2.3 Native Bid Response" } ] } [/block] The Native Ad JSON payload would look like the following: [block:code] { "codes": [ { "code": "{\n   \"native\": {\n      \"link\": {\n         \"url\": \"http://mobfox.dev:50000/exchange.click.php?h=009830757c489d2cf7982155f3637fd6\"\n      },\n      \"assets\": [\n         {\n            \"id\": 1,\n            \"required\": 0,\n            \"type\": \"icon\",\n            \"img\": {\n               \"url\": \"http://cdn.admaxim.com/50_04014129782028373.png\",\n               \"h\": 128,\n               \"w\": 128\n            }\n         },\n         {\n            \"id\": 2,\n            \"required\": 1,\n            \"type\": \"main\",\n            \"img\": {\n               \"url\": \"http://cdn.admaxim.com/50_022759785729306437.png\",\n               \"h\": 627,\n               \"w\": 1200\n            }\n         },\n         {\n            \"id\": 3,\n            \"required\": 1,\n            \"type\": \"title\",\n            \"title\": {\n               \"text\": \"By Pratchett & Baxter\"\n            }\n         },\n         {\n            \"id\": 4,\n            \"required\": 1,\n            \"type\": \"desc\",\n            \"data\": {\n               \"value\": \"At last, the final book in The Long Earch series\"\n            }\n         },\n         {\n            \"id\": 6,\n            \"required\": 0,\n            \"type\": \"ctatext\",\n            \"data\": {\n               \"value\": \"READ IT NOW\"\n            }\n         },\n         {\n            \"id\": 7,\n            \"required\": 0,\n            \"type\": \"sponsored\",\n            \"data\": {\n               \"value\": \"Pratchett & Baxter\"\n            }\n         }\n      ],\n      \"imptrackers\": [\n         \"http://rtbstaging.admaxim.com/adtracker/track/track/imp?id=Z608Z61484Z-1Z18551_168282Z50Z0Z0ZZ1.0Z0.5Z0.0Z0.5ZatZviennaZviennaZ1100ZsamsungZandroid_4.4Zgt-i9505Za-0f1104a0-87dc-488b-822c-9905bd2b76a0Ziab1ZZagx4-gnx1Z0-0-Z-1Z1200x627Z227f3554f5a74061752f2cd90258c685ZZ1Z2ZZ18551Z-1Z2Z2ZZZ2Z1Z&ts=1475068457070&creative_id=61484:608&mobfoxBidPrice=0.204&auctionId=227F3554F5A74061752F2CD90258C685&ru=\",\n         \"http://mobfox.dev:50000/exchange.pixel.php?h=009830757c489d2cf7982155f3637fd6\"\n      ]\n   }\n}", "language": "json", "name": "Native Bid Response Payload" } ] } [/block] We proceed to validate your bid response checking for the following items: 1. HTTP status must be **200 OK** 2. The RTB JSON response must be **parseable** 3. The RTB bid response must have a **bid section, a price and the ad markup** itself We then check the native ad specifics: 4. We check the native ad version. If we request 1.1 we accept 1.1 OR 1.0, but if we request 1.0 we can only accept 1.0 5. All required assets **required : 1** must be present in the response payload and their **id fields must match** 6. The title asset's length **must not exceed the max length** specified in the request 7. Some data assets might specify a **len** value. All data assets must not exceed that max length value if it has been specified. 7. All image assets, be it of the type **icon** or **main**, must have an url value. 8. All image assets must send resources that are at least as large as the requested **hmin** or **wmin**