Reporting Metrics

Pull a spend report

Columns of a row by group_by, besides date (absent with granularity=totals-daily) and the requested metrics:

group_byColumns
appapp_id, name, icon_url, platform, bundle_id, store_id
channelad_network_id, name, icon_url, short_id, custom
campaigncampaign_id, name, icon_url, the app columns (app_id, app_name, app_icon_url, platform, bundle_id, store_id) and the channel columns (ad_network_id, ad_network_name, ad_network_icon_url)
creativecreative_id, name, remote_creative_id, the app columns and the channel columns
countrycountry, name
sitesite_id, name
channel,appad_network_id, app_id, the app columns and the channel columns
channel,app,countrythe channel,app columns and country
campaign,countrythe campaign columns and country
any other combinationname: the ids joined with -, and the id column of each value with its columns: for app, the app columns; for channel, ad_network_name, ad_network_icon_url, ad_network_short_id, ad_network_custom; for campaign, campaign_name, campaign_icon_url, the app columns and the channel columns; for creative, creative_name, remote_creative_id, the app columns and the channel columns

A group_by with campaign or creative leaves out channel and app, which they determine: channel,campaign returns the campaign columns.

get/v2/reports/spend

Request

  • Base URL
    https://api.tenjin.com
  • Auth
    HTTP bearer

Query parameters

start_datestring date
Example:2026-09-01

First day to include, YYYY-MM-DD. Defaults to 30 days before today

end_datestring date
Example:2026-09-30

Last day to include, YYYY-MM-DD. Defaults to today

app_idsstring[]

Ids of the apps to report on, comma-separated; all accessible apps when blank

[
  "5ca0d40e-a595-430d-bb99-e188ee10d291"
]
channel_idsinteger[]

Ids of the channels to report on, comma-separated; all channels when blank

[
  3
]
granularity'daily' | 'weekly' | 'monthly' | 'totals-daily'

Period of each row. With totals-daily, one row covers the whole date range

metricsstring[]

Metrics to report, comma-separated: any of the Metric Definitions and the organization's z_ custom metrics

[
  "spend",
  "installs",
  "cpi"
]
metric_filtersstring[]

Keep only rows where every filter holds. A filter is metric:op:value; op is gt, gte, lt, lte or eq

omit_blank_rowsboolean

Drop rows where every requested metric is zero or null

ad_network_idsinteger

Deprecated: use channel_ids. One ad network id, or several as ad_network_ids[]; ignored when channel_ids is sent

platformsstring

Ignored; returned unchanged in meta.platforms

campaign_idsstring

Ignored; returned unchanged in meta.campaign_ids

cohort_strategystring

RELATIVE or ABSOLUTE, in any case; defaults to the user's cohort strategy setting

countriesstring[]

Keep only these countries: two-letter country codes such as US, and UN for an unknown country

[
  "US",
  "JP"
]
group_bystring[]

Dimensions to group the rows by, comma-separated; any combination of them

[
  "channel",
  "app"
]
pageinteger

Page of results to fetch.

per_pageinteger

Number of results to return per page.

Response

The report

Example response

{
  "data": [
    {
      "attributes": {
        "date": "2026-09-01",
        "name": "My Game",
        "short_id": "facebook",
        "app_name": "My Game",
        "platform": "ios",
        "bundle_id": "com.example.mygame",
        "store_id": "655745678",
        "ad_network_id": 3,
        "ad_network_name": "Facebook",
        "ad_network_short_id": "facebook",
        "campaign_name": "Facebook Campaign",
        "creative_name": "Summer video 15s",
        "remote_creative_id": "23851234567890999",
        "country": "US"
      }
    }
  ],
  "meta": {
    "per_page": 100,
    "granularity": "daily"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.