Hello,
I have a problem with mutation of this certain 3 types of 
ads ExpandedDynamicSearchAd, TemplateAd, ImageAd. For all of them the error 
i am getting is [AdError.INVALID_AD_TYPE @ operations[0].operand.id].
Below I present request and response for all of the mutation requests.

ImageAd Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";>
    <soap:Header>
        <ns1:RequestHeader 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <ns1:developerToken>***</ns1:developerToken>
            <ns1:userAgent>***</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:clientCustomerId>***</ns1:clientCustomerId>
        </ns1:RequestHeader>
    </soap:Header>
    <soap:Body>
        <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <operations>
                <operator>SET</operator>
                <operand xsi:type="ImageAd">
                    <id>347273560254</id>
                    <displayUrl>molive.wawtests.com</displayUrl>
                    
<finalUrls>https://molive.wawtests.com/googlespa</finalUrls>
                    <type>IMAGE_AD</type>
                    <Ad.Type>ImageAd</Ad.Type>
                    <image>
                        <type>IMAGE</type>
                        <referenceId>-6636936582085476352</referenceId>
                        <dimensions>
                            <key>PREVIEW</key>
                            <value>
                                <width>75</width>
                                <height>10</height>
                            </value>
                        </dimensions>
                        <dimensions>
                            <key>FULL</key>
                            <value>
                                <width>375</width>
                                <height>50</height>
                            </value>
                        </dimensions>
                        <urls>
                            <key>PREVIEW</key>
                            
<value>https://tpc.googlesyndication.com/simgad/804344098343720274</value>
                        </urls>
                        <urls>
                            <key>FULL</key>
                            
<value>https://tpc.googlesyndication.com/simgad/7159230357409717178</value>
                        </urls>
                        <mimeType>IMAGE_JPEG</mimeType>
                        <fileSize>0</fileSize>
                        <Media.Type>Image</Media.Type>
                    </image>
                    <name>WELLSPA-3 (1).jpg</name>
                </operand>
            </operations>
        </mutate>
    </soap:Body>
</soap:Envelope>

ImageAd Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Header>
        <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <requestId>00058c384f7fb2be02ab401af7035050</requestId>
            <serviceName>AdService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>113</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>[AdError.INVALID_AD_TYPE @ 
operations[0].operand.id]</faultstring>
            <detail>
                <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
                    <message>[AdError.INVALID_AD_TYPE @ 
operations[0].operand.id]</message>
                    
<ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="AdError">
                        <fieldPath>operations[0].operand.id</fieldPath>
                        <fieldPathElements>
                            <field>operations</field>
                            <index>0</index>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>operand</field>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>id</field>
                        </fieldPathElements>
                        <trigger></trigger>
                        <errorString>AdError.INVALID_AD_TYPE</errorString>
                        <ApiError.Type>AdError</ApiError.Type>
                        <reason>INVALID_AD_TYPE</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

TemplateAd Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";>
    <soap:Header>
        <ns1:RequestHeader 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <ns1:developerToken>***</ns1:developerToken>
            <ns1:userAgent>***</ns1:userAgent>
            <ns1:validateOnly>***</ns1:validateOnly>
            <ns1:clientCustomerId>***</ns1:clientCustomerId>
        </ns1:RequestHeader>
    </soap:Header>
    <soap:Body>
        <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <operations>
                <operator>SET</operator>
                <operand 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xsi:type="TemplateAd">
                    <id>341740888255</id>
                    <displayUrl>molive.wawtests.com/kompswiat</displayUrl>
                    
<finalUrls>http://molive.wawtests.com/kompswiat</finalUrls>
                    <Ad.Type>TemplateAd</Ad.Type>
                    <templateId>213</templateId>
                    <templateElements>
                        <uniqueName>adData</uniqueName>
                        <fields>
                            <name>video</name>
                            <type>VIDEO</type>
                            <fieldMedia xsi:type="Video">
                                <mediaId>10347322071</mediaId>
                                <type>VIDEO</type>
                                
<referenceId>-7344508434736746223</referenceId>
                                <urls>
                                    <key>VIDEO_THUMBNAIL</key>
                                    
<value>https://ytimg.googleusercontent.com/vi/mhMQfdGn8RE/default.jpg</value>
                                </urls>
                                <name>How to Restart a Computer | How To 
Restart PC |...</name>
                                <creationTime>20190404 151805 
