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

# Getting reports

Adfox provides ready-to-use `fixed` reports for all partners. If you need specific data, you can also use the report builder to design and save your own `custom` reports right in the interface.

Generating a report involves several steps.

{% list tabs %}

- Fixed and custom reports

  If the report is saved as `fixed` or `custom`:

  1. Request a list of reports:

     ```http id="n2r5qw"
     GET /api/v2/reports/list
     ```

  1. Retrieve report parameters (only available for `custom` reports; it won't return a field list for `fixed` reports):

     ```http
     GET /api/v2/reports/report-info/{reportName}
     ```

  1. Select the report period:

     ```http
     GET /available-dates
     ```

  1. Send a request to generate the report and save `result.taskId`:

     ```http
     POST /api/v2/reports/{reportName}
     ```

- Generate a report via API

  1. Retrieve and cache the lists `dimensions`, `metrics`, `filters`, and `limits`:

     ```http
     GET /metadata
     ```

  1. If needed, retrieve the allowed date range for the report:

     ```http
     GET /available-dates
     ```

  1. Send a request with a valid body and save `result.taskId`:

     ```http
     POST /reports
     ```

{% endlist %}

Next:

1. Poll the endpoint until you receive one of the following statuses:

   * `SUCCESS`
   * `FAILURE`
   * `EXPIRED`

    ```http id="c7z4nt"
    GET /reports/{taskId}
    ```

2. Set a timeout before retrying the request.

3. When the status is `SUCCESS`, retrieve the report results:

   ```http id="v0l3jd"
   GET /reports/{taskId}/result
   ```
