Legacy Reporting API

1. 简介

Legacy Reporting API提供XML或者JSON格式的实时数据统计,比如点击,安装,转化和其他一些信息。

对于广告主 API默认返回所有打开状态的广告(Tapjoy批准的和广告打开的)。使用 all_offers=1 参数可以获得所有广告包括未打开状态的广告(请参考下面的参数介绍)。
对于开发者 API默认返回的数据包括开发者所有的用于Tapjoy广告的app id下的数据。通常app id用于根的广告id,即使根广告是关闭状态,也会有数据返回。

2. Legacy Reporting API密钥

请注意,这个密钥不同于Insights Reporting API密钥。

Legacy Reporting API密钥可以在Tapjoy 控制面板获得:

  • 点击顶部导航栏中 设置 - 应用设置
  • 在页面的底部 应用平台 – API 密钥 – 聚合平台密钥
  • 点击 API 密钥

可以看到 广告报告API密钥。这个就是 Legacy Reporting API密钥。

如果您使用的是Tapjoy 控制面板的V2版本,可以在如下链接中得到密钥 https://dashboard.tapjoy.com/reporting/api。 在这里,称作"Legacy Reporting API Key"。

如果您有任何问题,请联系Tapjoy客户经理或者技术支持

3. 请求和返回示例

根据请求URL不同,数据会以XML或者JSON格式返回。请参考参数 具体了解每个参数的用法。

XML请求和返回

https://api.tapjoy.com/reporting_data.xml?email=sample%40example.com&api_key=your_api_key&date=YYYY-MM-DD&page_size=50&page=2&timezone=0

Response:

<!--?xml version="1.0" encoding="UTF-8"?-->
  
    YYYY-MM-DD
    NUM
    NUM
    NUM
    NUM
    NUM
    
      App Name
      00000000-0000-0000-0000-000000000000
      http://offer-destination-url.com
      App Platform
      true
      VideoOffer
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0
      0
      0
      66d2dd3-1111-443a-1ac3-764111aaa88
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      0
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    

    ...

JSON请求和返回

https://api.tapjoy.com/reporting_data.json?email=sample%40example.com&api_key=your_api_key&date=YYYY-MM-DD&page_size=5&page=9&timezone=-5

Response:

{
    "Date" : "YYYY-MM-DD",
    "Timezone" : NUM,
    "TotalOffers" : NUM,
    "PageSize" : NUM,
    "TotalPages" : NUM,
    "CurrentPage" : NUM,
    "Apps" : [
      {
        "Name"                           : "App Name",
        "AppKey"                         : "00000000-0000-0000-0000-000000000000",
        "url"                            : "http://offer-destination-url.com",
        "Platform"                       : "App Platform",
        "Rewarded"                       : true,
        "OfferType"                      : "VideoOffer",
        "PaidInstalls"                   : 0,
        "PaidInstallsHourly"             : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "PaidClicks"                     : 0,
        "PaidClicksHourly"               : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "Spend"                          : 0,
        "SpendHourly"                    : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "Sessions"                       : 0,
        "SessionsHourly"                 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "NewUsers"                       : 0,
        "NewUsersHourly"                 : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "DailyActiveUsers"               : 0,
        "OfferwallRevenue"               : 0,
        "OfferwallRevenueHourly"         : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "OfferwallImpressions"           : 0,
        "OfferwallImpressionsHourly"     : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "OfferwallClicks"                : 0,
        "OfferwallClicksHourly"          : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "OfferwallConversions"           : 0,
        "OfferwallConversionsHourly"     : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "FeaturedOfferRevenue"           : 0,
        "FeaturedOfferRevenueHourly"     : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "FeaturedOfferImpressions"       : 0,
        "FeaturedOfferImpressionsHourly" : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "FeaturedOfferClicks"            : 0,
        "FeaturedOfferClicksHourly"      : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "FeaturedOfferConversions"       : 0,
        "FeaturedOfferConversionsHourly" : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "TJMOfferwallRevenue"            : 0,
        "TJMOfferwallRevenueHourly"      : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "TJMOfferwallImpressions"        : 0,
        "TJMOfferwallImpressionsHourly"  : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "TJMOfferwallClicks"             : 0,
        "TJMOfferwallClicksHourly"       : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "TJMOfferwallConversions"        : 0,
        "TJMOfferwallConversionsHourly"  : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "DirectPlayRevenue"              : 0,
        "DirectPlayRevenueHourly"        : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "DirectPlayImpressions"          : 0,
        "DirectPlayImpressionsHourly"    : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "DirectPlayClicks"               : 0,
        "DirectPlayClicksHourly"         : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "DirectPlayConversions"          : 0,
        "DirectPlayConversionsHourly"    : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "Ecpa"                           : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "EcpaAggregate"                  : 0,
        "EcpaGoal"                       : 0,
        "SecondaryConversions"           : 0,
        "SecondaryConversionsHourly"     : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "SecondaryOfferItemId"          : "000000-0000-0000-0000-00000000000",
        "Event_A_Revenue"                : 0,
        "Event_A_RevenueHourly"          : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "Event_A_Impressions"            : 0,
        "Event_A_ImpressionsHourly"      : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "Event_A_Clicks"                 : 0,
        "Event_A_ClicksHourly"           : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        "Event_A_Conversions"            : 0,
        "Event_A_ConversionsHourly"      : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
      },

      ...

    ]
  }

4. 请求参数

名称描述
emailsample@example.comurl-encoded email和账户API Key对应的邮箱 — **required**
api_keye.g. "1ceb9db808404321b2dbc1e88cbef9cf"Legacy Reporting API密钥 — **required**
datee.g. YYYY-MM-DD获取数据的日期 — **required**
pagee.g. 3当返回数据包括多页数据时,根据页码可以请求具体某一页的数据。默认情况下是如果广告数目大于page_size, 会返回第一页数据.
page_sizee.g. 50每一页数据包括广告的数目。默认值为50。
all_offers1返回所有广告数据,包括打开和关闭的。 — **没有这个参数, 只返回打开状态下的广告数据**
timezonee.g. 0基于GMT的时区偏移。默认是账户设置的时区。

5. 附加说明

A. 请求频率限制

在一分钟之内最多请求一次。

B. 时区

除非在请求URL中指定时区,否则数据将会根据您账户设置的时区返回数据。时区参数要求以UTC时区以小时单位(比如 ‘timezone=-8’ 是太平洋时间)或以秒为单位(比如 ‘timezone=-28800’ 是太平洋时间)偏移。每个返回都包括时区,您可以根据这个值来确定数据的时区。

C. 页码

每页每次最多返回100条广告数据。为了看到全部广告,提供了page参数。每个返回数据中都包括 "TotalOffers", "PageSize", "TotalPages", and "CurrentPage",这样可以得到所有广告数据。