K
K
ksandr_maykop2017-06-27 20:56:26
PHP
ksandr_maykop, 2017-06-27 20:56:26

Why does the Yandex Direct API (Sandbox) ignore filtering in statistics queries?

Requesting statistics in the Yandex Direct sandbox for an ad using a filter. In response, I receive a report on several ads. Thus, the API completely ignores filtering.

function custom_report(  ) {
  $service = "reports";

  $data ='<?xml version="1.0" encoding="UTF-8"?>
    <ReportDefinition xmlns="http://api.direct.yandex.com/v5/reports">
    	<SelectionCriteria>
    		<Filter>
    		        <b><Field>AdId</Field>
    	 	        <Operator>IN</Operator>
    			<Values>2195250</Values></b>	
    		</Filter>
    	</SelectionCriteria>
    	<FieldNames>Date</FieldNames>
  <FieldNames>AdId</FieldNames>
  <FieldNames>AvgCpc</FieldNames>
  <FieldNames>AvgPageviews</FieldNames>
    	<OrderBy>
    		<Field>Date</Field>
    	</OrderBy>
    	<ReportName>123123123adasdasd12</ReportName>
    	<ReportType>AD_PERFORMANCE_REPORT</ReportType>
    	<DateRangeType>LAST_5_DAYS</DateRangeType>
    	<Format>TSV</Format>
    	<IncludeVAT>NO</IncludeVAT>
    	<IncludeDiscount>NO</IncludeDiscount>
    </ReportDefinition>';
   
return QueryToYandexReport( $service, $data );
}

APIAN API:
2017-06-22 2189263 0.64 3.04
2017-06-22 2189264 0.64 2.99
2017-06-22 2189265 0.62 3.00
2017-06-22 2189266 0.59 3.06
2017-06-22 2189267 0.62 3.04
.....

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yandex_Support, 2017-06-28
@Yandex_Support

Good afternoon!
Please write to the feedback form: https://tech.yandex.ru/direct/doc/support/troubles...
Responsible specialists will take your question to work and try to help.

W
web1nick, 2019-03-29
@web1nick

Has this issue been resolved or just write to support?
I have exactly the same problem, only request via JSON

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question