If you're talking about AdWords API: don't assume anything.

I've been developing for AdWords API well over ten years, in those years 
the default behavior (= not including such conditions) changed at least 
seven times. In other words, if you didn't include a predicate on status, 
sometimes you got removed objects, sometimes not. Sometimes those changes 
in behavior were announced, sometimes not. Every time Google's response was 
that the new situation was the right situation.

You ask if it's mandatory to include such conditions. Of course not, but 
prepare yourself for surprises every now and then.
Personally I started to include conditions for every status field in every 
report type long time ago. I never regretted that decision.

If your question is on Google Ads API, I don't know if Google will be 
creating the same mess. If you don't like to take risks there, consider to 
include the WHERE conditions anyway. Don't forget that Google Ads API 
expects every one of those fields to be present in the select list as well.



On Tuesday, April 28, 2020 at 12:50:30 PM UTC+2, Pavel G wrote:
>
> Hi,
>
> We need to fetch report that contains the fields we need, but with all 
> statuses of AdGroupStatus and CampaignStatus fields. 
>
> In this forum I found suggestions that I need to add the following code to 
> my request:
> WHERE AdGroupStatus IN ['ENABLED','PAUSED','REMOVED'] AND CampaignStatus 
> IN ['ENABLED','PAUSED','REMOVED']
>
> But after some tests I got results with CampaignStatus == 'REMOVED'.without 
> this condition. The following *curls* return the same results with 5 rows 
> for me (their CampaignStatus is 'REMOVED'):
>
> curl --http1.1 \
>     --header "Authorization : Bearer {token}" \
>     --header "developerToken : {developerToken}" \
>     --header "includeZeroImpressions: false" \
>     --header "clientCustomerId : {clientCustomerId}" \
>     --data "__rdquery=SELECT Impressions, AdNetworkType1, Conversions, 
> EffectiveFinalUrl, CampaignId, Device, CampaignName, Clicks, VideoViews, 
> Cost, Date, InteractionTypes, AdGroupStatus FROM FINAL_URL_REPORT WHERE 
> CampaignId={CampaignId} *AND *
> *CampaignStatus IN ['ENABLED','PAUSED','REMOVED']* 
> DURING+20190708,20190708&__fmt=CSV" \
>     https://adwords.google.com/api/adwords/reportdownload/v201809
>
> <http://adwords.google.com/api/adwords/reportdownload/v201809>
> curl --http1.1 \
>     --header "Authorization : Bearer {token}" \
>     --header "developerToken : {developerToken}" \
>     --header "includeZeroImpressions: false" \
>     --header "clientCustomerId : {clientCustomerId}" \
>     --data "__rdquery=SELECT Impressions, AdNetworkType1, Conversions, 
> EffectiveFinalUrl, CampaignId, Device, CampaignName, Clicks, VideoViews, 
> Cost, Date, InteractionTypes, AdGroupStatus FROM FINAL_URL_REPORT WHERE 
> CampaignId={CampaignId} DURING+20190708,20190708&__fmt=CSV" \
>     https://adwords.google.com/api/adwords/reportdownload/v201809
>
> The only difference is that the second *curl* have no CampaignStatus IN [
> 'ENABLED','PAUSED','REMOVED'] condition.
> My question is it *mandatory* to have this WHERE condition if we want to 
> fetch report with all statuses of AdGroupStatus and CampaignStatus, or may 
> be it is *mandatory* for only some types of reports? Do you have any 
> information about this in you documentation?
>
> Thanks in advance.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a3b09442-7d4b-4ef8-8094-d237a7bca9f4%40googlegroups.com.

Reply via email to