Retrieve Report By Zone Id

From wiki.taptica.com
(Difference between revisions)
Jump to: navigation, search
(Audience)
(Get Stats)
Line 119: Line 119:
  
 
|-
 
|-
|token
+
|publisherToken
 
|Publisher token will be provieded by Taptica
 
|Publisher token will be provieded by Taptica
 
|-
 
|zoneid
 
|Zone Id as provisioned by Taptica's Core.
 
 
|-
 
|byOffer
 
|By Offer, if byOffer=false an aggregate report will be created
 
  
 
|-
 
|-
 
|from
 
|from
|Date , start date to begin the report. (format:YYYYMMDD or YYYY-MM-DD)
+
|from date in unix time.
  
 
|-
 
|-
 
|to
 
|to
|Date , end date to end the report. (format:YYYYMMDD or YYYY-MM-DD)
+
|to date in unix time.
  
 
|-
 
|-
Line 153: Line 145:
 
XML
 
XML
  
<?xml version="1.0"?>
+
<PublisherStatistics>
<response>
+
  <data>
  <data>
+
    <item>
    <item>
+
  <date>2013-07-08</date>
      <date>2013-01-30</date>
+
      <offerid>0</offerid>
      <offerid>2080</offerid>
+
      <AppId>ecbb9862-e64c-49b7-bde8-ac24ea77fd0b</AppId>
      <request>113524</request>
+
      <bannerType>banner</bannerType>
      <impression>31123</impression>
+
      <country>US</country>
      <clicks>209</clicks>
+
      <platform>webapp</platform>
      <conversions>1</conversions>
+
      <request>0</request>
      <cr>0.478</cr>
+
      <impression>0</impression>
      <fillrate>27.415</fillrate>
+
      <clicks>11</clicks>
      <cost>2.00000</cost>
+
      <conversions>0</conversions>
      <cpc>0.010</cpc>
+
      <cr>0</cr>
      <ctr>0.672</ctr>
+
      <AvgPayout>0</AvgPayout>
      <profit>-0.50000</profit>
+
      <Spent>0</Spent>
      <revenue>1.50000</revenue>
+
</item>
      <rpc>0.007</rpc>
+
  </data>
    </item>
+
</response>
  </data>
+
</response>
+
  
 
XML Error Example
 
XML Error Example
  
 
  <?xml version="1.0"?>
 
  <?xml version="1.0"?>
<response>
+
  <PublisherStatistics>
  <data i:nil="true"/>
+
  <data/>
  <error>
+
  <error>Security Error</error>
  unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1
+
  </PublisherStatistics>
  </error>
+
 
</response>
+
  
 
JSON
 
JSON
  
  {  
+
  {
  "reports":[
+
"Data":[
  {
+
  {
    "date":"2013-01-30",
+
"date":"2013-07-07",
    "requests":4072698,
+
"offerid":0,
    "impressions":4000034,
+
"appId":"ecbb9862-e64c-40b7-bde8-ac24ea77fd0b",
    "offerid":0,
+
"bannerType":"banner",
    "fillrate":0.98,
+
"country":"US",
    "clicks":14446,
+
"platform":"android",
    "ctr":0.463,
+
"request":243357,
    "revenue":99.0,
+
"impression":235713,
    "conversions":1600,
+
"clicks":162,
    "cr":0.5,
+
"conversions":1,
    "cost":132.0,
+
"cr":0.617,
    "cpc":0.0091,
+
"AvgPayout":1.57,
    "rpc":0.0068,
+
"Spent":1.57
    "profit":123343.00
+
  }
  }]
+
  ],
 
  }
 
  }
  
 
JSON Error:
 
JSON Error:
  
  {"reports":null,"error":"Unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1"}
+
  {"Data":[],"Error":"Security Error"}  indicate on token problem
 +
{"Data":[],"Error":"No data found for dates 7\/9\/2013 12:00:00 AM - 7\/8\/2013 12:00:00 AM"}
  
  
 
CSV
 
CSV
  
  Date,OfferId,Requests,Impressions,Clicks,Conversions,CR,FillRate,Cost,CPC,CTR,Profit,Revenue,RPC
+
  Date,OfferId,AppId,BannerType,Country,Platform,Requests,Impressions,Clicks,Conversions,CR,Avg Payout,Spent
  2013-01-30, 4072698, 3118472, 76.57, 14446, 0.463, 66, 0.456, 132.00, 0.00913, 0.0068531, 23433.00,99.00
+
  2013-07-07,0,ecbb9862-e64c-49b7-bde8-ac24ea77fd0b,banner,US,android,243357,235713,162,1,0.617,1.57,1.57
  
 
CSV Error Example:
 
