$a = $adWordsServices->get($session, AdGroupCriterionService::class);
$operations = [];
$userListCriterion = new CriterionUserList();
$userListCriterion->setUserListId(477341362);
$userListCriterion->setType(CriterionType.USER_LIST); 
$biddableCriterion = new BiddableAdGroupCriterion(48943301691);
$biddableCriterion->setCriterion($userListCriterion);
$operation = new AdGroupCriterionOperation();
$operation->setOperand($biddableCriterion);
$operation->setOperator(Operator::ADD);
$operations[] = $operation;

$result = $a->mutate($operations);

Above is the code I have written to attach remarketing list audience to an 
adgroup

Below are my XML request and response : 

Request : 
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201705"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><SOAP-ENV:Header><ns1:RequestHeader><ns1:clientCustomerId>480-978-3258</ns1:clientCustomerId><ns1:developerToken>bFwayXQR6R1Z_fEHTKcwtg</ns1:developerToken><ns1:userAgent>unknown
 
(AwApi-PHP, googleads-php-lib/27.1.0, 
PHP/5.6.25)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns1:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:mutate><ns1:operations><ns1:operator>ADD</ns1:operator><ns1:operand><ns1:adGroupId>48943301691</ns1:adGroupId><ns1:criterion
 
xsi:type="ns1:CriterionUserList"><ns1:type>CriterionTypeUSER_LIST</ns1:type><ns1:userListId>477341362</ns1:userListId></ns1:criterion></ns1:operand></ns1:operations></ns1:mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>



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

Please help me with this issue.
It says CONCRETE_TYPE_REQUIRED

Regards,
Pratik Solanki

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9a9d1ba8-e5e8-4a56-8daf-13a26bba5cb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Problem with at... Pratik Solanki
    • Re: Proble... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
      • Re: Pr... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum

Reply via email to