Retrieve Report By Zone Id

From wiki.taptica.com
(Difference between revisions)
Jump to: navigation, search
(Audience)
(Get Stats)
 
(60 intermediate revisions by one user not shown)
Line 2: Line 2:
 
== Audience ==
 
== Audience ==
  
This document is intended for software engineers, product or project managers responsible for the implementation of Taptica's API for reports.  
+
This document is intended for software engineers, product or project managers responsible for the implementation of Taptica's reports APIs.
  
== Retrieve Report By Zone Id ==
+
== 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.
  
This method is used to send request to Taptica's Core servers for retrieving ads reports.
+
Taptica support 3 reports APIs
The method will pass to Taptica's Core servers unique IDs identifying the Zone Id and a set of metadata describing the request.
+
  
== End Point ==
+
1. '''Get App (Account)'''
 +
  Account static structure data – give the account his affiliates, apps ids and description.
  
Service end point:
+
2. '''Get App (Publisher)'''
 +
  Publisher static structure data – give the publisher his affiliates, apps ids and description.
  
[ Version 2.0 ]
+
3. '''Get Stats'''
 +
  Account affiliate statistical data – give statistical data for 24 hours.
  
http://api.reports.taptica.com/v2/data
+
== Get App (Account)==
  
Example (GET)
+
Ad requests to the Taptica's API comprise:
  
http://api.reports.taptica.com/v2/data?zoneid=ABC&token=F0B2C2487b8BD5EBE782&from=20130120&to=20130122
+
A simple HTTP GET request of the form:  
  
 +
https://api.taptica.com/v2/account?accounttoken={accountToken}&format={format}
  
 
'''Parameters Description'''<br/>
 
'''Parameters Description'''<br/>
Line 26: Line 30:
 
