{"_id":"564773af36961e0d005c6273","project":"564621e00c30fb2100ba3814","user":"564621d275c83f0d00e9d52d","editedParams2":true,"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"},"editedParams":true,"parentDoc":null,"__v":5,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-14T17:47:27.281Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","results":{"codes":[{"status":200,"name":"MRAID","language":"html","code":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<request type=\"textAd\">\n   <htmlString><![CDATA[<iframe src=\"http://adserv01.gadmobe.com/ad_tag/ad_tag_f.php?ad_space_id=12-21238&campaign_id=731&device_id=&src=http%3A%2F%2Fsrv1.letitbeit.com%2Ftags%2F%3Ftid%3D138%26hash%3Dh2lvee%26width%3D320%26height%3D50%26carrier%3D%26placement_id%3D12005939614%26pub_domain%3D12005939614\" width=\"320\" height=\"50\" border=\"0\" scrolling=\"no\" ></iframe><img style=\"position:absolute; left: -10000px;\" width=\"1\" height=\"1\" src=\"http://my.mobfox.com/exchange.pixel.php?h=d03f88385343fb931a1bd38874127ed0\"/><script type=\"text/javascript\">document.write('<img style=\"position:absolute; left: -10000px;\" width=\"1\" height=\"1\" src=\"http://my.mobfox.com/exchange.pixel.php?h=d03f88385343fb931a1bd38874127ed0&test=1\"/>');</script>]]></htmlString>\n   <clicktype>safari</clicktype>\n   <clickurl><![CDATA[http://my.mobfox.com/exchange.click.php?h=d03f88385343fb931a1bd38874127ed0]]></clickurl>\n   <urltype>link</urltype>\n   <refresh>30</refresh>\n   <scale>no</scale>\n   <skippreflight>yes</skippreflight>\n   <demandPartner>\n     <id>6</id>\n     <name><![CDATA[MobFox DSP]]></name>\n  </demandPartner>\n</request>"},{"language":"xml","status":200,"name":"Error","code":"<!-- We respond with 200 OK and add an error xml element to our response if something went wrong -->\n<error>Invalid inventory hash supplied. (argument \"s\")</error>"}]},"settings":"","examples":{"codes":[{"language":"curl","name":"Complete MRAID Request","code":"curl \"http://my.mobfox.com/request.php?rt=api&r_type=banner&i=69.197.148.18&s=9d38e9038e217f927beb6e560d96fd45&adspace_width=320&adspace_height=50&adspace_strict=0&c_mraid=1&o_iosadvid=1976F519-26D0-4428-9891-3133253A453F\t&r_floor=0.8&longitude=12.12&latitude=280.12&demo_gender=male&demo_age=1982&demo_keywords=sports&u=Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%208_0%20like%20Mac%20OS%20X)%20AppleWebKit%2F600.1.3%20(KHTML%2C%20like%20Gecko)%20Version%2F8.0%20Mobile%2F12A4345d%20Safari%2F600.1.4&r_resp=xml\"\n\n# Replace the value of s= with your own inventory hash once you are ready for live ads"}]},"auth":"required","params":[{"_id":"56473ab856fb450d0041012d","ref":"","in":"query","required":true,"desc":"Requester type. Our SDKs will populate this parameter with their SDK version numbers.","default":"api","type":"string","name":"rt"},{"_id":"56473ab856fb450d0041012c","ref":"","in":"query","required":true,"desc":"Requested ad type. Allowed values: banner, video, native","default":"banner","type":"string","name":"r_type"},{"_id":"56473f2c054d8f0d00bc776f","ref":"","in":"query","required":true,"desc":"The hash of your inventory to identify which app is making the request.","default":"9d38e9038e217f927beb6e560d96fd45","type":"string","name":"s"},{"_id":"56473ee7c7687d0d00739fa0","ref":"","in":"query","required":true,"desc":"Set IP address of the device making the request. API will first check for the X-Forwarded-For header before it falls back to this parameter.","default":"69.197.148.18","type":"string","name":"i"},{"_id":"56473f2c054d8f0d00bc776e","ref":"","in":"query","required":true,"desc":"Url encoded user agent string.","default":"","type":"string","name":"u"},{"_id":"5647729ac7687d0d00739fb6","ref":"","in":"query","required":true,"desc":"Specify what version of mraid is supported. Value **1** indicates that you want and can support MRAID 1.0, and value **2** indicates the support for MRAID 2.0","default":"1","type":"int","name":"c_mraid"},{"_id":"5647729ac7687d0d00739fb9","ref":"","in":"query","required":false,"desc":"Width of your ad space.","default":"320","type":"int","name":"adspace_width"},{"_id":"5647729ac7687d0d00739fb8","ref":"","in":"query","required":false,"desc":"Height of your ad space.","default":"50","type":"int","name":"adspace_height"},{"_id":"58a3996a9230160f00910559","ref":"","in":"query","required":false,"desc":"Define, which response format to receive, **xml** or **json**. The default is **xml** for legacy reasons.","default":"xml","type":"string","name":"r_resp"}],"url":"/request.php?rt=api&r_type=banner&c_mraid=1"},"isReference":false,"order":7,"body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Your App Needs To Load mraid.js\",\n  \"body\": \"In order to render/display MRAID ads you need to support MRAID as defined by the IAB. This means you need to embed the **mraid.js** file into you project and integrate it with your app.\\n\\nNote that MRAID 2.0 is backwards compatible with MRAID 1.0.\\n\\n[Read the IAB MRAID specs](http://www.iab.com/guidelines/mobile-rich-media-ad-interface-definitions-mraid).\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"We recommend passing these parameters on all of your ad requests to get the best eCPM:\\n* o_andadvid\\n* o_iosadvid\\n* latitude\\n* longitude\\n* r_floor\\n* demo_age\\n* demo_gender\\n* c_mraid\\n* adspace_width/adspace_height\\n\\nThese params are documented on our [Global Request Parameters](doc:global-request-parameters) page.\",\n  \"title\": \"Augment your ad request with global ad request parameters\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%208_0%20like%20Mac%20OS%20X)%20AppleWebKit%2F600.1.3%20(KHTML%2C%20like%20Gecko)%20Version%2F8.0%20Mobile%2F12A4345d%20Safari%2F600.1.4\",\n      \"language\": \"text\",\n      \"name\": \"User Agent for testing\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"request-mraid-banners","type":"endpoint","title":"Request MRAID Banners"}

