We are getting the "INVALID_USER_STATUS" error, but the UserStatus is being 
created well, we have checked it:

new UserStatus(status)



El lunes, 7 de agosto de 2017, 18:11:37 (UTC+2), rafa....@rocketroi.com 
escribió:
>
> Hi!
>
> I'm trying to edit the STATUS of audience remarketing lists but despite 
> I'm not getting any error, the change is not being made on Adwords.
>
> This is the code that I'm using (I'm working with java/grails)
>
>         def adwordsServcices = new AdWordsServices()
>         def adGroupCriterionService = adwordsServcices.get(session, 
> AdGroupCriterionServiceInterface.class)
>
>         def criterion = new CriterionUserList()
>         criterion.setId(id)
>
>         // Create ad group bid.
>         def bidCriterion = new BiddableAdGroupCriterion()
>         bidCriterion.setAdGroupId(adGroupId)
>         bidCriterion.setCriterion(criterion)
>         bidCriterion.setUserStatus(new UserStatus(status))
>
>         // Create operations.
>         def operation = new AdGroupCriterionOperation()
>         operation.setOperand(bidCriterion)
>         operation.setOperator(Operator.SET)
>
>         def operations = (AdGroupCriterionOperation[]) [operation]
>
>         // Update ad group criteria.
>         def result = adGroupCriterionService.mutate(operations)
>
>
> And here the request and response:
>
> *Request*:
>
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
>     <soapenv:Header>
>         <ns1:RequestHeader xmlns:ns1="
> https://adwords.google.com/api/adwords/cm/v201702"; 
> soapenv:mustUnderstand="0">
>             
> <ns1:clientCustomerId>00000000004707663694</ns1:clientCustomerId>
>             <ns1:developerToken>REDACTED</ns1:developerToken>
>             <ns1:userAgent>*******@gmail.com (AwApi-Java, 
> AdWords-Axis/3.2.0, Common-Java/3.2.0, Axis/1.4, Java/1.8.0_131, 
> maven)</ns1:userAgent>
>             <ns1:validateOnly>true</ns1:validateOnly>
>             <ns1:partialFailure>true</ns1:partialFailure>
>         </ns1:RequestHeader>
>     </soapenv:Header>
>     <soapenv:Body>
>         <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201702";>
>             <operations>
>                 <operator>SET</operator>
>                 <operand xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201702"; 
> xsi:type="ns2:BiddableAdGroupCriterion">
>                     <adGroupId>39364874541</adGroupId>
>                     <criterion xsi:type="ns2:CriterionUserList">
>                         <id>340920409188</id>
>                     </criterion>
>                     <userStatus>REMOVED</userStatus>
>                 </operand>
>             </operations>
>         </mutate>
>     </soapenv:Body>
> </soapenv:Envelope>
>
> *Response*:
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="
> http://schemas.xmlsoap.org/soap/envelope/";>
>     <soap:Header>
>         <ResponseHeader xmlns="
> https://adwords.google.com/api/adwords/cm/v201702";>
>             <requestId>0005562c097bb4080a3706905407d6c0</requestId>
>             <serviceName>AdGroupCriterionService</serviceName>
>             <methodName>mutate</methodName>
>             <operations>0</operations>
>             <responseTime>124</responseTime>
>         </ResponseHeader>
>     </soap:Header>
>     <soap:Body>
>         <soap:Fault>
>             <faultcode>soap:Server</faultcode>
>             <faultstring>[AdGroupCriterionError.INVALID_USER_STATUS @ 
> operations[0].operand.userStatus]</faultstring>
>             <detail>
>                 <ApiExceptionFault xmlns="
> https://adwords.google.com/api/adwords/cm/v201702";>
>                     <message>[AdGroupCriterionError.INVALID_USER_STATUS @ 
> operations[0].operand.userStatus]</message>
>                     
> <ApplicationException.Type>ApiException</ApplicationException.Type>
>                     <errors xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:type="AdGroupCriterionError">
>                         
> <fieldPath>operations[0].operand.userStatus</fieldPath>
>                         <fieldPathElements>
>                             <field>operations</field>
>                             <index>0</index>
>                         </fieldPathElements>
>                         <fieldPathElements>
>                             <field>operand</field>
>                         </fieldPathElements>
>                         <fieldPathElements>
>                             <field>userStatus</field>
>                         </fieldPathElements>
>                         <trigger/>
>                         
> <errorString>AdGroupCriterionError.INVALID_USER_STATUS</errorString>
>                         
> <ApiError.Type>AdGroupCriterionError</ApiError.Type>
>                         <reason>INVALID_USER_STATUS</reason>
>                     </errors>
>                 </ApiExceptionFault>
>             </detail>
>         </soap:Fault>
>     </soap:Body>
> </soap:Envelope>
>
>
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
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/6dd48ebf-b8d8-4627-8c87-0f92a436a0b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to