I've noticed that, in general, the Adhoc reporting returns a 400 response with the error message in the body when I ask it to do something silly (like ask for a report on an MCC Customer).
This behaviour is, however, inconsistent, as you can post a report definition with an incorrect dateRangeType and you get a 200 response with an error message in the body. Is this expected behaviour? At the moment I'm checking the response type to see if the report was successful, but I'd rather check the status code. Here's an example session (with the auth value removed) POST /api/adwords/reportdownload/v201109 HTTP/1.1 Content-Length: 633 Accept-Encoding: gzip clientCustomerId: 3515467822 Host: adwords.google.com User-Agent: python-requests.org Connection: close Content-Type: application/x-www-form-urlencoded Authorization: GoogleLogin auth=*...* __rdxml=%3CreportDefinition%3E%3Cselector%3E%3Cfields%3ECriteria%3C%2Ffields%3E%3Cfields%3ECriteriaType%3C%2Ffields%3E%3Cfields%3EDate%3C%2Ffields%3E%3Cfields%3ECampaignName%3C%2Ffields%3E%3Cfields%3EClicks%3C%2Ffields%3E%3Cfields%3EImpressions%3C%2Ffields%3E%3CdateRange%3E%3Cmin%3E20111020%3C%2Fmin%3E%3Cmax%3E20111020%3C%2Fmax%3E%3C%2FdateRange%3E%3C%2Fselector%3E%3CreportName%3Etest7f90d890-ec3b-459a-813d-87a9aaf068a7%3C%2FreportName%3E%3CreportType%3ECRITERIA_PERFORMANCE_REPORT%3C%2FreportType%3E%3CdateRangeType%3E *CUSTOM_DATE_RANGE* %3C%2FdateRangeType%3E%3CdownloadFormat%3ECSV%3C%2FdownloadFormat%3E%3C%2FreportDefinition%3E *HTTP/1.1 200 OK* Content-Type: text/html; charset=UTF-8 Date: Fri, 21 Oct 2011 14:56:44 GMT Expires: Fri, 21 Oct 2011 14:56:44 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Connection: close !!!2|||-1|||Improperly formatted report request??? The decoded report definition is: <reportDefinition> <selector> <fields>Criteria</fields> <fields>CriteriaType </fields> <fields>Date</fields> <fields>CampaignName</fields> <fields>Clicks </fields> <fields>Impressions</fields> <dateRange> <min>20111020</min> <max> 20111020</max> </dateRange> </selector> <reportName> test7f90d890-ec3b-459a-813d-87a9aaf068a7</reportName> <reportType> CRITERIA_PERFORMANCE_REPORT</reportType> <dateRangeType>*CUSTOM_DATE_RANGE* </dateRangeType> <downloadFormat>CSV</downloadFormat> </reportDefinition> -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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