Retrieve Report By Zone Id

From wiki.taptica.com
(Difference between revisions)
Jump to: navigation, search
(End Point)
(Get App)
Line 35: Line 35:
  
 
|-
 
|-
|Format
+
|format
 
|Determine the response format can be xml, json or csv.
 
|Determine the response format can be xml, json or csv.
  

Revision as of 14:43, 9 July 2013

Contents

Audience

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

Retrieve Report By Zone Id

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 time frame

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

<?xml version="1.0"?>
<response>
 <data i:nil="true"/>
 <error>
  unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1
 </error>
</response>

JSON

{

"data":[
 {

"AffiliateId":1518, "AppDescription":"meetme", "AppId":"173e2859-6750-4e28-81a8-ec002bde52ac", "AppName":"meetme iPhone 320X50", "AppUploadTime":"2013-02-20"

 }]
}

JSON Error:

{"reports":null,"error":"Unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1"}


CSV

Date,OfferId,Requests,Impressions,Clicks,Conversions,CR,FillRate,Cost,CPC,CTR,Profit,Revenue,RPC
2013-01-30, 4072698, 3118472, 76.57, 14446, 0.463, 66, 0.456, 132.00, 0.00913, 0.0068531, 23433.00,99.00

CSV Error Example:

Unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1

Get App

Ad requests to the Taptica's API comprise:

A simple HTTP GET request of the form:

http://api.reports.taptica.com/v2/data?zoneid=ABC&token=SomeToken&from=20130120&to=20130122&format=json

Parameters Description

Parameter Description
token Authentication token provided by Taptica's Core
zoneid Zone Id as provisioned by Taptica's Core.
byOffer By Offer, if byOffer=false an aggregate report will be created
from Date , start date to begin the report. (format:YYYYMMDD or YYYY-MM-DD)
to Date , end date to end the report. (format:YYYYMMDD or YYYY-MM-DD)
format xml, json or csv responses.



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

Reporting Examples

XML

<?xml version="1.0"?>
<response>
  <data>
    <item>
      <date>2013-01-30</date>
      <offerid>2080</offerid>
      <request>113524</request>
      <impression>31123</impression>
      <clicks>209</clicks>
      <conversions>1</conversions>
      <cr>0.478</cr>
      <fillrate>27.415</fillrate>
      <cost>2.00000</cost>
      <cpc>0.010</cpc>
      <ctr>0.672</ctr>
      <profit>-0.50000</profit>
      <revenue>1.50000</revenue>
      <rpc>0.007</rpc>
    </item>
  </data>
</response>

XML Error Example

<?xml version="1.0"?>
<response>
 <data i:nil="true"/>
 <error>
  unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1
 </error>
</response>

JSON

{ 
 "reports":[
 {
   "date":"2013-01-30",
   "requests":4072698,
   "impressions":4000034,
   "offerid":0,
   "fillrate":0.98,
   "clicks":14446,
   "ctr":0.463,
   "revenue":99.0,
   "conversions":1600,
   "cr":0.5,
   "cost":132.0,
   "cpc":0.0091,
   "rpc":0.0068,
   "profit":123343.00
 }]
}

JSON Error:

{"reports":null,"error":"Unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1"}


CSV

Date,OfferId,Requests,Impressions,Clicks,Conversions,CR,FillRate,Cost,CPC,CTR,Profit,Revenue,RPC
2013-01-30, 4072698, 3118472, 76.57, 14446, 0.463, 66, 0.456, 132.00, 0.00913, 0.0068531, 23433.00,99.00

CSV Error Example:

Unknown zoneid=7c2bfe27-6262-4942-b4e-660fa0f95bd1
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox