E
E
Evgeny Shevtsov2018-03-19 16:01:57
PHP
Evgeny Shevtsov, 2018-03-19 16:01:57

What is wrong with the yandex direct report request?

I create report parameters.

$params = [
      "params" => [
        "SelectionCriteria" => [
          "DateFrom" => "$date[0]",
          "DateTo" => "$date[1]",							 			
          "Filter" => [ 
            "Field" => "CampaignId",  
            "Operator" =>  "IN" , 
            "Values" =>  ["*******"]
          ]
        ],
        
        "FieldNames" => ["Date", "CampaignName", "LocationOfPresenceName", "Impressions", "Clicks", "Cost"],
        "ReportName" => "НАЗВАНИЕ_ОТЧЕТА",
        "ReportType" => "CAMPAIGN_PERFORMANCE_REPORT",
        "DateRangeType" => "CUSTOM_DATE",
        "Format" => "TSV",
        "IncludeVAT" => "NO",
        "IncludeDiscount" => "NO"
      ]
    ];

In response, the error - "Filter must contain an array" .. It
seems that the array contains

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2018-03-19
@Rattlesneyk

Apparently he wants to.

"Filter" => [
          [ 
            "Field" => "CampaignId",  
            "Operator" =>  "IN" , 
            "Values" =>  ["*******"]
          ]
          ]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question