The language id (1002, for example) is different from the criteria id.
You cannot delete any criterion without providing a criterion id.

You can follow these steps:
- get all criteria of a campaign
- look for the criterion that has criterionType is "Language",
language id is the id you want to delete

This is the result getting from GetAllLanguages.cs (C#)

Language name is 'English', ID is 1000 and code is 'en'.
Language name is 'German', ID is 1001 and code is 'de'.
Language name is 'French', ID is 1002 and code is 'fr'.
Language name is 'Spanish', ID is 1003 and code is 'es'.
...



On Jan 5, 1:04 pm, Brian King <[email protected]> wrote:
> I have a campaign targeting all languages and am trying to remove one
> (French). I've basically copied the code from some example on the code site
> (pasted below).
>
> I am always getting INVALID_ID error. Are there new ids? What should I use
> to target languages?
>
>            var language = new Language {id = 1002};
>             var criterion = new CampaignCriterion.CampaignCriterion
>                                 {criterion = language, campaignId =
> campaign.id, campaignIdSpecified = true};
>             var operation1 = new CampaignCriterionOperation();
>             operation1.@operator = CampaignCriterion.Operator.REMOVE;
>             operation1.operand = criterion;
>             var operationArray = new CampaignCriterionOperation[]
> {operation1};
>             cservice.mutate(operationArray);

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

Reply via email to