Documente Academic
Documente Profesional
Documente Cultură
inneractive
Server to Server
Integration Protocol
Technical Definitions
Rami Citrom (Rami@inner-active.com)
8/11/2010
Version 1.5.2
Server -2-Server Integration Protocol Definitions – partner guide and technical specifications.
2 inneractive Connected Applications Integration Protocol
Contents
1 Table of changes ................................................................................................................................... 3
2 General Description .............................................................................................................................. 4
2.1 Overview ....................................................................................................................................... 4
2.2 Intended usage ............................................................................................................................. 4
2.3 Ad definition.................................................................................................................................. 4
3 Making a Request.................................................................................................................................. 5
3.1 Sample Requests ........................................................................................................................... 6
3.1.1 Client side request: ............................................................................................................... 6
3.2 Required Information.................................................................................................................... 7
3.3 Required Information – Server to Server Requests (requestAd, requestHtmlAd) ....................... 7
3.4 Optional Information .................................................................................................................... 8
3.5 Headers ....................................................................................................................................... 10
4 Response ............................................................................................................................................. 11
4.1 XML Response ............................................................................................................................. 11
4.2 HTML Response........................................................................................................................... 11
5 Appendix A: XML Response Schema ................................................................................................... 12
6 Appendix B: Sample Responses .......................................................................................................... 13
XML Response ................................................................................................................................. 13
6.1 ......................................................................................................................................................... 13
6.2 HTML Response........................................................................................................................... 13
7 Appendix C: Important Headers ......................................................................................................... 14
1 Table of changes
Version 1.5
o Added table of different servlet targets
o Updated protocol version string
o Introduced HTML format responses
o Cleared up required fields for client side requests
Version 1.5.1
o Cleared some inconsistencies
o Introduced support of distribution channels
Version 1.5.2
o Moved distribution channel parameter to mandatory parameters.
o Added allowed values for Gender parameter
o Added documentation of W/H parameters
o Clarified the role of the Client Id value
2 General Description
2.1 Overview
This document describes the protocol for partners to connect to the inneractive system, retrieving
optimized ads for mobile devices.
The protocol is based on simple http requests – either GET or POST methods are supported, with
response in XML format.
This protocol enables application publishers to monetize their applications without embedding one of
the available inneractive SDKs.
This protocol is intended for real time ad presentation, so batch retrieval is not supported – for each ad
presentation, a separate request must be made, supplying all required information. The life time of ads
delivered by this protocol is measured in minutes, and should not exceed 30 minutes. If an application is
open for longer periods of time, it should refresh the presented ads at regular intervals well under that
period.
2.3 Ad definition
A mobile ad in the scope of this protocol is comprised of either a banner image, an ad text, or a
combination of both, along with a click URL.
The presentation of the creative materials – text or image – is up to the application itself. Once the user
chooses to click an ad, the application should open the click URL in a browser.
3 Making a Request
Requests are made as simple HTTP calls to the inneractive server.
Parameters are passed as name-value pairs, either within the query string for the GET method, or in the
body of a post method. Parameters should be URL encoded once, so that they are passed correctly, but
no additional decoding is required when retrieved.
Additionally, when the request is routed through the partner’s server, it is required that the server pass
all HTTP headers received from the application client, on to the inneractive server. These headers are
required to enhance the optimization process with as much data.
The target servlet depends on the requesting entity and the required response format:
XML HTML
Client app request clientRequestAd clientRequestHtmlAd
Server request requestAd requestHtmlAd
Thus, a request made by a client embedded in an application, requiring HTML response, should Be
directed at http://m2m1.inner-active.com/simpleM2M/clientRequestHtmlAd.
A request made by the server of a client/server application, requiring XML response, should be directed
at http://m2m1.inner-active.com/simpleM2M/requestAd.
The UA string is taken from the standard header, and the client IP address is taken from the remote
address of the HTTP request.
http://m2m1.inner-
active.com/simpleM2M/requestAd.jsp?aid=3DArts_CapJong&aix=0&ua=Mozilla%2F5.0
(SymbianOS%2F9.2%3B Series60%2F3.1 NOKIAN95 8GB%3B Profile%2FMIDP-2.1
Configuration%2FCLDC-1.1) AppleWebKit%2F525 (KHTML%2C like Gecko)
BrowserNG%2F7.1.18124&cip=194.153.110.160&test=1
For client side requests, these values will be taken from the standard HTTP headers.
These optional parameters may be used with any request type – client/server originated, and
HTML/XML formatted.
3.5 Headers
As stated above, when the request is made by the partner’s application server, all headers passed in the
original request from the client to the server should also be passed to the inneractive system, with the
exception of two headers:
All such header names should be prefixed with “iA-“, and re-transmitted.
See appendix C for a list of important headers, which may greatly improve ad selection.
4 Response
The response to an ad request is in either xml format (see Appendix A for a schema definition, Appendix
B for example responses) or an HTML format, according to the target URL.
The error attribute of the Response element may hold one of the values: “OK”, “Internal Error”, “House
Ad”, “Invalid Input”, or “Unknown App Id”.
The Text element, when included, will hold the text string to display for this ad.
The Image element, when included, will hold a link to the image.
Please note that since the output is in XHTML, URLs are encoded (most
significantly, ampersands are represented as “&”), and need to be decoded
before use.
<complexType name="ResponseType">
<sequence>
<element name="Client" type="tns:ClientType"></element>
<element name="Ad" type="tns:AdType"></element>
</sequence>
<attribute name="Error">
<simpleType>
<restriction base="string">
<enumeration value="OK"></enumeration>
<enumeration value="House Ad"></enumeration>
<enumeration value="Internal
Error"></enumeration>
<enumeration value="Invalid Input"></enumeration>
<enumeration value="Unknown App
Id"></enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
<complexType name="AdType">
<sequence>
<element name="Text" type="string" maxOccurs="1"
minOccurs="0"></element>
<element name="URL" type="string" maxOccurs="1"
minOccurs="1"></element>
<element name="Image" type="string" maxOccurs="1"
minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="ClientType">
<attribute name="Id" type="string"></attribute>
</complexType>
</schema>
x-forwarded-for
x-network-info
x-original-user-agent