Actions

New Public API Version 1.0

From TyrooLabs


Contents

How to call API

As this API integration will be server to server, Below table list downs the various parameters that can be used while making a request. Some of the parameters are mandatory and some are recommended. However, it is advised that even the recommended parameters should be filled while making an ad request.


Node Data Type Mandatory/Recommended Description
placementId Integer Mandatory Get the id from Tyroo account manager.
affId Integer Mandatory This is a unique Affiliate id for your authentication. Can get this id from tyroocentral platform once you register on the platform.
requestSource String Mandatory Value should contain PUBLIC.
gaid String Mandatory Google Advertising identifier needs to be passed in this field for Android devices. The list can be found in the Publisher Account Manager. Even for other campaigns, it is recommended, since the presence of this value leads to accuracy in validation and conversion attribution.
idfa String Mandatory Apple identifier needs to be passed in this field for iOS devices. The list can be found in the Publisher Account Manager. Even for other campaigns, it is recommended since the presence of this value leads to accuracy in validation and conversion attribution.
androidId String Recommended Android id of device. This is mandatory whenever GAID is not passed. The list can be found in the Publisher Account Manager. Even for other campaigns, it is recommended, since the presence of this value leads to accuracy in validation and conversion attribution.
countryCode String Optional Two Letter ISO country code. The response will be provided according to what country have you selected.
os String Optional OS, "android" in case of Android and "ios" in case of iOS.
subid1 String Extra placeholder for Publishers.
subid2 String Extra placeholder for Publishers.
subid3 String Extra placeholder for Publishers.
subid4 String Extra placeholder for Publishers.
subid5 String Extra placeholder for Publishers.
optionalParams String Extra placeholder for Publishers.


Sample API Request

Get Method


http://video.tyroo.com/image?requestParams={"affId":"","placementId":"","packageName":"","subid1":"","subid2":"","subid3":"","subid4":"","subid5":"", "requestSource":"PUBLIC"}


Sample API Response


In the API response, before serving the Ads below fields need to be replaced with actual values. If the value is not available, then, in that case, macros should be replaced with blank values. This needs to be done for the macros wherever available in the image tag.


{
  "success": true,
  "data": {
    "offers": {
      "27816": {
        "creatives": {
          "17717665": {
            "bannerId": "17717665",
            "height": "250",
            "width": "300",
            "offerType": "APP INSTALL",
            "impressionURL": "http:\/\/et.tyroo.com\/www\/delivery\/lgnew.php?country_short=IN&country_long=India&state=Delhi&city=New+Delhi&latitude=28.635759353638&longitude=77.224449157715&os=windows&osVersion=8.1&deviceBrand=Unknown&deviceModel=Unknown&screenW=Unknown&screenH=Unknown&browser=GC&browserVersion=65&gaid=&androidId=&idfa=&requestId=16235379685ab88501aae054910110081522042113700&subId1=&subId2=&subId3=&subId4=&subId5=&optionalParams=&ad_group_id=1651&source=PUBLIC&affiliateId=7&appId=0&package_name=009&zoneid=11&bannerid=17717665&campaignid=27816",
            "clickURL": "http:\/\/srv.tyroo.com\/www\/delivery\/ckt.php?ad_group_id=1651&requestSource=PUBLIC&affid=7&appId=0&gaid=&androidId=&IDFA=&requestId=16235379685ab88501aae054910110081522042113700&subId1=&subId2=&subId3=&subId4=&subId5=&optionalParams=&bannerid=17717665&pkgName=com.daraz.android",
            "imageURL": "http:\/\/cdnimages.tyroo.com\/51d3cbafaf1f11b479282d9644059144.png"
          },
          "17717663": {
            "bannerId": "17717663",
            "height": "181",
            "width": "471",
            "offerType": "APP INSTALL",
            "impressionURL": "http:\/\/et.tyroo.com\/www\/delivery\/lgnew.php?country_short=IN&country_long=India&state=Delhi&city=New+Delhi&latitude=28.635759353638&longitude=77.224449157715&os=windows&osVersion=8.1&deviceBrand=Unknown&deviceModel=Unknown&screenW=Unknown&screenH=Unknown&browser=GC&browserVersion=65&gaid=&androidId=&idfa=&requestId=16235379685ab88501aae054910110081522042113700&subId1=&subId2=&subId3=&subId4=&subId5=&optionalParams=&ad_group_id=1651&source=PUBLIC&affiliateId=7&appId=0&package_name=009&zoneid=11&bannerid=17717663&campaignid=27816",
            "clickURL": "http:\/\/srv.tyroo.com\/www\/delivery\/ckt.php?ad_group_id=1651&requestSource=PUBLIC&affid=7&appId=0&gaid=&androidId=&IDFA=&requestId=16235379685ab88501aae054910110081522042113700&subId1=&subId2=&subId3=&subId4=&subId5=&optionalParams=&bannerid=17717663&pkgName=com.daraz.android",
            "imageURL": "http:\/\/cdnimages.tyroo.com\/a83e5ab5cc0a86886c556c7e3a57c4b8.png"
          },
          "17686818": {
            "bannerId": "17686818",
            "height": "144",
            "width": "144",
            "offerType": "APP INSTALL",
            "impressionURL": "http:\/\/et.tyroo.com\/www\/delivery\/lgnew.php?country_short=IN&country_long=India&state=Delhi&city=New+Delhi&latitude=28.635759353638&longitude=77.224449157715&os=windows&osVersion=8.1&deviceBrand=Unknown&deviceModel=Unknown&screenW=Unknown&screenH=Unknown&browser=GC&browserVersion=65&gaid=&androidId=&idfa=&requestId=16235379685ab88501aae054910110081522042113700&subId1=&subId2=&subId3=&subId4=&subId5=&optionalParams=&ad_group_id=1651&source=PUBLIC&affiliateId=7&appId=0&package_name=009&zoneid=11&bannerid=17686818&campaignid=27816",
            "clickURL": "http:\/\/srv.tyroo.com\/www\/delivery\/ckt.php?ad_group_id=1651&requestSource=PUBLIC&affid=7&appId=0&gaid=&androidId=&IDFA=&requestId=16235379685ab88501aae054910110081522042113700&subId1=&subId2=&subId3=&subId4=&subId5=&optionalParams=&bannerid=17686818&pkgName=com.daraz.android",
            "imageURL": "http:\/\/cdnimages.tyroo.com\/7bde05710334506007cf9a54d356c448.png"
          }
        },
        "advertiser": {
          "campaignId": "27816",
          "campaignName": "Daraz CPI",
          "KPI": "",
          "vendor": "Daraz  Rocket Internet",
          "packageName": "com.daraz.android",
          "category": "Shopping",
          "rating": 0,
          "downloads": 0,
          "title": "",
          "subtitle": ""
        },
        "capping": {
          "Install": "350"
        },
        "pricing": {
          "currency": "USD",
          "pricing": 0,
          "model": "CPA",
          "revenueEvent": ""
        },
        "targeting": {
          "include": {
            "geo": [
              "PK"
            ],
            "os": {
              "Android": [
                "ALL"
              ]
            }
          }
        }
      }
    }
  }
}


