Retrieve Report By Zone Id

From wiki.taptica.com
(Difference between revisions)
Jump to: navigation, search
(End Point)
(End Point)
Line 55: Line 55:
 
XML
 
XML
  
<?Xml version="1.0"?>
+
<?xml version="1.0"?>
 
  <response>
 
  <response>
 
   <data>
 
   <data>

Revision as of 10:32, 6 February 2013

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

This method is used to send request to Taptica's Core servers for retrieving ads reports. 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

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.
from Date , start date to begin the report. (format:YYYYMMDD)
to Type: Date , end date to end the report. (format:YYYYMMDD)
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>
      <cpc>0</cpc>
      <ctr>0</ctr>
      <clicks>0</clicks>
      <cr>0</cr>
      <conversions>0</conversions>
      <cost>91.00000</cost>
      <date>2013-01-31</date>
      <fillrate>0</fillrate>
      <impressions>0</impressions>
      <offerid>0</offerid>
      <profit>39.00000</profit>
      <rpc>0</rpc>
      <requests>0</requests>
      <revenue>130.00000</revenue>
      <zoneid>abc</zoneid>
    </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":[
 {
   "zoneid":"a6f5bec4-53ed-482a-ac09-69d41f6d1f6c",
   "date":"2013-01-31",
   "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
 }],
 "error":null
}

JSON Error:

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


CSV

zoneid,date,requests,impressions,fillrate,clicks,ctr,conversions,conversionrate,cost,cpc,rpc,profit,revenue
a6f5bec4-53ed-482a-ac09-69d41f6d1f6c, 2013-01-31, 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