AdGroupCriterion keyword error

35 views
Skip to first unread message

Dmitry Omelyusik

unread,
Nov 5, 2019, 6:16:42 AM11/5/19
to AdWords API and Google Ads API Forum
Hi there.

I tried to add a criterion to the existing adgroup using raw SOAP queries. When I try to add the keyword criterion it returns me [AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]. But when I add any other criterion it works as well.

My SOAP request is:
    <s11:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809">
            <ns1:clientCustomerId>xxxxxxxxxx</ns1:clientCustomerId>
            <ns1:developerToken>xxxxxxxxxx</ns1:developerToken>
            <ns1:userAgent>xxxxxxxxxx</ns1:userAgent>
            <ns1:validateOnly>xxxxxxxxxx</ns1:validateOnly>
            <ns1:partialFailure>xxxxxxxxxx</ns1:partialFailure>
        </ns1:RequestHeader>
    </s11:Header>
    <s11:Body>
        <ns1:mutate xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809">
            <ns1:operations>
                <ns1:operator>ADD</ns1:operator>
                <ns1:operand>
                    <ns1:adGroupId>82965021580</ns1:adGroupId>
                    <ns1:criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809" xsi:type="ns2:Keyword">
                        <ns2:text>title1</ns2:text>
                        <ns2:matchType>EXACT</ns2:matchType>
                    </ns1:criterion>
                </ns1:operand>
            </ns1:operations>
        </ns1:mutate>
    </s11:Body>
</s11:Envelope>

SOAP response is:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">
            <requestId>000596975d436e9c0ac7c2c31304c51a</requestId>
            <serviceName>AdGroupCriterionService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>140</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>[AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809">
                    <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>

Can you please give me a right SOAP object for that query?

Google Ads API Forum Advisor Prod

unread,
Nov 5, 2019, 11:44:41 AM11/5/19
to adwor...@googlegroups.com

Hi Dmitry,

 

Thank you for reaching out. From your provided logs, it looks like you need to create a BiddableAdGroupCriterion to add your Keyword to in order to make the request. I was able to do this successfully and have attached the XML header of my request. Please let me know if this solves your error.

 

Regards,

Mitchell

Google Ads API Team



ref:_00D1U1174p._5001UMWGDH:ref
KeywordAddRequest.txt

Dmitry Omelyusik

unread,
Nov 6, 2019, 3:47:32 AM11/6/19
to AdWords API and Google Ads API Forum
Thanks!
Reply all
Reply to author
Forward
0 new messages