{| border="1" cellspacing="0" cellpadding="2" valign="top"
 
{| border="1" cellspacing="0" cellpadding="2" valign="top"
  
 +
|'''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'''<br/>
 +
XML, JSON or CSV dependent on the format value, default value XML<br/>
 +
 +
'''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":[]}
 +
Invalid token
 +
 +
'''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
 +
Invalid token
 +
 +
 +
 +
== Get App (Publisher)==
 +
 +
Ad requests to the Taptica's API comprise:
 +
 +
A simple HTTP GET request of the form:
 +
 +
https://api.taptica.com/v2/publisherApps?publisherToken={accountToken}&format={format}
 +
 +
 +
 +
'''Parameters Description'''<br/>
 +
 +
{| border="1" cellspacing="0" cellpadding="2" valign="top"
  
 
|'''Parameter'''
 
|'''Parameter'''
Line 31: Line 126:
  
 
|-
 
|-
|token
+
|accountToken
|Type: Authentication token provided by  Taptica's Core
+
|Encrypted token per publisher provided by  Taptica's Core
  
 
|-
 
|-
|zoneid
+
|format
|Type: string, Zone Id as provisioned by Taptica's Core.
+
|Determine the response format can be xml, json or csv.
 +
 
 +
 
 +
|}
 +
 
 +
 
 +
'''Return Value'''<br/>
 +
XML, JSON or CSV dependent on the format value, default value XML<br/>
 +
 
 +
'''responses Examples'''
 +
 
 +
XML
 +
 
 +
<Apps>
 +
  <errorCode>0</errorCode>
 +
  <data>
 +
    <item>
 +
  <AffiliateId>1740</AffiliateId>
 +
  <AppId>900cc867-5b59-4ae1-9466-a3a961625e0c</AppId>
 +
  <AppName>Taptica- iPhone</AppName>
 +
  <AppDescription>Taptica- iPhone</AppDescription>
 +
  <AppUploadTime>2012-11-22</AppUploadTime
 +
</item>
 +
  </data>
 +
</Apps>
 +
 
 +
XML Error Example
 +
 
 +
  <Apps>
 +
  <data/>
 +
  <error>Security Error</error>
 +
  </Apps>
 +
 
 +
'''JSON'''
 +
 
 +
{"Error":null,"ErrorCode":0,"data":[{"AffiliateId":1740,"AppDescription":"Taptica","AppId":"a1f5ftca-ce9b-4747-8833-1729ee718fea","AppName":"Taptica (1740) New","AppUploadTime":"2013-11-05"}]}
 +
 
 +
JSON Error:
 +
 
 +
{"Error":"Security Error","data":[]}
 +
Invalid Token
 +
 
 +
'''CSV'''
 +
 
 +
AffiliateId,AppId,AppName,AppDescription,AppUploadTime
 +
1740,900cc867-5b59-4ae1-9466-a3a961625e0c,Taptica - iPhone,Taptica - iPhone,2012-11-22
 +
 
 +
 
 +
CSV Error Example:
 +
 
 +
Security Error
 +
Invalid Token
 +
 
 +
== Get Stats ==
 +
 
 +
Affiliate statistical data - give statistical data for 24 hours time frame
 +
 
 +
A simple HTTP GET request of the form:
 +
 
 +
https://api.taptica.com/v2/publisherStats?publisherToken={publisherToken}&from={from}&to={to}&format={format}
 +
 
 +
'''Parameters Description'''<br/>
 +
 
 +
{| border="1" cellspacing="0" cellpadding="2" valign="top"
 +
 
 +
|'''Parameter'''
 +
|'''Description''' 
 +
 
 +
|-
 +
|publisherToken
 +
|Publisher token will be provieded by Taptica
  
 
|-
 
|-
 
|from
 
|from
|Type: Date , start date to begin the report.
+
|from date in unix time.
  
 
|-
 
|-
 
|to
 
|to
|Type: Date , end date to end the report.
+
|to date in unix time.
  
 
|-
 
|-
 
|format
 
|format
|Type: string, xml, json or csv responses.
+
|xml, json or csv responses.
 
   
 
   
  
 
|}
 
|}
 +
  
 
'''Return Value'''<br/>
 
'''Return Value'''<br/>
Type:  XML, JSON or CSV dependande on the format value, default value XML<br/>
+
XML, JSON or CSV dependent on the format value, default value XML<br/>
 +
 
 +
'''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>
 +
 
 +
 
 +
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)

Latest revision as of 14:52, 1 September 2014

Contents

[edit] Audience

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

[edit] 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 3 reports APIs

1. Get App (Account)

  Account static structure data – give the account his affiliates, apps ids and description.

2. Get App (Publisher)

  Publisher static structure data – give the publisher his affiliates, apps ids and description.

3. Get Stats

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

[edit] Get App (Account)

Ad requests to the Taptica's API comprise:

A simple HTTP GET request of the form:

https://api.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":[]}
Invalid token

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
Invalid token


[edit] Get App (Publisher)

Ad requests to the Taptica's API comprise:

A simple HTTP GET request of the form:

https://api.taptica.com/v2/publisherApps?publisherToken={accountToken}&format={format}


Parameters Description

Parameter Description
accountToken Encrypted token per publisher 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>
 <errorCode>0</errorCode>
 <data>
   <item>

<AffiliateId>1740</AffiliateId> <AppId>900cc867-5b59-4ae1-9466-a3a961625e0c</AppId> <AppName>Taptica- iPhone</AppName> <AppDescription>Taptica- iPhone</AppDescription> <AppUploadTime>2012-11-22</AppUploadTime </item>

 </data>

</Apps>

XML Error Example

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

JSON

{"Error":null,"ErrorCode":0,"data":[{"AffiliateId":1740,"AppDescription":"Taptica","AppId":"a1f5ftca-ce9b-4747-8833-1729ee718fea","AppName":"Taptica (1740) New","AppUploadTime":"2013-11-05"}]}

JSON Error:

{"Error":"Security Error","data":[]}
Invalid Token

CSV

AffiliateId,AppId,AppName,AppDescription,AppUploadTime 1740,900cc867-5b59-4ae1-9466-a3a961625e0c,Taptica - iPhone,Taptica - iPhone,2012-11-22


CSV Error Example:

Security Error
Invalid Token

[edit] Get Stats

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

A simple HTTP GET request of the form:

https://api.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>


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