[PHP] Google Ads Api Beta. Problems with ExpandedTextAd Update

70 views
Skip to first unread message

Miguel Graciá

unread,
Feb 20, 2019, 2:11:33 PM2/20/19
to AdWords API and Google Ads API Forum

Hi,

I am trying the new api of google ads. I was able to create an ad in my test account with the help of the examples, but when I try to update the title, the api returns an error. The request, extracted from the log, is as follows:


{
   
"customerId": "[CUSTOMER_ID]",
   
"operations": [
       
{
           
"updateMask": "resourceName,ad.id,ad.finalUrls,ad.finalMobileUrls,ad.trackingUrlTemplate,ad.urlCustomParameters,ad.displayUrl,ad.type,ad.addedByGoogleAds,ad.devicePreference,ad.name,ad.textAd,ad.expandedTextAd.headlinePart1,ad.expandedTextAd.headlinePart2,ad.expandedTextAd.headlinePart3,ad.expandedTextAd.description,ad.expandedTextAd.description2,ad.expandedTextAd.path1,ad.expandedTextAd.path2,ad.dynamicSearchAd,ad.responsiveDisplayAd,ad.callOnlyAd,ad.expandedDynamicSearchAd,ad.hotelAd,ad.shoppingSmartAd,ad.shoppingProductAd,ad.gmailAd,ad.imageAd,ad.videoAd",
           
"update": {
               
"resourceName": "customers\/[CUSTOMER_ID]\/adGroupAds\/[AD_GROUP_AD_ID]_[AD_GROUP_ID]",
               
"status": "ENABLED",
               
"ad": {
                   
"id": "[AD_GROUP_AD_ID]",
                   
"expandedTextAd": {
                       
"headlinePart1": "Title Test"
                   
}
               
}
           
}
       
}
   
]
}





Response:


   
...

   
{
       
"errorCode": {
           
"requestError": "IMMUTABLE_FIELD"
       
},
       
"message": "Field 'ad.expanded_text_ad.headline_part1' cannot be modified by 'UPDATE' operation.",
       
"location": {
           
"fieldPathElements": [
               
{"fieldName": "operations","index": "0"},
               
{"fieldName": "update" },
               
{"fieldName": "ad" },
               
{"fieldName": "expanded_text_ad" },
               
{"fieldName": "headline_part1" }
           
]
       
}
   
}

...




Does this mean that in order to modify the title it is necessary to delete the ad and create a new one?

The old api of google adwords has examples where you can modify this field.


Thanks for the help.

googleadsapi...@google.com

unread,
Feb 21, 2019, 2:01:06 AM2/21/19
to miguelgra...@gmail.com, AdWords API and Google Ads API Forum
 Hello,

Let me confirm with Engineering and will inform you on this thread.

Best,
Thanet, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@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/b75e2e2d-a655-4637-864c-1b365d29959c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

googleadsapi...@google.com

unread,
Feb 21, 2019, 2:38:42 AM2/21/19
to miguelgra...@gmail.com, AdWords API and Google Ads API Forum
Hello,

The mutate of headline isn't available yet in Google Ads API.
We'll releasing this feature in the future.

Best,
Thanet, Google Ads API

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Miguel Graciá

unread,
Feb 21, 2019, 2:59:58 AM2/21/19
to AdWords API and Google Ads API Forum
Ok! Thanks for the info, Thanet.

BR

jessica....@bravosconto.it

unread,
Apr 18, 2019, 4:08:09 PM4/18/19
to AdWords API and Google Ads API Forum
Hi,

Any news on Update Ad?

Thank you,
Best.

Jessica Capuozzo
Reply all
Reply to author
Forward
0 new messages