Campaign Service campaignUpdate throws ApiException when ShoppingSetting have merchantId set

45 views
Skip to first unread message

Ronald Findling

unread,
Nov 21, 2018, 11:07:04 AM11/21/18
to AdWords API and Google Ads API Forum
When doing a campaign update requests (`mutate` with `CampaignOperator.SET`) which has shoppingSettings (with `merchantId`) we observe a `com.google.api.ads.adwords.axis.v201806.cm.ApiException` see [1]
In this request we set all mandatory properties (`merchantId`, `salesCountry`, `campaignPriority`)

Leaving out the merchantId however makes the request succeed, request and response see [2] [3].

I can't find documentation why these parameters shouldn't be set in this case:

We are using com.google.api-ads:adwords-axis:3.15.1

[2]
2018-11-21 16:11:47 [INFO] c.g.a.a.a.l.c.A.soapXmlLogger SOAP request:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201806" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>XXX</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>smeco (AwApi-Java, AdWords-Axis/3.15.1, Common-Java/3.15.1, Axis/1.4, Java/1.8.0_152, maven)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <operations>
                <operator>SET</operator>
                <operand>
                    <id>999999</id>
                    <name>(AT:Whoop!) Indoor</name>
                    <settings xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201806" xsi:type="ns2:ShoppingSetting">
                        <ns2:merchantId>XXX</ns2:merchantId>
                        <ns2:salesCountry>AT</ns2:salesCountry>
                        <ns2:campaignPriority>0</ns2:campaignPriority>
                    </settings>
                </operand>
            </operations>
        </mutate>
    </soapenv:Body>
</soapenv:Envelope>

[3]
2018-11-21 16:11:47 [INFO] c.g.a.a.a.l.c.A.soapXmlLogger SOAP response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201806">
            <requestId>00057b2e2b2a07410a373303cb0f5a91</requestId>
            <serviceName>CampaignService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>269</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201806">
                    <message>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InternalApiError">
                        <fieldPath/>
                        <trigger/>
                        <errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</errorString>
                        <ApiError.Type>InternalApiError</ApiError.Type>
                        <reason>UNEXPECTED_INTERNAL_API_ERROR</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>


[1]
2018-11-21 16:11:47 [WARN] c.g.a.a.a.l.c.A.requestInfoLogger Request made: Service: CampaignService Method: mutate clientCustomerId: XXX URL: https://adwords.google.com/api/adwords/cm/v201806/CampaignService Request ID: 00057b2e2b2a07410a373303cb0f5a91 ResponseTime(ms): 269 OperationsCount: 1 IsFault: true FaultMessage: ApiException{applicationExceptionType=ApiException, errors=[InternalApiError{apiErrorType=InternalApiError, errorString=InternalApiError.UNEXPECTED_INTERNAL_API_ERROR, fieldPath=, reason=UNEXPECTED_INTERNAL_API_ERROR, trigger=}]}


Dannison Yao (AdWords API Team)

unread,
Nov 21, 2018, 5:04:59 PM11/21/18
to AdWords API and Google Ads API Forum
Hi Ronald,

Could you please provide the complete SOAP request and response logs (without redacting any information such as clientCustomerId and the merchantId) using the Reply privately to author option so I can investigate this more?

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