Response Node Description

Node Data Type Example Description
bannerId Integer 17717665 When a creative/banner is created for a Campaign, a bannerId will generated.
height Integer 250 Height of a banner
width Integer 300 Width of a banner
offerType String APP INSTALL In case of Install campaigns, it would be APP INSTALL

In case of Brand campaigns, it would be BRAND

impressionURL String http:\/\/et.tyroo.com\/www\/delivery\/lgnew.php?... It shows the Impression URL.
clickURL String http:\/\/srv.tyroo.com\/www\/delivery\/ckt.php?... The destination URL (also called "click URL", or "landing page URL"), is the website address that a visitor goes to when he/she clicks on the ad.
imageURL String http:\/\/cdnimages.tyroo.com\/51d3cbaf....png It shows the Image URL.
campaignId Integer 27816 This shows the Campaign Id.
campaignName String Daraz CPI This shows the Campaign Name
KPI String CPI < 1$ KPI is what Advertiser have set for a Campaign.
vendor String Daraz Rocket Internet Advertiser name like Flipkart, Amazon.
packageName String com.daraz.android This is package Name of "Playstore" or Package ID of "iTune".
category String Shopping This is Playstore category of the Campaign.
rating Integer 0 It shows the rating of the App.
downloads Integer 0 It shows the number of downloads of the App.
title String Daraz Online Shopping App This is the Title showing on the Playstore.
subtitle String Daraz Mobile This is the Subtitle showing on the Playstore.
Install Integer 350 It shows the capping for Installs.
currency String USD It shows in USD.
pricing Integer 0 It shows the payout of the publisher depending upon the Pricing Model.
model String CPA Here you can see the pricing model. like, CPC, CPM, CPA.
revenueEvent String Install It may be : launch, tutorial event, login, logout, registration, add to cart, view cart, removed from cart, add to wish list, removed from wish list, added payment info, checkout initiated, purchase, search, content view, reservation, spent credits, rated, level reached, tutorial completed, invite sent, shared, Install
targeting: geo String "geo": ["IN", "ID", "PK"] OR "geo": ["ALL"] geo - It shows the country whatever you have include or exclude in the Targeting. In case of no targeting on geo, "ALL" will be displayed in the geo targeting node.
targeting: os String "Android": ["5.1.0", "5.1.1", "4.1.0"] OR "Android": ["ALL"] Android / iOS - It shows the version of Android or iOS whatever you have set in the OS. In case you have select all the versions of the Android / iOS, "ALL" will be displayed in the corresponding OS node.