Europe/Warsaw</creationTime>
                                <Media.Type>Video</Media.Type>
                                <durationMillis>168000</durationMillis>
                                
<streamingUrl>http://youtube.com/get_video?video_id=mhMQfdGn8RE&amp;ts=1561460400642&amp;t=dicOThmzSckez7Vzo121Zd6BhHs&amp;gad=1</streamingUrl>
                                
<readyToPlayOnTheWeb>true</readyToPlayOnTheWeb>
                                
<industryStandardCommercialIdentifier></industryStandardCommercialIdentifier>
                                <advertisingId></advertisingId>
                                
<youTubeVideoIdString>mhMQfdGn8RE</youTubeVideoIdString>
                            </fieldMedia>
                        </fields>
                        <fields>
                            <name>actionCTA</name>
                            <type>TEXT</type>
                            <fieldText>Napisz!</fieldText>
                        </fields>
                        <fields>
                            <name>actionHeadline</name>
                            <type>TEXT</type>
                            <fieldText>U nas zadziała</fieldText>
                        </fields>
                    </templateElements>
                    <name>kompswiat</name>
                </operand>
            </operations>
        </mutate>
    </soap:Body>
</soap:Envelope>

TemplateAd response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Header>
        <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <requestId>00058c38539c68bc0a3707cb78048581</requestId>
            <serviceName>AdService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>193</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>[AdError.INVALID_AD_TYPE @ 
operations[0].operand.id; trigger:'Template ID: 213']</faultstring>
            <detail>
                <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
                    <message>[AdError.INVALID_AD_TYPE @ 
operations[0].operand.id; trigger:'Template ID: 213']</message>
                    
<ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="AdError">
                        <fieldPath>operations[0].operand.id</fieldPath>
                        <fieldPathElements>
                            <field>operations</field>
                            <index>0</index>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>operand</field>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>id</field>
                        </fieldPathElements>
                        <trigger>Template ID: 213</trigger>
                        <errorString>AdError.INVALID_AD_TYPE</errorString>
                        <ApiError.Type>AdError</ApiError.Type>
                        <reason>INVALID_AD_TYPE</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

ExpandedDynamicSearchAd request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
xmlns:tns="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";>
    <soap:Header>
        <ns1:RequestHeader 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <ns1:developerToken>***</ns1:developerToken>
            <ns1:userAgent>***</ns1:userAgent>
            <ns1:validateOnly>***</ns1:validateOnly>
            <ns1:clientCustomerId>***</ns1:clientCustomerId>
        </ns1:RequestHeader>
    </soap:Header>
    <soap:Body>
        <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <operations>
                <operator>SET</operator>
                <operand xsi:type="ExpandedDynamicSearchAd">
                    <id>349684755788</id>
                    <finalUrls>https://hehehe.pagedemo.co</finalUrls>
                    <type>EXPANDED_DYNAMIC_SEARCH_AD</type>
                    <Ad.Type>ExpandedDynamicSearchAd</Ad.Type>
                    <description></description>
                </operand>
            </operations>
        </mutate>
    </soap:Body>
</soap:Envelope>

ExpandedDynamicSearchAd response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Header>
        <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
            <requestId>00058c3854b7f7d00ac7c1a54a05271a</requestId>
            <serviceName>AdService</serviceName>
            <methodName>mutate</methodName>
            <operations>1</operations>
            <responseTime>68</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>[AdError.INVALID_AD_TYPE @ 
operations[0].operand.id]</faultstring>
            <detail>
                <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";>
                    <message>[AdError.INVALID_AD_TYPE @ 
operations[0].operand.id]</message>
                    
<ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="AdError">
                        <fieldPath>operations[0].operand.id</fieldPath>
                        <fieldPathElements>
                            <field>operations</field>
                            <index>0</index>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>operand</field>
                        </fieldPathElements>
                        <fieldPathElements>
                            <field>id</field>
                        </fieldPathElements>
                        <trigger></trigger>
                        <errorString>AdError.INVALID_AD_TYPE</errorString>
                        <ApiError.Type>AdError</ApiError.Type>
                        <reason>INVALID_AD_TYPE</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

Any idea what is the problem? AdTypes are the same as coming from GET 
request for this Ads.
We are still using Google AdWords API not new Google Ads API because 
AdService is not implemented yet in new API and you cannot mutate Ads.

Thank you

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0a98b421-2dd0-4706-8d74-6ba4f50ecd42%40googlegroups.com.

Reply via email to