Hi Estanislao,
Thanks for reaching out to the Google Ads API Forum.
I have checked your account and found the changes reflected in the field ‘lastChangeDateTime’ is "2022-03-25 05:12:44.063399". That said, you may try below GAQL to get said record in Google Ads API:
SELECT change_status.campaign, change_status.last_change_date_time, change_status.resource_status, change_status.resource_type, change_status.ad_group, change_status.ad_group_ad, change_status.ad_group_bid_modifier, change_status.ad_group_criterion, change_status.ad_group_feed, change_status.campaign, change_status.campaign_criterion, change_status.campaign_feed, change_status.feed, change_status.feed_item FROM change_status WHERE change_status.last_change_date_time >= \'2022-03-23\' AND change_status.last_change_date_time <= \'2022-03-26\' AND change_status.campaign = \'customers/8945945860/campaigns/1669008391\' ORDER BY change_status.resource_type LIMIT 10000
Let me know if you still don’t see said change with above query.
Also, I had to delete your post as posting complete log information on the forum is not recommended. You may refer to the more redacted below:
“Hello,
I'm trying to replicate the behaviour to getAccountChanges from AdWords API in Google Ads API but it seems there're some differences. For example, I'm getting changes in AdWords for an Ad and not getting any changes in GoogleAds. This change is later retrieved if you repeat the same request the following day. Is this delay in getting changes expected? I'll paste both requests here (without the clientCustomerId):
AdWords API request:
***********
SOAP response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ns2:ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/ch/v201809">
<requestId>0005db0d0b513dbe0803819470023da6</requestId>
<serviceName>CustomerSyncService</serviceName>
<methodName>get</methodName>
<operations>1</operations>
<responseTime>147</responseTime>
</ns2:ResponseHeader>
</soap:Header>
<soap:Body>
<ns2:getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/ch/v201809">
<ns2:rval>
<ns2:changedCampaigns>
<ns2:campaignId>1669008391</ns2:campaignId>
<ns2:campaignChangeStatus>FIELDS_UNCHANGED</ns2:campaignChangeStatus>
<ns2:changedAdGroups>
<ns2:adGroupId>66118514298</ns2:adGroupId>
<ns2:adGroupChangeStatus>FIELDS_UNCHANGED</ns2:adGroupChangeStatus>
<ns2:changedAds>323051597968</ns2:changedAds>
</ns2:changedAdGroups>
</ns2:changedCampaigns>
<ns2:lastChangeTimestamp>20220325 081316 PST8PDT</ns2:lastChangeTimestamp>
</ns2:rval>
</ns2:getResponse>
</soap:Body>
</soap:Envelope>
Google Ads API request:
Request
-------
MethodName: google.ads.googleads.v10.services.GoogleAdsService/Search
query: "SELECT change_status.campaign, change_status.last_change_date_time, change_status.resource_status, change_status.resource_type, change_status.ad_group, change_status.ad_group_ad, change_status.ad_group_bid_modifier, change_status.ad_group_criterion, change_status.ad_group_feed, change_status.campaign, change_status.campaign_criterion, change_status.campaign_feed, change_status.feed, change_status.feed_item FROM change_status WHERE change_status.last_change_date_time >= \'2022-03-23\' AND change_status.last_change_date_time <= \'2022-03-25\' AND change_status.campaign = \'customers/XXXXX/campaigns/1669008391\' ORDER BY change_status.resource_type LIMIT 10000"
Response
--------
Headers: Metadata(content-disposition=attachment,content-type=application/grpc,request-id=ZP_bm6wqUHzDyP65DiI8Qw,date=Fri, 25 Mar 2022 17:07:39 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: field_mask {
paths: "change_status.campaign"
paths: "change_status.last_change_date_time"
paths: "change_status.resource_status"
paths: "change_status.resource_type"
paths: "change_status.ad_group"
paths: "change_status.ad_group_ad"
paths: "change_status.ad_group_bid_modifier"
paths: "change_status.ad_group_criterion"
paths: "change_status.ad_group_feed"
paths: "change_status.campaign"
paths: "change_status.campaign_criterion"
paths: "change_status.campaign_feed"
paths: "change_status.feed"
paths: "change_status.feed_item"
}
Failure message: null
Status: Status{code=OK, description=null, cause=null}.
Thanks in advance,
Estanislao Ledesma
”
Regards,
|
||||||
|
||||||
Hi Estanislao,
In the Google Ads API, the field last_change_date_time is used for the time at which the most recent change has occurred on given resource. However, allow me to raise your request to my team. We will reach out to you once we have updates.
Regards,
|
||||||
|
||||||