• AD REQUEST

    WapStart API format extends Open RTB format
    Download documentation (PDF)

    Ad request is JSON object with following structure:

    Ad request consists of 4 main objects:

    • Impression object - represent ad query
    • Site object - represent site-specific data
    • Device object - represent device-specific data
    • User object - represent user-specific data

    Impression object

    Impression object may be empty or contain any number of Banner objects and/or Video objects. Banner and Video objects represent ads filtering, depending of ad media type. Empty impression object means that you want to get first suitable ad, elsewhere impression object means that you want to get several banner and video ads.

    Name Type Required Description
    banner [ Banner ] optional Banners list
    video [ Video ] optional Video banners list
    Name Type Required Description
    w int optional Desired ad width
    h int optional Desired ad height
    cw int optional Container width
    ch int optional Container height
    api [ ApiType ] optional List of supported API frameworks
    btype [ BannerType ] optional List of supported banner types
    rmtype [ RichMediaType ] optional List of supported rich media types

    Video object

    Name Type Required Description
    maxduration int required Max video duration
    canskip bool required If user can skip video, true else false
    vtype VideoType required Type of video

    Site object

    Name Type Required Description
    id int required SID at WapStart Plus1 Ad Network
    ctype ConnectionType required Site connection type
    ictype InternalClientType optional Internal client type
    publisher Publisher object optional Information about actual publisher

    Publisher object

    Name Type Required Description
    id int required Publisher ID
    name string optional Publisher name
    url string optional Url to publisher

    Device object

    Name Type Required Description
    ip string required Ip address
    ua string required User agent
    adidstringoptionalAndroid's Advertising ID
    adidmd5stringoptionalAndroid's Advertising ID md5 encoded
    adidsha1stringoptionalAndroid's Advertising ID sha1 encoded
    aidstringoptionalAndroid's Secure.ANDROID_ID identifier
    aidmd5stringoptionalAndroid's Secure.ANDROID_ID identifier md5 encoded
    aidsha1stringoptionalAndroid's Secure.ANDROID_ID identifier sha1 encoded
    idfastringoptionalApple's IFA
    idfamd5stringoptionalApple's IFA md5 encoded
    idfasha1stringoptionalApple's IFA sha1 encoded
    ifastringoptionalNative identifier for advertisers - an opaque ID,
    assigned by the device or browser for use as an advertising identifier
    eudidstringoptionalIDFA, SHA1 Hashed Android ID, or Android Advertising ID
    imeistringoptionalIMEI identifier
    imeimd5stringoptionalIMEI identifier md5 encoded
    imeisha1stringoptionalIMEI identifier sha1 encoded
    geo Geo object optional Geo information for device

    Idfa and adid is strictly recommended, as ifa have to send only if one of them does not, or in addition to them for a better definition of unique user.

    Geo object

    Name Type Required Description
    lat float optional Latitude
    lon float optional Longitude
    country string optional Country name

    User object

    Name Type Required Description
    uid string optional Unique user identifier
    yob int(32) optional Year of birthday
    gender Gender optional Gender
    data [ Data object ] optional User additional data

    Data object

    Name Type Required Description
    name string optional Data provider name
    segment [Segment object] optional Data segments

    Segment object

    Name Type Required Description
    name string optional Segment name for current data provider
    value string optional Value for current Segment

    WapStart Data object

    This object used to search for a unique user should be referred to in the object data, with the name "wapstart"

    Data object

    Name Value
    name wapstart
    segment
    Name Type Description
    cookie string
    facebook string facebook id
    twitter string twitter login
    login string unique user identifier
    interest string coma separated user interests

    AD RESPONSE


    Ad response is JSON object with following structure:

    Ad response contains any number of Seat objects.

    Seat object

    Name Type Required Description
    id int required WapStart ad ID
    vlink string required Link for view tracking request
    customPixelUrl string optional Custom Pixel Url
    clink int optional Link for click tracking request
    cw int optional Container width
    ch int optional Container height
    text TextBanner optional TextBanner object
    graphic GraphicBanner optional GraphicBanner object
    wapstartInterstitial GraphicBanner optional GraphicBanner object
    textgraphic TextGraphicBanner optional TextGraphicBanner object
    rich RichBanner optional RichBanner object
    video VideoBanner optional VideoBanner object
    jstag JsTag optional jstag object

    Text banner object

    Name Type Required Description
    title string required Title
    content string optional Ad long text
    short string required Text for banner as one-liner

    Representation

    <a href="{seat.clink}">{seat.ad.short}</a>
    <img src="{seat.vlink}"/>

    Graphic banner object

    Name Type Required Description
    picture Picture required Banner picture

    Picture object

    Name Type Required Description
    name string required Name
    w int required Width
    h int required Height
    size int required Size

    Representation

    <a href="{seat.clink}"><img src="{seat.graphic.picture.name}"/></a>
    <img src="{seat.vlink}"/>

    TextGraphicBanner object

    Name Type Required Description
    title string required Title
    content string optional Ad long text
    short string required Text for banner as one-liner
    picture Picture required Banner picture

    Representation

    <a href="{seat.clink}"><img src="{seat.graphic.picture.name}"/></a>
    <img src="{seat.vlink}"/>

    RichBanner object

    Name Type Required Description
    id string required Celtra banner ID
    channel string required Celtra banner channel
    rmtype [ RichMediaType ] optional Celtra banner format

    Representation

    <img src="data:image/png,celtra" style="display: none" onerror="
    (function(img) {
    var params = {'channelId':'{seat.rich.channel}','clickUrl':'{seat.clink}','externalAdServer':'Custom'};
    [].slice.apply(img.parentNode.childNodes).forEach(function(n) { var decfs = { urldecode: decodeURIComponent, htmldecode: function(v) { var d = document.createElement('div'); d.innerHTML = v; return d.textContent; }, eval: function(v) { return eval(v); }, raw: function(v) { return v; } }; var m; if (n.nodeType == 8 && (m = n.textContent.match(/^\s+([\w.]+)\s+=\s+(\w+)\s+(.*)$/i))) { try { params[m[1]] = decfs[m[2]](m[3].replace(/^\s+|\s+$/g, '')); } catch (e) {} } });
    var req = document.createElement('script');
    req.id = params.scriptId = 'celtra-script-' + (window.celtraScriptIndex = (window.celtraScriptIndex||0)+1);
    params.clientTimestamp = new Date/1000;
    req.src = (window.location.protocol == 'https:' ? 'https' : 'http') + '://ads.celtra.com/{seat.rich.id}/web.js?';
    for (var k in params) {
    req.src += '&' + encodeURIComponent(k) + '=' + encodeURIComponent(params[k]);
    }
    img.parentNode.insertBefore(req, img.nextSibling);
    var i=document.createElement('img');
    i.src='{seat.vlink}';
    })(this);
    "/>

    VideoBanner object

    Name Type Required Description
    vast string required URL to VAST

    JsTag Banner object

    Name Type Required Description
    code string required js code
    iframe bool required is iframe
    w int required banner width
    h int required banner height

    API enumeration objects

    ApiType enumeration object
    ID Value Description
    1 VPAID1 Video Player-Ad Interface Definition version 1
    2 VPAID2 Video Player-Ad Interface Definition version 2
    3 MRAID1 Mobile Rich Media Ad Interface Definitions version 1
    4 ORMMA Open Rich Media Mobile Advertising
    5 MRAID2 Mobile Rich Media Ad Interface Definitions version 2
    RichMediaType enumeration object
    ID Value Description
    1 rmstandard Standard banner
    2 rmexpandable Expandable banner
    3 rminterstitial Interstitial banner
    ConnectionType enumeration object
    ID Value Description
    1 API Server-to-server connection
    2 RTB RTB
    3 JS JavaScript
    4 PHP PHP
    5 Perl Perl
    6 IOS WapStart IOS SDK
    7 Java WapStart JAVA SDK
    8 ANDROID WapStart Android SDK
    InternalClientType enumeration object
    ID Value Description
    1 HTML5 HTML5
    2 IOS iOS
    3 ANDROID Android
    VideoType enumeration object
    ID Value Description
    1 interstitial Intersitital video
    2 in-stream In-stream video
    Gender enumeration object
    ID Value Description
    1 male Male
    2 female Female
    3 unknown Unknown

    Examples

    Request

    {
    	"impression":{
    		"banner":[{
    			"btype":[1,6],
    			"w":320,
    			"h":50,
    			"rmtype":[2]
    		}]
    	},
    	"site":{
    		"id":8,
    		"publisher":[],
    		"ctype":1
    	},
    	"device":{
    		"ua":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0",
    		"ip":"78.107.183.50"
    	},
    	"user":{
    		"gender":1,
    		"data":[
    			{
    				"name":"wapstart",
    				"segment":[
    					{
    					"name":"twitter",
    					"value":"wapstart"
    					}
    					]
    				}
    		]
    	}
    }
    				

    Response

    {
    	"seat":[
    		{
    			"id":206,
    			"clink":"http://clck.plus1.wapstart.co/index.php?area=redirector&type=1&rsId=testmorda_8d96ef29804d719fb481d1de4c580aea548f2e41_08061235&site=8&banner=206&usr=",
    			"vlink":"http://api.plus1.wapstart.co/v1/track/view/8.gif/?sid=testmorda_8d96ef29804d719fb481d1de4c580aea548f2e41_08061235",
    			"text":{
    				"title":"Sample ad",
    				"short":"Sample ad as one-liner"
    			}
    		}
    	]
    }