Hi Charles,

You can delete a negative criterion at the campaign level using 
CampaignCriterionService.mutate<https://developers.google.com/adwords/api/docs/reference/v201309/CampaignCriterionService>and
 a 
CampaignCriterionOperation<https://developers.google.com/adwords/api/docs/reference/v201309/CampaignCriterionService.CampaignCriterionOperation>with
 operator 
*REMOVE*.  The code for this would be a combination of the GetKeywords PHP 
example<https://code.google.com/p/google-api-adwords-php/source/browse/examples/AdWords/v201309/BasicOperations/GetKeywords.php>
 (to 
retrieve the criterion to delete) and the UpdateKeyword PHP 
example<https://code.google.com/p/google-api-adwords-php/source/browse/examples/AdWords/v201309/BasicOperations/UpdateKeyword.php>
 (to 
delete the criterion), with a few changes:

   1. Use CampaignCriterionService instead of AdGroupCriterionService (and 
   you'll get back CampaignCriterion objects instead of AdGroupCriterion 
   objects).
   2. In the 'get' phase:
      - Include a predicate on 'IsNegative' EQUALS true to retrieve the 
      negative keyword criteria for the Campaign.
      - Change the selector fields to include 'CampaignId' and 'Id', since 
      these are required fields for the remove step.
   3. In the 'update' phase, create a CampaignCriterionOperation with 
   operator 'REMOVE' and use the CampaignCriterion object from the 'get' as 
   the operand.
   
Regarding selecting only non-deleted criteria objects, are you finding that 
the API returns these?  In my tests I did not see this occurring.

Thanks,
Josh, AdWords API Team

On Monday, November 18, 2013 2:41:31 PM UTC-5, [email protected] 
wrote:
>
> Does anyone kown how to delete a negative criterion at campaign level, and 
> how to select oly the non-deleted negative criterions at campaign level?
>
> An example  with use op the AdWords API PHP Client Library would be highly 
> appreciated,
>
> regards,
> Charles
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to