When I add a date range, it seems to work. However, I don't want it to be dependent on the date range as I'm only interested in the structure of the account.
$this->report_definition->setDateRangeType(ReportDefinitionDateRangeType::TODAY); > On Thursday, 6 July 2017 15:50:53 UTC-7, Danny wrote: > > Hi > > I'm trying to make a call on the CRITERIA_PERFORMANCE_REPORT > and AD_PERFORMANCE_REPORT report, but I keep getting this error, > > [Google\AdsApi\AdWords\v201609\cm\ApiException] >> Details: [fieldPath: ; trigger: Invalid ReportDefinition Xml: >> cvc-complex-type.2.4.b: The content of element 'reportDefinition' is not >> complete. One of '{"https://adwords.goo >> gle.com/api/adwords/cm/v201609":dateRangeType}' is expected.; >> errorString: ReportDownloadError.INVALID_REPORT_DEFINITION_XML] > > > These are my request headers and response, > > [2017-07-06 22:24:04] AW_REPORT_DOWNLOADER.NOTICE: >>>>>>>> >> POST /api/adwords/reportdownload/v201609 HTTP/1.1 >> Authorization: REDACTED >> User-Agent: GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.1.0-2+deb.sury.org >> ~xenial+1 >> Content-Type: application/x-www-form-urlencoded >> Host: adwords.google.com >> developerToken: XXXXXXXXXX // this has been masked >> clientCustomerId: XXXXXXXXXX // this has been masked >> skipReportHeader: false >> skipColumnHeader: false >> skipReportSummary: false >> useRawEnumValues: false >> includeZeroImpressions: true >> __rdxml=<?xml version="1.0"?> >> <reportDefinition><selector><fields>AdGroupId</fields><fields>AdGroupName</fields><fields>AdGroupStatus</fields><fields>CampaignId</fields><fields>CampaignName</fields><fields>CampaignStatus</fields><fields>Criteria</fields><fields>CriteriaType</fields><fields>FinalUrls</fields><fields>CustomerDescriptiveName</fields><fields>ExternalCustomerId</fields><predicates><field>AdGroupStatus</field><operator>IN</operator><values>ENABLED</values></predicates><predicates><field>CampaignStatus</field><operator>IN</operator><values>ENABLED</values></predicates><predicates><field>FinalUrls</field><operator>NOT_EQUALS</operator><values></values></predicates></selector><reportName>Criteria >> >> Performance Report >> #595eb884247f4</reportName><reportType>CRITERIA_PERFORMANCE_REPORT</reportType></reportDefinition> >> <<<<<<<< >> HTTP/1.1 400 Bad Request >> Content-Type: text/xml >> Date: Thu, 06 Jul 2017 22:24:04 GMT >> Expires: Thu, 06 Jul 2017 22:24:04 GMT >> Cache-Control: private, max-age=0 >> X-Content-Type-Options: nosniff >> X-Frame-Options: SAMEORIGIN >> X-XSS-Protection: 1; mode=block >> Server: GSE >> Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,36,35" >> Accept-Ranges: none >> Vary: Accept-Encoding >> Connection: close >> >> -------- >> Client error: `POST >> https://adwords.google.com/api/adwords/reportdownload/v201609` >> <https://adwords.google.com/api/adwords/reportdownload/v201609> resulted >> in a `400 Bad Request` response > > > After reading > https://developers.google.com/adwords/api/docs/guides/zeroimpression-structure-reports#structure_reports, > > I believe that: > > - All my selector fields are attributes > - All my predicate fields are attributes > - includeZeroImpressions is set to true in header > - My request doesn't include any date range > > Not quite sure what's the problem? > > What I'm trying to do is essentially get the structure of keywords and ads > of the account. Also, which report should I be using to get sitelinks > structure? > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/f913bb77-c97a-4d1d-8442-ca3b129b4bb7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.