Hi,

I am trying to create a CampaignCriterion via the Google Adwords API but it 
is failing asking for a criterion.id (but this is the thing I am trying to 
create) so a little confused.

Could someone please advise?

SOAP logs:

requests 11:32:30 DEBUG| Making request: POST 
https://accounts.google.com/o/oauth2/token
connectionpool 11:32:30 DEBUG| Starting new HTTPS connection (1): 
accounts.google.com:443
connectionpool 11:32:30 DEBUG| https://accounts.google.com:443 "POST 
/o/oauth2/token HTTP/1.1" 200 None
util 11:32:30 INFO| Request made: Service: "CampaignCriterionService" 
Method: "mutate" URL: 
"https://adwords.google.com/api/adwords/cm/v201809/CampaignCriterionService";
util 11:32:30 DEBUG| Outgoing request: {'SOAPAction': '""', 'Content-Type': 
'text/xml; charset=utf-8', 'authorization': 'REDACTED'}
<soap-env:Envelope 
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap-env:Header>
    <ns0:RequestHeader 
xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809";>
      <ns0:clientCustomerId>2488358023</ns0:clientCustomerId>
      <ns0:developerToken>REDACTED</ns0:developerToken>
      <ns0:userAgent>AdWordsClient/201809.0.1.0-dev (AwApi-Python, 
googleads/20.0.0, Python/3.7.0, zeep)</ns0:userAgent>
      <ns0:validateOnly>false</ns0:validateOnly>
      <ns0:partialFailure>false</ns0:partialFailure>
    </ns0:RequestHeader>
  </soap-env:Header>
  <soap-env:Body>
    <ns0:mutate 
xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809";>
      <ns0:operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="ns0:CampaignCriterionOperation">
        <ns0:operator>SET</ns0:operator>
        <ns0:operand>
          <ns0:campaignId>2050948685</ns0:campaignId>
          <ns0:criterion 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="ns0:CriterionUserList">
            <ns0:userListId>817164584</ns0:userListId>
          </ns0:criterion>
          <ns0:bidModifier>0.5</ns0:bidModifier>
        </ns0:operand>
      </ns0:operations>
    </ns0:mutate>
  </soap-env:Body>
</soap-env:Envelope>

connectionpool 11:32:30 DEBUG| Starting new HTTPS connection (1): 
adwords.google.com:443
connectionpool 11:32:30 DEBUG| https://adwords.google.com:443 "POST 
/api/adwords/cm/v201809/CampaignCriterionService HTTP/1.1" 500 None
util 11:32:30 DEBUG| Incoming response: 
b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>\n  
<soap:Header>\n    <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>\n      
<requestId>00058cb04309cc7e0a379a177b00448b</requestId>\n      
<serviceName>CampaignCriterionService</serviceName>\n      
<methodName>mutate</methodName>\n      <operations>1</operations>\n      
<responseTime>72</responseTime>\n    </ResponseHeader>\n  </soap:Header>\n  
<soap:Body>\n    <soap:Fault>\n      
<faultcode>soap:Client</faultcode>\n      
<faultstring>[RequiredError.REQUIRED @ 
operations[0].operand.criterion.id]</faultstring>\n      <detail>\n        
<ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>\n          
<message>[RequiredError.REQUIRED @ 
operations[0].operand.criterion.id]</message>\n          
<ApplicationException.Type>ApiException</ApplicationException.Type>\n          
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="RequiredError">\n            
<fieldPath>operations[0].operand.criterion.id</fieldPath>\n            
<fieldPathElements>\n              <field>operations</field>\n              
<index>0</index>\n            </fieldPathElements>\n            
<fieldPathElements>\n              <field>operand</field>\n            
</fieldPathElements>\n            <fieldPathElements>\n              
<field>criterion</field>\n            </fieldPathElements>\n            
<fieldPathElements>\n              <field>id</field>\n            
</fieldPathElements>\n            <trigger/>\n            
<errorString>RequiredError.REQUIRED</errorString>\n            
<ApiError.Type>RequiredError</ApiError.Type>\n            
<reason>REQUIRED</reason>\n          </errors>\n        
</ApiExceptionFault>\n      </detail>\n    </soap:Fault>\n  
</soap:Body>\n</soap:Envelope>\n'
util 11:32:30 WARNING| Error summary: {'faultMessage': 
'[RequiredError.REQUIRED @ operations[0].operand.criterion.id]', 
'requestId': '00058cb04309cc7e0a379a177b00448b', 'serviceName': 
'CampaignCriterionService', 'methodName': 'mutate', 'operations': '1', 
'responseTime': '72'}

Thanks
Sanjay

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/c1afd05f-4885-4735-87d0-2fa990962579%40googlegroups.com.

Reply via email to