How can I update responsive search ad by Api?

35 views
Skip to first unread message

Dmytro Vashchyshyn

unread,
Jan 13, 2020, 4:07:58 AM1/13/20
to AdWords API and Google Ads API Forum
How can I update responsive search ad by Api?

Google Ads API Forum Advisor Prod

unread,
Jan 13, 2020, 2:27:36 PM1/13/20
to vashchysh...@pdffiller.team, adwor...@googlegroups.com

Hi Dmytro,

Thanks for reaching out. Please refer to the following code to update Responsive Search Ad with AdService.mutate() in Adwords API:

// Get the AdService.

    AdGroupServiceInterface adService = adWordsServices.get(session, AdGroupServiceInterface.class);

 
// Create base class ad to avoid setting type specific fields.

    Ad ad = new Ad();

    ad.setId(adId);

 
// Here is the code to update the ad
 

 
// Create ad group ad.

    AdGroupAd adGroupAd = new AdGroupAd();

    adGroupAd.setAdGroupId(adGroupId);

    adGroupAd.setAd(ad);

 
Please let me know if you have any further questions.

 
Thanks and regards,
Xiaoming, Google Ads API Team


 

ref:_00D1U1174p._5001USwG27:ref
Reply all
Reply to author
Forward
0 new messages