Advertiser reportingAPI

From wiki.taptica.com
(Difference between revisions)
Jump to: navigation, search
Line 31: Line 31:
  
  
 
+
'''API 2 Get Campaign'''
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
API 2 Get Campaign
+
  
 
GET https://adv.taptica.com/Advertiser/v2/getCampaignsList
 
GET https://adv.taptica.com/Advertiser/v2/getCampaignsList
Line 142: Line 126:
  
  
API 3 Get Stats
+
'''API 3 Get Stats
 
+
'''
 
Pre-requisites:
 
Pre-requisites:
 
-Advertiser is authorized to fire requests (Logged in)
 
-Advertiser is authorized to fire requests (Logged in)

Revision as of 10:20, 23 January 2020

Advertiser reporting API Implementation:



API 1 Get token
The token is valid for 24 hours
POST https://security.taptica.com/TokenService.svc/authenticate2 HTTP/1.1
Content-Type: application/json Host: stagingsecurity.taptica.com Content-Length: 60

{"username":"<user name>","password":"<password>"}

For example

{"username":"Advertiser12@email.com","password":"TapAdvertiser123"}


Sample token: token=JinmvwMCt4N5Ez4lInHcVgqbRIX33SXNfkDp/QDyxTwNvTdCCRib3oBCfNTfasRCZkm+UpIcKIyI1Fh89GDf9E+7vq8AKlERdRyn6JqYy7IEPq+yIIRDFBBGE2Ffy/4Z







API 2 Get Campaign

GET https://adv.taptica.com/Advertiser/v2/getCampaignsList HTTP/1.1 Content-Type: application/json Authorization: Enter here the token you received Host: api.taptica.com

Response example:

{

   "Error": null,
   "ErrorCode": 0,
   "data": [
       {
           "bundle_id": "com.google.android.googlequicksearchbox",
           "campaign_id": "31230",
           "campaign_name": "new offer free app"
       },
       {
           "bundle_id": "com.google.android.googlequicksearchbox",
           "campaign_id": "31231",
           "campaign_name": "Test offer"
       },
       {
           "bundle_id": "com.google.android.googlequicksearchbox",
           "campaign_id": "37048",
           "campaign_name": "test20160822"
       },
       {
           "bundle_id": "com.newapp",
           "campaign_id": "33244",
           "campaign_name": "testbb20160509"
       },
       {
           "bundle_id": "test20160525",
           "campaign_id": "33705",
           "campaign_name": "test20160525"
       },
       {
           "bundle_id": "test20160606",
           "campaign_id": "34089",
           "campaign_name": "test20160606"
       },
       {
           "bundle_id": "com.newapps",
           "campaign_id": "34551",
           "campaign_name": "test2016062000"
       },
       {
           "bundle_id": "test20160621",
           "campaign_id": "34616",
           "campaign_name": "test20160621kokoko"
       },
       {
           "bundle_id": "test20160621",
           "campaign_id": "34828",
           "campaign_name": "test20160627i"
       },
       {
           "bundle_id": "com.newappps",
           "campaign_id": "36564",
           "campaign_name": "test20160810"
       },
       {
           "bundle_id": "com.appnew",
           "campaign_id": "37785",
           "campaign_name": "test20160907"
       },
       {
           "bundle_id": "com.appsnew",
           "campaign_id": "38467",
           "campaign_name": "TEST"
       },
       {
           "bundle_id": "com.newapp",
           "campaign_id": "41280",
           "campaign_name": "tester"
       },
       {
           "bundle_id": "com.findapp",
           "campaign_id": "33296216",
           "campaign_name": "test20170731"
       }
   ],
   "status": "full"

}





API 3 Get Stats Pre-requisites: -Advertiser is authorized to fire requests (Logged in)

     -start date is previous date than end date		
     -Start date is later than last 6 months ago
limitation of requests:

In case user will send too many requests this error will be returned

Current limitation is set to 10 request per Minute! After sending more than 10 request per minute User will be banned for 1 Hour!

{

   "Error": "Forbidden Request - too many requests per time Interval. User banned for next: 1 hours",
   "ErrorCode": 403,
   "data": []

}


Parameters: - The “EnterFromDate” and “EnterToDate” should be in UNIX time. “EnterFromDate” should be Date later than 6 months ago “EnterFromDate” should be earlier date than “EnterToDate”

Insert dates with difference of minimum 1 day (i.e 16 to 17 in specific month)

- “campaignsId” should be campaign id from the result of API #2. For multi campaigns use comma separator between campaigns ids. Use -1 to get all campaigns.

- “groupByBannerIndicator” should be Boolean type (true OR false). This parameter indicates on grouping result by Banner Name, Case this parameter is “true” all results will also be grouped by banner name, Case this parameter is “false” all results will be grouped by date, campaign id.


Reporting API Request:

In case user want to group the response by banner – please use the API below:

GET https://adv.taptica.com/Reports/v2/getAdvCampaignsListStats/EnterFromDate/EnterToDate/ campaignsId/true HTTP/1.1 Content-Type: application/json Authorization: Enter here the token you received Host: api.taptica.com








Results:

1. Case Token is expired {

   "Error": "Token Expired. ValidUntil=8/10/2017 12:30:29 PM",
   "ErrorCode": -1

}

Solution: check credentials, and replace access token in header request.



2. In case start date before last 6 months ago {

   "Error": "invalid dates. startDate must be later than half year ago",
   "ErrorCode": 100,
   "data": []

}


3. In case start date greater than endDate, Please insert dates with days difference which greater or equal to 1. {

   "Error": "invalid dates. endDate must be greater than startDate",
   "ErrorCode": 100,
   "data": []

}









4. Success- case groupByBannerIndicator (Last parameter in API) is false!


Response:

{

   "Error": null,
   "ErrorCode": 0,
   "data": [
       {
           "campaign_id": "31231",
           "data": [
               {
                   "AffiliateSubId": "",
                   "AppName": "",
                   "BannerName": "",
                   "BundleId": "com.google.android.googlequicksearchbox",
                   "OfferUrl": "http://www.taptica.com/{tt_cid}?tt_cid={tt_cid}&gil=vegan&tt_val_da={tt_val_da}&gclid={gclid}&tt_unixtime={tt_unixtime}&tt_revenue={tt_revenue}&tt_payout={tt_payout}&tt_idfa={tt_idfa}",
                   "Platform": "N/A",
                   "PublisherId": 2368,
                   "clicks": 272,
                   "conversions": 1,
                   "country_code": "",
                   "expense": 10,
                   "impressions": 0
               }
           ],
           "date": "2017-05-28"
       }
   ],
   "status": "full"

}











5. Success - case groupByBannerIndicator(Last parameter in API) is true!

{

   "Error": null,
   "ErrorCode": 0,
   "data": [
       {
           "BannerName": "",
           "campaign_id": "31231",
           "data": [
               {
                   "AffiliateSubId": "",
                   "AppName": "",
                   "BundleId": "com.google.android.googlequicksearchbox",
                   "OfferUrl": "http://www.taptica.com/{tt_cid}?tt_cid={tt_cid}&gil=vegan&tt_val_da={tt_val_da}&gclid={gclid}&tt_unixtime={tt_unixtime}&tt_revenue={tt_revenue}&tt_payout={tt_payout}&tt_idfa={tt_idfa}",
                   "Platform": "N/A",
                   "PublisherId": 2368,
                   "clicks": 272,
                   "conversions": 1,
                   "country_code": "",
                   "expense": 10,
                   "impressions": 0
               }
           ],
           "date": "2017-05-28"
       }
   ],
   "status": "full"

}

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox