CreateOfflineReport (Live)

Generates a report about dynamic text ads on the server.

Attention. Disabled method. Use version 5 of the API.

Steps for getting a report:

  1. To generate a report, call the CreateOfflineReport (Live) 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) method to delete a report manually.

  2. Periodically call the GetOfflineReportList (Live) method and check for the report's availability using its ID.
  3. When the report is ready, download the report file from the link returned by the GetOfflineReportList (Live) method.

Input data

The input data structure in JSON is shown below.

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

Parameters are described below.

ParameterDescriptionRequired
CreateOfflineReportRequest object
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
StartDateThe start date of the report, YYYY-MM-DD. The report period must not start more than 3 months from the current date.Yes
EndDateThe 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. If the ClicksThreshold and ImpressionsThreshold parameters are set simultaneously, the report will have rows where at least one of the thresholds is met.
No
GroupByDate

Calculate cumulative statistics by time period:

  • day — By the day (default value).
  • week — By the week.
  • month — By the month.
No
FieldNamesNames of columns to show in the report. For the list of columns, see the description of the GetOfflineReportList (Live) method in the Sample report section.Yes

Output data

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

{
   "data": 1234567
}

For a description of the data output in the report, see the description of theGetOfflineReportList (Live) method in the Sample report section.