You can only modify the status of an existing Ad. If you want to change the text, headline, etc, you should create a new Ad, and pause or delete the existing Ad.
This is consistent with what happens in the AdWords Web UI. If you click to edit an Ad, you get a popup with this text: ---- You can edit this ad. Changing the ad will delete the existing ad and create a new one. The new ad will begin with statistics at zero, and statistics for the old ad will be shown in the "Deleted ads" row. ---- On Mar 18, 5:48 am, ics <[email protected]> wrote: > I know its possible to change the status of an ad with the following > code: > > $ad = new Ad(); > $ad->id = $adId; > > $adGroupAd = new AdGroupAd(); > $adGroupAd->adGroupId = $adGroupId; > $adGroupAd->ad = $ad; > $adGroupAd->status = 'PAUSED'; > > // Create operations. > $operation = new AdGroupAdOperation(); > $operation->operand = $adGroupAd; > $operation->operator = 'SET'; > > $operations = array($operation); > > // Update ad. > $result = $adGroupAdService->mutate($operations); > > But it's possible to change the headline, the description and the url > of the link of the Ad ?? > > I tried: > > // Create text ad. > $textAd = new TextAd(); > $textAd->headline = 'test2222'; > $textAd->description1 = 'test222'; > $textAd->description2 = 'test22'; > $textAd->displayUrl = 'www.test.com'; > $textAd->url = 'http://www.test.com'; > $textAd->id = $adId; > > // Create ad group ad. > $textAdGroupAd = new AdGroupAd(); > $textAdGroupAd->adGroupId = $adGroupId; > $textAdGroupAd->ad = $textAd; > $textAdGroupAd->status = 'ENABLED'; > > // Update operations. > $textAdGroupAdOperation = new AdGroupAdOperation(); > $textAdGroupAdOperation->operand = $textAdGroupAd; > $textAdGroupAdOperation->operator = 'SET'; > > //--- > > $operations = array($textAdGroupAdOperation); > > // Update ad. > $result = $adGroupAdService->mutate($operations); > > but there is no difference... it only change the status of the add but > not the description, url, headline,... > > I hope you someone can help me > > best regardes -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Have you migrated to v200909 yet? The v13 sunset is on April 22, 2010. 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en
