I'm having this issue with removing keywords. It would be awesome if you 
could help me figure it out

I'm able to retrieve the the Keyword Criteria(Sample):

Enter code here...
<getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
   <rval>
       <totalNumEntries>10</totalNumEntries>
       <Page.Type>AdGroupCriterionPage</Page.Type>
       <entries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="BiddableAdGroupCriterion">
           <adGroupId>99941830527</adGroupId>
           <criterionUse>BIDDABLE</criterionUse>
           <criterion xsi:type="Keyword">
               <id>877376356747</id>
               <type>KEYWORD</type>
               <Criterion.Type>Keyword</Criterion.Type>
               <text>agent job 80f9fd28</text>
               <matchType>BROAD</matchType>
           </criterion>
           <AdGroupCriterion.Type>BiddableAdGroupCriterion</
AdGroupCriterion.Type>
       </entries>
       <entries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="BiddableAdGroupCriterion">
           <adGroupId>99941830527</adGroupId>
           <criterionUse>BIDDABLE</criterionUse>
           <criterion xsi:type="Keyword">
               <id>878118005986</id>
               <type>KEYWORD</type>
               <Criterion.Type>Keyword</Criterion.Type>
               <text>agent job 504b6147</text>
               <matchType>BROAD</matchType>
           </criterion>
           <AdGroupCriterion.Type>BiddableAdGroupCriterion</
AdGroupCriterion.Type>
       </entries>
    </rval>
</getResponse>

Then I try to remove a Keyword:

<s11:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/";>
    <s11:Header>
        <ns1:RequestHeader xmlns:ns1="
https://adwords.google.com/api/adwords/cm/v201809";>
            <ns1:clientCustomerId>Some customer ID</ns1:clientCustomerId>
            <ns1:developerToken>some token</ns1:developerToken>
            <ns1:userAgent></ns1:userAgent>
            <ns1:validateOnly></ns1:validateOnly>
            <ns1:partialFailure></ns1:partialFailure>
        </ns1:RequestHeader>
    </s11:Header>
    <s11:Body>
        <ns1:mutate xmlns:ns1="
https://adwords.google.com/api/adwords/cm/v201809";>
            <ns1:operations>
                <ns1:operator>REMOVE</ns1:operator>
                <ns1:operand xsi:type="ns1:AdGroupCriterion">
                    <ns1:adGroupId>95704811493</ns1:adGroupId>
                    <ns1:criterion xmlns:ns2="
https://adwords.google.com/api/adwords/cm/v201809"; xsi:type="ns2:Keyword">
                        <ns2:id>1070851611272</ns2:id>
                    </ns1:criterion>
                </ns1:operand>
            </ns1:operations>
        </ns1:mutate>
    </s11:Body>
</s11:Envelope>

But I keep getting: 

<soap:Fault><faultcode>soap:Client</faultcode><faultstring>[EntityNotFound.INVALID_ID
 
@ operations[0].operand.criterion.id; 
trigger:'CriterionId{id=1070851611272}']
</faultstring><detail><ApiExceptionFault xmlns="
https://adwords.google.com/api/adwords/cm/v201809";><message>[EntityNotFound.INVALID_ID
 
@ operations[0].operand.criterion.id; 
trigger:'CriterionId{id=1070851611272}']
</message><ApplicationException.Type>ApiException
</ApplicationException.Type><errors xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:type="EntityNotFound"
><fieldPath>operations[0].operand.criterion.id
</fieldPath><fieldPathElements><field>operations</field><index>0
</index></fieldPathElements><fieldPathElements><field>operand
</field></fieldPathElements><fieldPathElements><field>criterion
</field></fieldPathElements><fieldPathElements><field>id
</field></fieldPathElements><trigger>CriterionId{id=1070851611272}
</trigger><errorString>EntityNotFound.INVALID_ID
</errorString><ApiError.Type>EntityNotFound</ApiError.Type><reason>
INVALID_ID</reason></errors></ApiExceptionFault></detail></soap:Fault>

This is in a Dev account just in case it makes any difference.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/727cbc4a-d919-432d-9b56-0e566ea913ee%40googlegroups.com.

Reply via email to