---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.2
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/CreateOfflineReport.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/CreateOfflineReport.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# CreateOfflineReport (Live)
Generates a report about dynamic text ads on the server.

{% note alert %}

Disabled method. Use version 5 of the API.

{% endnote %}


Steps for getting a report:

1. To generate a report, call the [CreateOfflineReport (Live)](https://yandex.com/dev/direct/doc/dg-v4/en/live/CreateOfflineReport.md) method.
    
    The method returns the ID of the future report.
    
    For a single user, no more than five reports are stored on the server. On an attempt to create a sixth report, an error message is returned with error code 31. Reports are stored on the server for three months, then deleted automatically. Use the [DeleteOfflineReport (Live)](https://yandex.com/dev/direct/doc/dg-v4/en/live/DeleteOfflineReport.md) method to delete a report manually.
    
1. Periodically call the [GetOfflineReportList (Live)](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetOfflineReportList.md) method and check for the report's availability using its ID.
1. When the report is ready, download the report file from the link returned by the [GetOfflineReportList (Live)](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetOfflineReportList.md) method.


## Input data {#input}

The input data structure in JSON is shown below.

```javascript
{
   "method": "CreateOfflineReport",
   "param": {
      /* CreateOfflineReportRequest */
      "Type": (string),
      "CampaignIds": [
         (int)
         ...
      ],
      "StartDate": (date),
      "EndDate": (date),
      "ImpressionsThreshold": (int),
      "ClicksThreshold": (int),
      "GroupByDate": (string),
      "FieldNames": [
         (string)
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >CreateOfflineReportRequest object</sub>**
||
||
`Type`
|
Type of campaigns that the report is being generated for.

Only the value dynamic_text_ad is allowed.
|
Yes
||
||
`CampaignIds`
|
Array of campaign IDs that the report is being generated for (maximum of 2).

Only campaigns with the “Dynamic text ads” type are allowed. Otherwise, an error is returned.
|
Yes
||
||
`StartDate`
|
The start date of the report, `YYYY-MM-DD`. The report period must not start more than 3 months from the current date.
|
Yes
||
||
`EndDate`
|
The end date of the report, `YYYY-MM-DD`.
|
Yes
||
||
`ImpressionsThreshold`
|
Threshold for the number of impressions: the report will only show rows with a number of impressions at the specified threshold or higher.

The minimum value is 10.
|
No
||
||
`ClicksThreshold`
|
Threshold for the number of clicks: the report will only show rows with a number of clicks at the specified threshold or higher.

The minimum value is 1.


{% note info %}

If the `ClicksThreshold` and `ImpressionsThreshold` parameters are set simultaneously, the report will have rows where at least one of the thresholds is met.

{% endnote %}
|
No
||
||
`GroupByDate`
|
Calculate cumulative statistics by time period:

- day — By the day (default value).
- week — By the week.
- month — By the month.
|
No
||
||
`FieldNames`
|
Names of columns to show in the report. For the list of columns, see the description of the [GetOfflineReportList (Live)](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetOfflineReportList.md) method in the [Sample report](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetOfflineReportList.md) section.
|
Yes
||
|#


## Output data {#output}

The method returns the ID of the report being generated, as shown in the following example.

```javascript
{
   "data": 1234567
}
```

For a description of the data output in the report, see the description of the[GetOfflineReportList (Live)](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetOfflineReportList.md) method in the [Sample report](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetOfflineReportList.md) section.

