Excluir ProductPartition UNIT

39 views
Skip to first unread message

eduard...@rocketroi.com

unread,
Feb 26, 2016, 12:07:58 PM2/26/16
to AdWords API Forum
Hola buenas tardes, 

Necesitamos poder excluir un UNIT de un AdGroup mediante la API de Google Adwords. Al ejecutar la petición al webservice, nos devuelve un error "CANT_UPDATE_NEGATIVE". ¿Alguien sabe que estamos haciendo mal?

La petición al webservice es la siguiente : 

<?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/v201509" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>XXX</ns1:clientCustomerId>
            <ns1:developerToken>XXX</ns1:developerToken>
            <ns1:userAgent>x...@xxx.com (AwApi-Java, AdWords-Axis/2.7.0, Common-Java/2.7.0, Axis/1.4, Java/1.7.0_95, maven)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <operations>
                <operator>SET</operator>
                <operand xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201509" xsi:type="ns2:NegativeAdGroupCriterion">
                    <ns2:adGroupId>12345678</ns2:adGroupId>
                    <ns2:criterion xsi:type="ns2:ProductPartition">
                        <ns2:id>12345678</ns2:id>
                        <ns2:partitionType>UNIT</ns2:partitionType>
                    </ns2:criterion>
                </operand>
            </operations>
        </mutate>
    </soapenv:Body>
</soapenv:Envelope>

Y la respuesta es : 

<?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/v201509">
            <requestId>00052cae59b0e4910a0dd147cc037516</requestId>
            <serviceName>AdGroupCriterionService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>124</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>[AdGroupCriterionError.CANT_UPDATE_NEGATIVE @ operations[0].operand]</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201509">
                    <message>[AdGroupCriterionError.CANT_UPDATE_NEGATIVE @ 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>
                        <trigger/>
                        <errorString>AdGroupCriterionError.CANT_UPDATE_NEGATIVE</errorString>
                        <ApiError.Type>AdGroupCriterionError</ApiError.Type>
                        <reason>CANT_UPDATE_NEGATIVE</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

Muchas gracias y un saludo.

Umesh Dengale

unread,
Feb 26, 2016, 3:57:35 PM2/26/16
to AdWords API Forum
Hello,

Negative AdGroupCriterion can't be updated. Please see AdGroupCriterionError.CANT_UPDATE_NEGATIVE error for details. You need to delete the negative criteria and add new negative criteria with updated information.

Regards,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages