---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.1
alternate:
  - https://yandex.com/dev/adfox/doc/en/statistics/how-to.md
  - https://yandex.com/dev/adfox/doc/ru/statistics/how-to.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/adfox/doc/en/llms.txt

# Generate the report

## How to generate a report {#how-to}

1. To access the Statistics API, use the token that you received for the Adfox API. If you don't have a token yet, [get one](https://yandex.com/dev/adfox/doc/en/v.1/authorization.md#token).
    
1. Pass your OAuth token in the `Authorization` HTTP header with each request. 

    ```no-highlight
    curl -H 'Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037' https://adfox.yandex.com/api/report/list/owner
    ```
    
1. Select [how detailed you want the report to be](#level) in the chapter below. Using [methods](https://yandex.com/dev/adfox/doc/en/statistics/methods.md), find out what reports are available for the selected level of detail, which arguments must be passed to get the report, and the possible periods for generating the report. You can find the full list of arguments in [Arguments for building a report](#arguments).

1. Execute a [request](https://yandex.com/dev/adfox/doc/en/statistics/methods/report-request.md) to generate a report. No more than 3 reports can be processed at the same time.
    
1. Execute a [request](https://yandex.com/dev/adfox/doc/en/statistics/methods/get-report.md) to receive the report. If the report isn't ready yet, you'll get its status in the response.

## Level of detail {#level}

<!-- source: en/_includes/statistics.md -->
Available levels of detail:

- `owner`: A general report.
- `supercampaign`: At the supercampaign level.
- `campaign`: At the campaign level.
- `banner`: At the banner level.
- `site`: At the site level.
- `section`: At the section level.
- `place`: At the placement level.
<!-- endsource: en/_includes/statistics.md -->

## Arguments for building a report {#arguments}

All possible arguments for building reports are listed below. Depending on the selected report, a specific set of arguments needs to be passed in the request. To find out which arguments are required for the selected report, use the [method](https://yandex.com/dev/adfox/doc/en/statistics/methods/report-arguments.md).

- `supercampaignId`: The supercampaign ID.
- `campaignId`: The campaign ID.
- `bannerId`: The banner ID.
- `sideId`: The site ID.
- `sectionID`: The section ID.
- `placeId`: The placement ID.
- `categoryID`: The category ID.
- `criteriaId`: The user metric ID.
- `criteria2Id`: The user metric ID.
- `name`: The report name.
- `dateFrom`: The start date of the reporting period, `YYYY-MM-DD`.
- `dateTo`: The end date of the reporting period, `YYYY-MM-DD`.
- `day`: The day that the report is necessary for, `YYYY-MM-DD`.
- `ownerId`: The account owner ID. The argument is only available to placement owners and advertisers.


{% note info %}

To build a report on multiple objects, pass the list of IDs as a JSON array. For example, for sites: `siteId=[1,2,3]`.

{% endnote %}
