{"_id":"564ddbcbd3320b0d0028ca25","parentDoc":null,"project":"564621e00c30fb2100ba3814","__v":8,"user":"56499dade2efd717002afc83","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"},"category":{"_id":"564dcf87d3320b0d0028ca10","version":"564621e10c30fb2100ba3817","__v":26,"pages":["564dcfb4d3320b0d0028ca11","564dd25da8671617004e7b71","564dd3a7e39c4435005a1f33","564ddbcbd3320b0d0028ca25","564ddcb2a8671617004e7b8e","564ddfffa8671617004e7b94","564de165a8671617004e7b97","564de17d9176e9170068007b","564de194e39c4435005a1f56","564de3d99176e9170068007e","564de439fe07a81700b5c3af","564ef3911e9a082b00344ea1","564f03dfedbade0d000efa57","564f0978234efc0d006e186e","564f0d9aaf8ae235002db90e","564f133e4f000617007bd68e","564f14d829338a1700beefcd","564f15619eb2701700532470","564f2fec6b10960d00865761","564f302b6b10960d00865764","564f33e219857f2b00387a44","564f35d110b21d3500ad29d3","564f42e41af2c835004bfbe9","564f456ab85ee335004cbdb3","5652e161b83d8e0d00d24b6b","56859949cfc7cf0d001cb3f5"],"project":"564621e00c30fb2100ba3814","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-11-19T13:32:55.176Z","from_sync":false,"order":6,"slug":"api-overview","title":"Ad Request API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-19T14:25:15.844Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"[block:api-header]\n{\n  \"title\": \"HTTP Header (CPM value)\"\n}\n[/block]\nYou will find the CPM of any ad you receive from Mobfox in the HTTP header. See below.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Connection: keep-alive\\nContent-Type: text/xml;charset=utf-8\\nDate: Thu, 09 Nov 2017 21:57:10 GMT\\nServer: nginx/1.4.6 (Ubuntu)\\nTransfer-Encoding: chunked\\nX-Powered-By: HHVM/3.9.1\\nX-Pricing-CPM: 1.235\",\n      \"language\": \"http\",\n      \"name\": \"Response HEADER\"\n    }\n  ]\n}\n[/block]\nIn this case the ad is worth **$1.235 CPM**.\n[block:api-header]\n{\n  \"title\": \"Ad Metadata\"\n}\n[/block]\nSome of our ad types return you additional meta data about the ad you just received.\n\nSee below how these look like.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<request type=\\\"textAd\\\">\\n  \\n  <!-- PLACEHOLDER FOR BANNER AD -->\\n  \\n\\t<cpmPrice>1.235</cpmPrice>\\n\\t\\n  <demandPartner>\\n\\t\\t<id>6</id>\\n\\t\\t<name><![CDATA[myDSP]]></name>\\n\\t</demandPartner>\\n  \\n\\t<adMetadata>\\n\\t\\t<dspId><![CDATA[513]]></dspId>\\n\\t\\t<inventoryId><![CDATA[234218]]></inventoryId>\\n    <campaignId><![CDATA[3950437]]></campaignId>\\n    <creativeId><![CDATA[808753]]></creativeId>\\n\\t</adMetadata>\\n  \\n</request>\",\n      \"language\": \"xml\",\n      \"name\": \"Banner Ads (XML)\"\n    },\n    {\n      \"code\": \"{\\n  \\\"request\\\": {\\n    \\n\\t\\t<!-- PLACEHOLDER FOR BANNER AD -->\\n    \\n    \\\"cpmPrice\\\": 1.235,\\n    \\n    \\\"demandPartner\\\": {\\n      \\\"id\\\": \\\"6\\\",\\n      \\\"name\\\": \\\"myDSP\\\"\\n    },\\n  \\n    \\\"adMetadata\\\": {\\n      \\\"dspId\\\": 513,\\n      \\\"inventoryId\\\": \\\"234218\\\",\\n      \\\"campaignId\\\": \\\"3950437\\\",\\n      \\\"creativeId\\\": \\\"808753\\\"\\n    }\\n  \\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Banner Ads (JSON)\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Only available for ad requests from Mobfox SDK\",\n  \"body\": \"If you are using our [Mobfox SDK](doc:integrate-as-a-publisher) you will receive these additional infos. Otherwise these infos will not be served.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Ad Types\"\n}\n[/block]\nMobfox offers [banner](doc:banners), [video](doc:request-videos) and [native](doc:request-native-ads-iab) ad responses.\n\nPlease click on the links above to arrive on the documentation for each of them.","excerpt":"","slug":"response-format","type":"basic","title":"Response Format"}
[block:api-header] { "title": "HTTP Header (CPM value)" } [/block] You will find the CPM of any ad you receive from Mobfox in the HTTP header. See below. [block:code] { "codes": [ { "code": "Connection: keep-alive\nContent-Type: text/xml;charset=utf-8\nDate: Thu, 09 Nov 2017 21:57:10 GMT\nServer: nginx/1.4.6 (Ubuntu)\nTransfer-Encoding: chunked\nX-Powered-By: HHVM/3.9.1\nX-Pricing-CPM: 1.235", "language": "http", "name": "Response HEADER" } ] } [/block] In this case the ad is worth **$1.235 CPM**. [block:api-header] { "title": "Ad Metadata" } [/block] Some of our ad types return you additional meta data about the ad you just received. See below how these look like. [block:code] { "codes": [ { "code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<request type=\"textAd\">\n \n <!-- PLACEHOLDER FOR BANNER AD -->\n \n\t<cpmPrice>1.235</cpmPrice>\n\t\n <demandPartner>\n\t\t<id>6</id>\n\t\t<name><![CDATA[myDSP]]></name>\n\t</demandPartner>\n \n\t<adMetadata>\n\t\t<dspId><![CDATA[513]]></dspId>\n\t\t<inventoryId><![CDATA[234218]]></inventoryId>\n <campaignId><![CDATA[3950437]]></campaignId>\n <creativeId><![CDATA[808753]]></creativeId>\n\t</adMetadata>\n \n</request>", "language": "xml", "name": "Banner Ads (XML)" }, { "code": "{\n \"request\": {\n \n\t\t<!-- PLACEHOLDER FOR BANNER AD -->\n \n \"cpmPrice\": 1.235,\n \n \"demandPartner\": {\n \"id\": \"6\",\n \"name\": \"myDSP\"\n },\n \n \"adMetadata\": {\n \"dspId\": 513,\n \"inventoryId\": \"234218\",\n \"campaignId\": \"3950437\",\n \"creativeId\": \"808753\"\n }\n \n }\n}", "language": "json", "name": "Banner Ads (JSON)" } ] } [/block] [block:callout] { "type": "warning", "title": "Only available for ad requests from Mobfox SDK", "body": "If you are using our [Mobfox SDK](doc:integrate-as-a-publisher) you will receive these additional infos. Otherwise these infos will not be served." } [/block] [block:api-header] { "title": "Ad Types" } [/block] Mobfox offers [banner](doc:banners), [video](doc:request-videos) and [native](doc:request-native-ads-iab) ad responses. Please click on the links above to arrive on the documentation for each of them.