Запрос: спецификация отчета

Параметры отчета указываются в теле запроса в формате JSON или XML.

Структура параметров:

{
  "params" : { /* ReportDefinition */
    "SelectionCriteria": { /* SelectionCriteria */
      "DateFrom": (string),
      "DateTo": (string),
      "Filter": [{ /* FilterItem*/
        "Field": ( "AdGroupId" | ... | "Year" ),  /* required */
        "Operator": ( "EQUALS" | ... | "STARTS_WITH_IGNORE_CASE" ), /* required */
        "Values": [(string), ... ] /* required */
      }, ... ]
    }, /* required */
    "Goals": [(string), ... ],
    "AttributionModels": [( "FC" | "LC" | "LSC" | "LYDC" | "FCCD" | "LSCCD" | "LYDCCD" | "AUTO" ), ... ],
    "FieldNames": [( "AdGroupId" | ... | "Year" ), ... ],  /* required */
    "Page": { /* Page*/
      "Limit": (int) /* required */
      "Offset": (int)
    }
    "OrderBy": [{ /* OrderBy*/
      "Field": ( "AdGroupId" | ... | "Year" ),  /* required */
      "SortOrder": ( "ASCENDING" | "DESCENDING" )
    }, ... ],
    "ReportName": (string),  /* required */
    "ReportType": ( "ACCOUNT_PERFORMANCE_REPORT" | ... | "SEARCH_QUERY_PERFORMANCE_REPORT" ),  /* required */
    "DateRangeType": ( "ALL_TIME" | ... | "YESTERDAY" ),  /* required */
    "Format": ( "TSV" ),  /* required */
    "IncludeVAT": ( "YES" | "NO" ),  /* required */
    "IncludeDiscount": ( "YES" | "NO" ) 
  }
}