S2S Ad request API
S2S Ad request API
*Ad serving*
1. Mobile Ad Delivery
This application provides an interface for the publisher as well as mediator network to communicate with our ad delivery server to serve an ad.
The ad can be requested by calling a specific Uniform Resource Locator (URL) with a query string of certain parameters. The ad server will respond through JavaScript by default. It also supports other formats that are described as follows:
GET: http://mobile.incrementxserv.com/vzssmob
Request Parameters
The mobile ad call accepts the parameters in the base URL as a query string as described in the following table:
Parameters | Is Required | Description |
id | Yes |
Represents the publication ID associated with the ads unit. |
ip | Yes | Represent the IP address. |
appid | No (but strongly recommended) |
Represents the unique ID to identify mobile app running on Android or iOS device. |
ua | Yes |
Represents the user agent string associated with the device requesting an ad. If user agent value is specified then that value will be used rather than the standard user agent sent through HTTP header. This value should be URL encoded. |
aaid | Yes in case of iOS |
Represents the Apple advertising identifier running on iOS device 6+. |
gaid | No |
Represents the Google advertising identifier. |
aid | No | Represents the unique Android ID. |
format | No |
Represents the default JavaScript format. Following are the supported formats: |
0 JavaScript | ||
1 JSON | ||
2 HTML | ||
3 XML | ||
carrier | No |
Represents the name of the mobile carrier. This parameter is optional because our system can usually deduce the carrier from the device’s IP address. |
connection | No |
Represents the type of network used by the device. Allowed values are “wifi” and “wan”. |
devmake | No |
Represents the manufacturer of the device requesting an ad. |
devmodel | No | Represents the device model used. |
os | No | Represents the Operating System used. |
devtz | No | Represents the device time zone used. |
loc | No |
Represents the user location expressed in longitude and latitude and up to 13 decimal places of precision are allowed. The format used is: snnn.ddddddddddddd,snnn.ddddddddddddd. |
mcc | No |
Represents the mobile country code as specified by the International Telecommunication Union (ITU). |
mnc | No |
Represents the mobile network code as specified by the ITU. |
bidfloor | No | Represents the minimum bid value. |
pcode | No |
Represents the postal code of the user requesting an ad. |
Response Format
Example:
1. Response in JSON:
{
“status”:”ok”,“content”:”<script type=”text/javascript”>document.write(‘<a href=”www.abcd.com”><img width=”300″ height=”50″
src=”www.abcd.com/icon.gif” style=”border-style: none”/></a>’); </script>”
}
2. Response in JavaScript:
document.write(
‘<a href=”www.abcd.com”><img width=”320″ height=”50″ style=”border-style: none” src=”www.abcd.com/icon.gif”/></a>’);
3. Response in HTML:
<a href=”www.abcd.com”> <img src=”www.abcd.com/icon.gif”/> </a>
4. Response in XML:
<response><status>success</status>
<ads>
<a href=”www.abcd.com”> <img src=”www.abcd.com/icon.gif”/>
</a>
</ads>
</response>
Example:
1. Request an ad
GET:
http://mobile.incrementxserv.com/vzssmob?id=VZE395978V0E2H0G&ip=123.252.135.130&appid=com.ip.sdk.AdRequest&ua=Dalvik%2F2.1.0%20(Linux%3B%20U%3B%20Android%206.0.1%3B%20MotoG3%20Build%2FMPI24.107-55)&gaid=9d052281-8b9a-4d2f-a343-8c3ad869679e&aid=48644A5EB4F7E59FEF5AE0BC47AF6D&format=html&carrier=Vodafone%20IN&connection=wan&devmake=motorola&devmodel=MotoG3&os=6.0.1&devtz=GMT%2B05%3A30&loc=19.1727767%2C72.9415812&mcc=&mnc=&pcode=400080&bidfloor=0.01
2. Response
<a href=”www.abcd.com”> <img src=”www.abcd.com/icon.gif”/> </a>