I've posted the provided XML to the CampaignCriterionService and expected, 
that I'll add a location to the campaign.
<s11:Envelope xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/";>
    <s11:Header>
        <ns1:RequestHeader 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809";>
            <ns1:clientCustomerId>myID</ns1:clientCustomerId>
            <ns1:developerToken>myToken</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>ADD</ns1:operator>
                <ns1:Operation.Type></ns1:Operation.Type>
                <ns1:operand>
                    <ns1:campaignId>7841550604</ns1:campaignId>
                    <ns1:criterion>
                        <ns1:id>1002624</ns1:id>
                        <ns1:type>LOCATION</ns1:type>
                        <ns1:Criterion.Type>LOCATION</ns1:Criterion.Type>
                    </ns1:criterion>
                </ns1:operand>
            </ns1:operations>
        </ns1:mutate>
    </s11:Body>
</s11:Envelope>

Unfortunately, I've got the provided response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Header>
        <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <requestId>000596366ca5a1cd0ac7c2c4370d94c7</requestId>
            <serviceName>CampaignCriterionService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>126</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>[CampaignCriterionError.CONCRETE_TYPE_REQUIRED @ 
operations[0].operand.criterion]</faultstring>
            <detail>
                <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
                    <message>[CampaignCriterionError.CONCRETE_TYPE_REQUIRED 
@ operations[0].operand.criterion]</message>
                    
<ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="CampaignCriterionError">
                        
<fieldPath>operations[0].operand.criterion</fieldPath>
                        <fieldPathElements>
                            <field>operations</field>
                            <index>0</index>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>operand</field>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>criterion</field>
                        </fieldPathElements>
                        <trigger></trigger>
                        
<errorString>CampaignCriterionError.CONCRETE_TYPE_REQUIRED</errorString>
                        
<ApiError.Type>CampaignCriterionError</ApiError.Type>
                        <reason>CONCRETE_TYPE_REQUIRED</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

I know, that operand.criterion.type is the extra field, but without it, the 
same response also is returned. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/62cb2f6a-4833-40b8-a447-dfbf44ebf89d%40googlegroups.com.
  • CampaignCriter... 'Dmitry Omelyusik' via AdWords API and Google Ads API Forum
    • Re: Campa... 'Dmitry Omelyusik' via AdWords API and Google Ads API Forum
    • RE: Campa... Google Ads API Forum Advisor Prod
      • RE: C... 'Dmitry Omelyusik' via AdWords API and Google Ads API Forum
    • RE: Campa... Google Ads API Forum Advisor Prod
      • RE: C... 'Dmitry Omelyusik' via AdWords API and Google Ads API Forum

Reply via email to