After looking some more around the group it seems you cant change the keyword params after they are set, have made changes to my system so it now deletes old keywords by the id then creates a new one with the same settings (like status etc) and stores the new id.
If I am wrong in what I found out and you can update the keyword text etc after creation please let me know (as it costs less api units). Many thanks, Gareth On Mar 22, 9:39 am, GarethFuller <[email protected]> wrote: > Hi, > > I am calling a function in PHP to update a keyword like this: > > $api_keyword_manager->updateKeyword($apiAdGroup->id, $updatedKeyword, > $matchType, $id); > > the arguments i'm parsing are valid in that I know the keyword API id > is correct as is the adgroup API id, the function updateKeyword looks > like this: > > public function updateKeyword($adGroupId, $keyWord, $matchType, > $keyWordId){ > > try{ > if (isset($adGroupId)) > { > > $keyword = new Keyword(); > $keyword->id = $keyWordId; > $keyword->text = $keyWord; > $keyword->matchType = strtoupper($matchType); > > // Create biddable ad group criterion. > $keywordAdGroupCriterion = new > BiddableAdGroupCriterion(); > $keywordAdGroupCriterion->adGroupId = > $adGroupId; > $keywordAdGroupCriterion->criterion = > $keyword; > > // Create operations. > $keywordAdGroupCriterionOperation = new > AdGroupCriterionOperation(); > $keywordAdGroupCriterionOperation->operand = > $keywordAdGroupCriterion; > $keywordAdGroupCriterionOperation->operator = > 'SET'; > > $this->operations = > $keywordAdGroupCriterionOperation; > > return > ($this->adGroupCriteriaService->mutate( $this- > > >operations )); > > } else { > return false; > } > > } catch ( Exception $e ) { > return false; > } > } > > The issue I am having is that this script is running fine and not > returning any soap errors etc but the keywords are not updating in the > system. I was just wondering if maybe there is some sort of other > argument you need to send to the system to update a criterion. > > Thanks for your help, > > Gareth -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 To unsubscribe from this group, send email to adwords-api+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
