CampaignCriterionError.CONCRETE_TYPE_REQUIRED - when adding an adjustment by age/при добавление корректировки по возрасту

57 views
Skip to first unread message

Denis Abdrahmanov

unread,
Sep 25, 2017, 4:33:48 PM9/25/17
to AdWords API Forum
Sorry for my english.

To add an adjustment to the age rate, send a request to the service CampaignCriterionService:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://adwords.google.com/api/adwords/cm/v201705">
   
<soapenv:Header>
     
<v20:RequestHeader>
         
<v20:clientCustomerId>2585558101</v20:clientCustomerId>
         
<v20:developerToken>**********************</v20:developerToken>
     
</v20:RequestHeader>
   
</soapenv:Header>
   
<soapenv:Body>
     
<v20:mutate>
         
<v20:operations>
           
<v20:operator>ADD</v20:operator>
           
<v20:operand>
               
<v20:campaignId>627733913</v20:campaignId>
             
<v20:isNegative>false</v20:isNegative>
               
<v20:criterion>        
                 
<v20:type>AGE_RANGE</v20:type>
 
<v20:Criterion.Type>AGE_RANGE_18_24</v20:Criterion.Type>
               
</v20:criterion>  
               
<v20:bidModifier>9.0</v20:bidModifier>
           
</v20:operand>
         
</v20:operations>
     
</v20:mutate>
   
</soapenv:Body>
</soapenv:Envelope>



As a result, the answer is returned:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   
<soap:Header>
     
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201705">
         
<requestId>000559ff9d2d71d90a3728247807d3c1</requestId>
         
<serviceName>CampaignCriterionService</serviceName>
         
<methodName>mutate</methodName>
         
<operations>1</operations>
         
<responseTime>186</responseTime>
     
</ResponseHeader>
   
</soap:Header>
   
<soap:Body>
     
<soap:Fault>
         
<faultcode>soap:Server</faultcode>
         
<faultstring>[CampaignCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand.criterion]</faultstring>
         
<detail>
           
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201705">
               
<message>[CampaignCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand.criterion]</message>
               
<ApplicationException.Type>ApiException</ApplicationException.Type>
               
<errors xsi:type="CampaignCriterionError" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                 
<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/>
                 
<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>

What is CONCRETE TYPE? how to fix the error?


Shwetha Vastrad (AdWords API Team)

unread,
Sep 25, 2017, 5:14:50 PM9/25/17
to AdWords API Forum
Hi Denis, 

You need to specify the CriterionType using the xsi:type as shown below: 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://adwords.google.com/api/adwords/cm/v201705" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   
<soapenv:Header>
     
<v20:RequestHeader>
         
<v20:clientCustomerId>YOUR_CLIENT_CUSTOMER_ID</v20:clientCustomerId>
         
<v20:developerToken>YOUR_DEVELOPER_TOKEN</v20:developerToken>

     
</v20:RequestHeader>
   
</soapenv:Header>
   
<soapenv:Body>
     
<v20:mutate>
         
<v20:operations>
           
<v20:operator>ADD</v20:operator>
           
<v20:operand>

               
<v20:campaignId>CampaignId</v20:campaignId>

             
<v20:isNegative>false</v20:isNegative>

               
<v20:criterion xsi:type="v20:AgeRange">        
                 
<v20:type>AGE_RANGE</v20:type>

                 
<v20:Criterion.Type>AGE_RANGE_18_24</v20:Criterion.Type>
               
</v20:criterion>  
               
<v20:bidModifier>9.0</v20:bidModifier>
           
</v20:operand>
         
</v20:operations>
     
</v20:mutate>
   
</soapenv:Body>
</soapenv:Envelope>

Regards,
Shwetha, AdWords API Team.

Denis Abdrahmanov

unread,
Sep 26, 2017, 9:45:24 AM9/26/17
to AdWords API Forum

Thanks, it helped to solve the problem.

вторник, 26 сентября 2017 г., 0:14:50 UTC+3 пользователь Shwetha Vastrad (AdWords API Team) написал:
Reply all
Reply to author
Forward
0 new messages