Reporting API Documentation

From docs.airnowmedia.com
Jump to: navigation, search

Contents

Preface

This document contains information required to use the AirnowMedia's Advertiser Reporting API.

Introduction

The Advertiser Reporting API is an intuitive interface for advertisers to request for reports and manage their campaigns statistics directly through restful APIs.

Authentication

An API Key is required for all inbound API requests. Advertisers will have to login into their account on AirnowMedia portal and go to "API" section. Press Generate API KEY button to get apikey.

API Rate Limit for overall APIs is 5000 per day.

Parameters and description

Parameter Name Description Mandatory
method Name of report Yes
campaignIds comma separated list of campaignids Yes
startDate Start Date Yes (In YYYY-MM-DD format only)
endDate End Date Yes (In YYYY-MM-DD format only)
reportType Report Type For Optimizer Reports

Sample APIs

Request End Points

Getting Aggregated Data

Get the aggregated data of an advertiser for a given date range.

Request Example:

http://openapi.airnowmedia.com/getAdvertiserReports?apikey=<API_KEY>&startDate=<START_DATE>&endDate=<END_DATE>

Response Format:

   {
   "advertiser_data": [
       {
           "Date": "<START DATE>",
           "campaignname": "campaign_name",
           "campaignid": "123",
           "campaigntype": "Push Ad Unit",
           "campaignstatus": "Active",
           "dailybudget": "100",
           "currentBid": "1.23",
           "impression": "123",
           "clicks": "123",
           "Spent": "123.45",
           "conversion": "0",
           "End Date": "<END DATE>",
           "ctr": "1.23",
           "avgCPC": "1.23",
           "conversionrate": "1.23",
           "CPA": "1.23"
       },
   {
       ......
   }

Note: 1. Both start and end date must be in YYYY-MM-DD format

2. Maximum number of rows returned for this report is 1000. If you wish to view more data then you can include the following parameters:

Parameter Expected Value Definition
version v1 Version for with new features
offset Numeric The reports will render the rows starting from this value. Version is required to add this parameter.
limit Numeric The total number of rows will equal to this value. Version is required to add this parameter. Maximum value allowed is 1000.

Example URL:

http://openapi.airnowmedia.com/getAdvertiserReports?apikey=<API_KEY>&startDate=<START_DATE>&endDate=<END_DATE>&version=v1&offset=1001&limit=1000

Campaign Wise Report

Getting Day wise report for given Campaign(s)

Request Example:

http://openapi.airnowmedia.com/getCampaignReports?apikey=<API_KEY>&startDate=<START_DATE>&endDate=<END_DATE>&campaignIds=<CAMPAIGN_IDs>

Response Format:

{
   "campaign_data": [
       {
           "Date": "2013-06-07",
           "campaignname": "Abc ",
           "campaigntype": "Push",
           "campaignstatus": "Active",
           "dailybudget": "120",
           "currentBid": "0.030",
           "cpi_bid": 0.12,
           "impression": "114952",
           "ctr": "0",
           "clicks": "6346",
           "Spent": "126.92",
           "avgCPC": "0",
           "conversion": "0",
           "conversionrate": "0"
       },
  {
   .......
  }
}

Creative Wise Report

Getting Day wise report of all Creatives for given Campaign(s)

Request Example:

http://openapi.airnowmedia.com/getCreativeReports?apikey=<API_KEY>&startDate=<START_DATE>&endDate=<END_DATE>&campaignIds=<CAMPAIGN_IDs>

Response Format:

{
   "creative_data": [
       {
           "Date": "2013-06-06",
           "campaignid": "123",
           "creativeid": "789",
           "creativename": "Creative Name",
           "impression": "90581",
           "clicks": "6863",
           "ctr": "0",
           "avgCPC": "0",
           "cost": "68.63",
           "conversion": "0",
           "conversionrate": "0",
           "costperconv": "0"
       },
  {
   .......
  }
}

Getting Optimizer Data

Request Example:

http://openapi.airnowmedia.com/getCampaignOptimizerData?apikey=<API_KEY>&startDate=<START_DATE>&endDate=<END_DATE>&campaignIds=<CAMPAIGN_IDs>&reportType=<TYPE>

For two level report, please refer below example:

http://openapi.airnowmedia.com/getCampaignOptimizerData?apikey=<API_KEY>&startDate=<START_DATE>&endDate=<END_DATE>&campaignIds=<CAMPAIGN_IDs>&reportType=<TYPE>&drilldown=<TYPE>

To view limited data or data post 500 records, you can add the parameters 'limit' and 'offset'. Example URL with limit and offset: http://openapi.airnowmedia.com/getCampaignOptimizerData?apikey=<API_KEY>&startDate=<START_DATE>&endDate=<END_DATE>&campaignIds=<CAMPAIGN_IDs>&reportType=<TYPE>&drilldown=<TYPE>&limit=<No_OF_ROWS>&offset=<STARTING_ROW_NUMBER>


Note:

1) The 'Optimizer Reports' can be rendered only for 5 times a minute.

2) campaignIds are json encoded array

3) Optimizer data is only available for last 7 days.

4) Available report types are:

Type Description
hour Summary by campaign by Hour
os Summary by Campaign by Os version
device Summary by Campaign by Device/Phone mode
manufacturer Summary by Campaign by Manufacturer
carrier Summary by Campaign by Carrier
country Summary by Campaign by Country
state Summary by Campaign by State
publisher Summary by Campaign by Pub Id
application Summary by Campaign by Application
creative Summary by Campaign by Creatives
connection_type Summary by Campaign by Connection Type
landing_page Summary by Campaign by Creatives Multiple Url

Response Format:

{
   {
   "41365": [
       {
           "carrier": "ABC",
           "push": "123",
           "click": "23",
           "ctr": 4.06,
           "cpc": 0.03,
           "conversion": "0.5",
           "conversionrate": 0,
           "carriername": "ABC",
           "cpa": 1.68
       },
  {
   .......
  }
}

Note for ALL reports

Following are the formats of the response fields:

Field Name Definitaion Format
ctr click through rate %
conversionrate Conversion rate %
cost Cost $
spent Spent $
costperconv Cost per Conversion $
dailybudget Daily Budget $
currentBid Current Bid $
cpi Cost per impression $
cpv Cost per view $
cpm cost per 1000 impressions $
cpc Cost per click $
cpa Cost per action $

Error Codes

Error Code Error Messages
3001 No parameters Received
3002 Start Date Cannot be left empty
3003 End Date Cannot be left empty
3004 Incorrect Date Format
3005 End date cannot be less that start date
3007 User does not exist
3008 This campaign does not belong to this user
3009 Invalid Input Parameter
3010 No Data Found
3011 Invalid start date
3012 Invalid end date
3013 You can view data only for last 7 days
3014 Invalid Date Format

Support Information

For any queries, please Contact us.

Personal tools
Namespaces

Variants
Actions
Toolbox