getRequest MRAID Banners


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

rt:
required
stringapi
Requester type. Our SDKs will populate this parameter with their SDK version numbers.
r_type:
required
stringbanner
Requested ad type. Allowed values: banner, video, native
s:
required
string9d38e9038e217f927beb6e560d96fd45
The hash of your inventory to identify which app is making the request.
i:
required
string69.197.148.18
Set IP address of the device making the request. API will first check for the X-Forwarded-For header before it falls back to this parameter.
u:
required
string
Url encoded user agent string.
c_mraid:
required
integer1
Specify what version of mraid is supported. Value **1** indicates that you want and can support MRAID 1.0, and value **2** indicates the support for MRAID 2.0
adspace_width:
integer320
Width of your ad space.
adspace_height:
integer50
Height of your ad space.
r_resp:
stringxml
Define, which response format to receive, **xml** or **json**. The default is **xml** for legacy reasons.

Examples


Result Format


Documentation

[block:callout] { "type": "danger", "title": "Your App Needs To Load mraid.js", "body": "In order to render/display MRAID ads you need to support MRAID as defined by the IAB. This means you need to embed the **mraid.js** file into you project and integrate it with your app.\n\nNote that MRAID 2.0 is backwards compatible with MRAID 1.0.\n\n[Read the IAB MRAID specs](http://www.iab.com/guidelines/mobile-rich-media-ad-interface-definitions-mraid)." } [/block] [block:callout] { "type": "info", "body": "We recommend passing these parameters on all of your ad requests to get the best eCPM:\n* o_andadvid\n* o_iosadvid\n* latitude\n* longitude\n* r_floor\n* demo_age\n* demo_gender\n* c_mraid\n* adspace_width/adspace_height\n\nThese params are documented on our [Global Request Parameters](doc:global-request-parameters) page.", "title": "Augment your ad request with global ad request parameters" } [/block] [block:code] { "codes": [ { "code": "Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%208_0%20like%20Mac%20OS%20X)%20AppleWebKit%2F600.1.3%20(KHTML%2C%20like%20Gecko)%20Version%2F8.0%20Mobile%2F12A4345d%20Safari%2F600.1.4", "language": "text", "name": "User Agent for testing" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}