CSV Error Example:
  Unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1
+
  Security Error (usually Unknown token)

Revision as of 17:48, 9 July 2013

Contents

Audience

This document is intended for software engineers, product or project managers responsible for the implementation of Taptica's reports APIs.

Supported Reports APIs

Taptica Data API design to give Taptica clients a B2B solution for retrieving its’ data structure (client account structure) as well as its operation statistical data.

Taptica support 2 reports APIs

1. Get App

  Account static structure data – give the account its’ affiliates and apps.

2. Get Stats

  Account affiliate statistical data – give statistical data for 24 hours.

Get App

Ad requests to the Taptica's API comprise:

A simple HTTP GET request of the form:

http://api.reports.taptica.com/v2/account?accounttoken={accountToken}&format={format}

Parameters Description

Parameter Description
accountToken Encrypted token per account provided by Taptica's Core
format Determine the response format can be xml, json or csv.



Return Value
XML, JSON or CSV dependent on the format value, default value XML

responses Examples

XML

<Apps>
  <data>
   <item>
   <AffiliateId>1974</AffiliateId>
   <AppId>5deb7148-6d6c-4c21-ab6d-292e4b7105c4</AppId>
   <AppName>FreshPlanet Android</AppName>
   <AppDescription>Burstly integration</AppDescription>
   <AppUploadTime>2013-03-14</AppUploadTime>
  </item>
 </data>
</Apps>

XML Error Example

 <Apps>
  <data/>
  <error>Security Error</error>
  </Apps>

JSON

{
 "data":[
  {
   "AffiliateId":1518,
   "AppDescription":"meetme",
   "AppId":"173e2859-6750-4e28-81a8-ec002bde52ac",
   "AppName":"meetme iPhone 320X50",
   "AppUploadTime":"2013-02-20"
  },
 {
   "AffiliateId":1518,
   "AppDescription":"Bursly Android Meetme integration.",
   "AppId":"7fde4915-b182-499f-a08f-188ecca17416",
   "AppName":"Meetme Android 320X50",
   "AppUploadTime":"2013-03-28"
  }
 ]
}

JSON Error:

{"Error":"Security Error","data":[]}
Token might be invalid

CSV

Affiliate Id,App Id,App Name,App Description,App UploadTime
1518,173e2859-6750-4e28-81a8-ec002bde52ac,meetme iPhone 320X50,meetme,2013-02-20

CSV Error Example:

Security Error
Token might be invalid

Get Stats

Affiliate statistical data - give statistical data for 24 hours time frame

A simple HTTP GET request of the form:

http://api.reports.taptica.com/v2/publisherStats?publisherToken={publisherToken}&from={from}&to={to}&format={format}

Parameters Description

Parameter Description
publisherToken Publisher token will be provieded by Taptica
from from date in unix time.
to to date in unix time.
format xml, json or csv responses.



Return Value
XML, JSON or CSV dependent on the format value, default value XML

Reporting Examples

XML

<PublisherStatistics>

 <data>
   <item>

<date>2013-07-08</date>

     <offerid>0</offerid>
     <AppId>ecbb9862-e64c-49b7-bde8-ac24ea77fd0b</AppId>
     <bannerType>banner</bannerType>
     <country>US</country>
     <platform>webapp</platform>
     <request>0</request>
     <impression>0</impression>
     <clicks>11</clicks>
     <conversions>0</conversions>
     <cr>0</cr>
     <AvgPayout>0</AvgPayout>
     <Spent>0</Spent>

</item>

 </data>

</response>

XML Error Example

<?xml version="1.0"?>
 <PublisherStatistics>
  <data/>
  <error>Security Error</error>
 </PublisherStatistics>


JSON

{
"Data":[
  {

"date":"2013-07-07", "offerid":0, "appId":"ecbb9862-e64c-40b7-bde8-ac24ea77fd0b", "bannerType":"banner", "country":"US", "platform":"android", "request":243357, "impression":235713, "clicks":162, "conversions":1, "cr":0.617, "AvgPayout":1.57, "Spent":1.57

  }
 ],
}

JSON Error:

{"Data":[],"Error":"Security Error"}  indicate on token problem 
{"Data":[],"Error":"No data found for dates 7\/9\/2013 12:00:00 AM - 7\/8\/2013 12:00:00 AM"}


CSV

Date,OfferId,AppId,BannerType,Country,Platform,Requests,Impressions,Clicks,Conversions,CR,Avg Payout,Spent
2013-07-07,0,ecbb9862-e64c-49b7-bde8-ac24ea77fd0b,banner,US,android,243357,235713,162,1,0.617,1.57,1.57

CSV Error Example:

Security Error (usually Unknown token)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox