---
title: "Pull an ad revenue report"
method: GET
path: "/v2/reports/ad_revenue"
tags: ["Reporting Metrics"]
---

# Pull an ad revenue report

`GET /v2/reports/ad_revenue`

## Request

- Base URL: `https://api.tenjin.com`
- URL: `https://api.tenjin.com/v2/reports/ad_revenue`
- Auth: HTTP bearer

Columns of a row by group_by, besides `date` (absent with `granularity=totals-daily`) and the requested metrics. A combination has the columns of each of its values.

| group_by | Columns |
| --- | --- |
| `app` | `app_id`, `app_name`, `app_icon_url`, `platform`, `bundle_id`, `store_id` |
| `channel` | `ad_network_id`, `ad_network_name`, `ad_network_icon_url`, `ad_network_short_id`, `ad_network_custom` |
| `country` | `country_name` (the ISO country code) |
| `ad_placement` | `ad_placement_id`, `ad_placement_name`, the `app` columns and the `channel` columns |

## Query parameters

- `start_date` string, date
- `end_date` string, date
- `app_ids` string[]
- `channel_ids` integer[]
- `granularity` 'daily' | 'weekly' | 'monthly' | 'totals-daily'
- `metrics` string[]
- `metric_filters` string[]
- `omit_blank_rows` boolean
- `ad_network_ids` integer
- `platforms` string
- `countries` string[]
- `group_by` string[]
- `page` integer
- `per_page` integer

## Response `200`

The report

- AdRevenueReportDocument
  - `data` AdRevenueReportResource[], required
    - `id` string, required
    - `type` 'report', required
    - `attributes` object, required: The dimension columns of the group_by, and the requested metrics; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#ad_revenue)
      - `date` string, date: First day of the period; absent with granularity=totals-daily
      - `app_id` string, uuid, nullable: Id of the app. Group by app or ad_placement
      - `app_name` string, nullable: Name of the app. Group by app or ad_placement
      - `app_icon_url` string, nullable: Icon URL of the app. Group by app or ad_placement
      - `platform` 'amazon' | 'android' | 'android_other' | 'ios' | 'windows' | 'unspecified' | 'null', nullable: Platform of the app. Group by app or ad_placement
      - `bundle_id` string, nullable: Bundle id of the app in its store. Group by app or ad_placement
      - `store_id` string, nullable: Id of the app in its store. Group by app or ad_placement
      - `ad_network_id` integer, nullable: Id of the channel. Group by channel or ad_placement
      - `ad_network_name` string, nullable: Name of the channel. Group by channel or ad_placement
      - `ad_network_icon_url` string, nullable: Icon URL of the channel. Group by channel or ad_placement
      - `ad_network_short_id` string, nullable: URL-safe id of the channel. Group by channel or ad_placement
      - `ad_network_custom` boolean: Whether the channel is a custom one. Group by channel or ad_placement
      - `country_name` string: ISO country code, despite the name. Group by country
      - `ad_placement_id` string, uuid: Id of the ad placement. Group by ad_placement
      - `ad_placement_name` string, nullable: Name of the ad placement. Group by ad_placement
      - `ad_revenue` number, double, nullable: Ad Revenue. When requested
      - `clicks` number, double, nullable: Clicks. When requested
      - `impressions` number, double, nullable: Impressions. When requested
      - `ecpm` number, double, nullable: eCPM. When requested
      - `ecpc` number, double, nullable: eCPC. When requested
  - `links` Links, required
    - `self` string, uri, required: URL of this request
    - `first` string, uri: URL of the first page of a list
    - `prev` string, uri: URL of the previous page of a list
    - `next` string, uri: URL of the next page of a list
    - `last` string, uri: URL of the last page of a list
  - `meta` AdRevenueReportMeta, required
    - `count` integer, required: Number of rows on all pages
    - `per_page` integer, required: Number of rows per page
    - `start_date` string, date, required: The start_date param, or its default
    - `end_date` string, date, required: The end_date param, or its default
    - `metrics` string[], required: The requested metrics
    - `organization_id` string, uuid, required: Id of your organization
    - `app_ids` string[], required: The app_ids param
    - `granularity` 'daily' | 'weekly' | 'monthly' | 'totals-daily', required: The granularity param, or its default
    - `group_by` string[], required: Internal dimension names
    - `countries` string[], required: The countries param
    - `platforms` string[], required: The deprecated platforms param as sent; empty when not sent
    - `ad_network_ids` union, required: The channel_ids param, or the deprecated ad_network_ids param as an array of strings
      - integer[]
      - string[]

## Other responses

- `400`: A param is missing or invalid, a record is not found, or the request cannot be served
- `401`: Missing or invalid credentials, or no access to the requested data
- `403`: Invalid token, or the user's role does not allow the request
- `429`: More than 100 report requests in a minute with one access token
- `498`: Expired token, or a token with an invalid signature

---

[API](https://skmtc.dev/tenjin/apis/reporting-metrics-api.md) - [All operations](https://skmtc.dev/tenjin/apis/reporting-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tenjin/apis/reporting-metrics-api/revisions/cffd908625be?raw)
