Hi,

I'm succeeding in creating a campaign of sub type 'gmail' successfully. 
I'm succeeding in creating ads of type 'gmail' in this campaign.

When trying to update a Gmail ad, I'm getting the error 
AdError.INVALID_AD_TYPE, even though this ad was created on a 'gmail' 
campaign without any problem.

Here are 3 soap calls debug:

1. Successful campaign creation:

        [2019-09-04 12:13:09] AW_SOAP.INFO: clientCustomerId=719-913-6192 
operations=1 service=AdGroupAdService method=mutate responseTime=273 
requestId=000591b920e2723d0a3758045402311e server=adwords.google.com isFault=0 
faultMessage=
        [2019-09-04 12:13:09] AW_SOAP.DEBUG: POST 
/api/adwords/cm/v201809/AdGroupAdService?wsdl HTTP/1.1
        Host: adwords.google.com
        Connection: close
        User-Agent: PHP-SOAP/7.1.20
        Content-Type: text/xml; charset=utf-8
        SOAPAction: ""
        Content-Length: 1676
        Authorization: REDACTED

        <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><SOAP-ENV:Header><ns1:RequestHeader><ns1:clientCustomerId>719-913-6192</ns1:clientCustomerId><ns1:developerToken>REDACTED</ns1:developerToken><ns1:userAgent>unknown
 (AwApi-PHP, googleads-php-lib/41.0.0, 
PHP/7.1.20)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns1:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:mutate><ns1:operations><ns1:operator>ADD</ns1:operator><ns1:operand><ns1:adGroupId>84575503144</ns1:adGroupId><ns1:ad
 
xsi:type="ns1:GmailAd"><ns1:finalUrls>https://www.elwaychrysler.com/used-Greeley-2017-Chevrolet-Colorado-ZR2-1GCPTEE18H1322122</ns1:finalUrls><ns1:teaser><ns1:headline>Colorado</ns1:headline><ns1:description>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</ns1:description><ns1:businessName>John Elway 
CDJR</ns1:businessName><ns1:logoImage><ns1:mediaId>20651470730</ns1:mediaId></ns1:logoImage></ns1:teaser><ns1:marketingImage><ns1:mediaId>20653964286</ns1:mediaId></ns1:marketingImage><ns1:marketingImageHeadline>Colorado</ns1:marketingImageHeadline><ns1:marketingImageDescription>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</ns1:marketingImageDescription><ns1:marketingImageDisplayCallToAction><ns1:text>Yehuda
 
Call</ns1:text></ns1:marketingImageDisplayCallToAction></ns1:ad><ns1:status>PAUSED</ns1:status></ns1:operand></ns1:operations></ns1:mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>

        HTTP/1.1 200 OK
        Content-Type: text/xml; charset=UTF-8
        Date: Wed, 04 Sep 2019 12:13:10 GMT
        Expires: Wed, 04 Sep 2019 12:13:10 GMT
        Cache-Control: private, max-age=0
        X-Content-Type-Options: nosniff
        X-Frame-Options: SAMEORIGIN
        X-XSS-Protection: 1; mode=block
        Server: GSE
        Alt-Svc: quic=":443"; ma=2592000; v="46,43,39"
        Accept-Ranges: none
        Vary: Accept-Encoding
        Connection: close

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Header><ResponseHeader
 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";><requestId>000591b920e2723d0a3758045402311e</requestId><serviceName>AdGroupAdService</serviceName><methodName>mutate</methodName><operations>1</operations><responseTime>273</responseTime></ResponseHeader></soap:Header><soap:Body><mutateResponse
 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";><rval><ListReturnValue.Type>AdGroupAdReturnValue</ListReturnValue.Type><value><adGroupId>84575503144</adGroupId><ad
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="GmailAd"><id>380880271870</id><finalUrls>https://www.elwaychrysler.com/used-Greeley-2017-Chevrolet-Colorado-ZR2-1GCPTEE18H1322122</finalUrls><type>GMAIL_AD</type><Ad.Type>GmailAd</Ad.Type><teaser><headline>Colorado</headline><description>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</description><businessName>John Elway 
CDJR</businessName><logoImage><mediaId>20651470730</mediaId><type>IMAGE</type><referenceId>8853199648056147968</referenceId><dimensions><key>FULL</key><value><width>601</width><height>601</height></value></dimensions><urls><key>FULL</key><value>https://tpc.googlesyndication.com/simgad/8886387495001073007</value></urls><mimeType>IMAGE_PNG</mimeType><sourceUrl></sourceUrl><name></name><fileSize>20882</fileSize><Media.Type>Image</Media.Type></logoImage></teaser><marketingImage><mediaId>20653964286</mediaId><type>IMAGE</type><referenceId>1239794109242146816</referenceId><dimensions><key>FULL</key><value><width>1200</width><height>628</height></value></dimensions><urls><key>FULL</key><value>https://tpc.googlesyndication.com/simgad/5288789809720330135</value></urls><mimeType>IMAGE_JPEG</mimeType><sourceUrl></sourceUrl><name></name><fileSize>140349</fileSize><Media.Type>Image</Media.Type></marketingImage><marketingImageHeadline>Colorado</marketingImageHeadline><marketingImageDescription>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</marketingImageDescription><marketingImageDisplayCallToAction><text>Yehuda 
Call</text></marketingImageDisplayCallToAction></ad><status>PAUSED</status></value></rval></mutateResponse></soap:Body></soap:Envelope>


2. Successful ad creation:

        [2019-09-04 12:13:09] AW_SOAP.INFO: clientCustomerId=719-913-6192 
operations=1 service=AdGroupAdService method=mutate responseTime=273 
requestId=000591b920e2723d0a3758045402311e server=adwords.google.com isFault=0 
faultMessage=
        [2019-09-04 12:13:09] AW_SOAP.DEBUG: POST 
/api/adwords/cm/v201809/AdGroupAdService?wsdl HTTP/1.1
        Host: adwords.google.com
        Connection: close
        User-Agent: PHP-SOAP/7.1.20
        Content-Type: text/xml; charset=utf-8
        SOAPAction: ""
        Content-Length: 1676
        Authorization: REDACTED

        <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><SOAP-ENV:Header><ns1:RequestHeader><ns1:clientCustomerId>719-913-6192</ns1:clientCustomerId><ns1:developerToken>REDACTED</ns1:developerToken><ns1:userAgent>unknown
 (AwApi-PHP, googleads-php-lib/41.0.0, 
PHP/7.1.20)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns1:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:mutate><ns1:operations><ns1:operator>ADD</ns1:operator><ns1:operand><ns1:adGroupId>84575503144</ns1:adGroupId><ns1:ad
 
xsi:type="ns1:GmailAd"><ns1:finalUrls>https://www.elwaychrysler.com/used-Greeley-2017-Chevrolet-Colorado-ZR2-1GCPTEE18H1322122</ns1:finalUrls><ns1:teaser><ns1:headline>Colorado</ns1:headline><ns1:description>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</ns1:description><ns1:businessName>John Elway 
CDJR</ns1:businessName><ns1:logoImage><ns1:mediaId>20651470730</ns1:mediaId></ns1:logoImage></ns1:teaser><ns1:marketingImage><ns1:mediaId>20653964286</ns1:mediaId></ns1:marketingImage><ns1:marketingImageHeadline>Colorado</ns1:marketingImageHeadline><ns1:marketingImageDescription>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</ns1:marketingImageDescription><ns1:marketingImageDisplayCallToAction><ns1:text>Yehuda
 
Call</ns1:text></ns1:marketingImageDisplayCallToAction></ns1:ad><ns1:status>PAUSED</ns1:status></ns1:operand></ns1:operations></ns1:mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>

        HTTP/1.1 200 OK
        Content-Type: text/xml; charset=UTF-8
        Date: Wed, 04 Sep 2019 12:13:10 GMT
        Expires: Wed, 04 Sep 2019 12:13:10 GMT
        Cache-Control: private, max-age=0
        X-Content-Type-Options: nosniff
        X-Frame-Options: SAMEORIGIN
        X-XSS-Protection: 1; mode=block
        Server: GSE
        Alt-Svc: quic=":443"; ma=2592000; v="46,43,39"
        Accept-Ranges: none
        Vary: Accept-Encoding
        Connection: close

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Header><ResponseHeader
 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";><requestId>000591b920e2723d0a3758045402311e</requestId><serviceName>AdGroupAdService</serviceName><methodName>mutate</methodName><operations>1</operations><responseTime>273</responseTime></ResponseHeader></soap:Header><soap:Body><mutateResponse
 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";><rval><ListReturnValue.Type>AdGroupAdReturnValue</ListReturnValue.Type><value><adGroupId>84575503144</adGroupId><ad
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="GmailAd"><id>380880271870</id><finalUrls>https://www.elwaychrysler.com/used-Greeley-2017-Chevrolet-Colorado-ZR2-1GCPTEE18H1322122</finalUrls><type>GMAIL_AD</type><Ad.Type>GmailAd</Ad.Type><teaser><headline>Colorado</headline><description>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</description><businessName>John Elway 
CDJR</businessName><logoImage><mediaId>20651470730</mediaId><type>IMAGE</type><referenceId>8853199648056147968</referenceId><dimensions><key>FULL</key><value><width>601</width><height>601</height></value></dimensions><urls><key>FULL</key><value>https://tpc.googlesyndication.com/simgad/8886387495001073007</value></urls><mimeType>IMAGE_PNG</mimeType><sourceUrl></sourceUrl><name></name><fileSize>20882</fileSize><Media.Type>Image</Media.Type></logoImage></teaser><marketingImage><mediaId>20653964286</mediaId><type>IMAGE</type><referenceId>1239794109242146816</referenceId><dimensions><key>FULL</key><value><width>1200</width><height>628</height></value></dimensions><urls><key>FULL</key><value>https://tpc.googlesyndication.com/simgad/5288789809720330135</value></urls><mimeType>IMAGE_JPEG</mimeType><sourceUrl></sourceUrl><name></name><fileSize>140349</fileSize><Media.Type>Image</Media.Type></marketingImage><marketingImageHeadline>Colorado</marketingImageHeadline><marketingImageDescription>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</marketingImageDescription><marketingImageDisplayCallToAction><text>Yehuda 
Call</text></marketingImageDisplayCallToAction></ad><status>PAUSED</status></value></rval></mutateResponse></soap:Body></soap:Envelope>


3. Failed ad update:

        [2019-09-04 12:16:50] AW_SOAP.WARNING: clientCustomerId=719-913-6192 
operations=1 service=AdService method=mutate responseTime=221 
requestId=000591b92e07afe702ab44e6d10927bb server=adwords.google.com isFault=1 
faultMessage=[AdError.INVALID_AD_TYPE @ operations[0].operand.id]
        [2019-09-04 12:16:50] AW_SOAP.NOTICE: POST 
/api/adwords/cm/v201809/AdService?wsdl HTTP/1.1
        Host: adwords.google.com
        Connection: close
        User-Agent: PHP-SOAP/7.1.20
        Content-Type: text/xml; charset=utf-8
        SOAPAction: ""
        Content-Length: 1615
        Authorization: REDACTED

        <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><SOAP-ENV:Header><ns1:RequestHeader><ns1:clientCustomerId>719-913-6192</ns1:clientCustomerId><ns1:developerToken>REDACTED</ns1:developerToken><ns1:userAgent>unknown
 (AwApi-PHP, googleads-php-lib/41.0.0, 
PHP/7.1.20)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns1:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:mutate><ns1:operations><ns1:operator>SET</ns1:operator><ns1:operand
 
xsi:type="ns1:GmailAd"><ns1:id>380880271870</ns1:id><ns1:finalUrls>https://www.elwaychrysler.com/used-Greeley-2017-Chevrolet-Colorado-ZR2-1GCPTEE18H1322122</ns1:finalUrls><ns1:teaser><ns1:headline>Colorado</ns1:headline><ns1:description>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</ns1:description><ns1:businessName>John Elway 
CDJR</ns1:businessName><ns1:logoImage><ns1:mediaId>20651470730</ns1:mediaId></ns1:logoImage></ns1:teaser><ns1:marketingImage><ns1:mediaId>20653964286</ns1:mediaId></ns1:marketingImage><ns1:marketingImageHeadline>Colorado</ns1:marketingImageHeadline><ns1:marketingImageDescription>Find
 the Perfect Used Colorado at John Elway Chrysler Dodge Jeep 
Ram</ns1:marketingImageDescription><ns1:marketingImageDisplayCallToAction><ns1:text>Yehuda
 
Call</ns1:text></ns1:marketingImageDisplayCallToAction></ns1:operand></ns1:operations></ns1:mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>

        HTTP/1.1 500 Internal Server Error
        Content-Type: text/xml; charset=UTF-8
        Date: Wed, 04 Sep 2019 12:16:51 GMT
        Expires: Wed, 04 Sep 2019 12:16:51 GMT
        Cache-Control: private, max-age=0
        X-Content-Type-Options: nosniff
        X-Frame-Options: SAMEORIGIN
        X-XSS-Protection: 1; mode=block
        Server: GSE
        Alt-Svc: quic=":443"; ma=2592000; v="46,43,39"
        Accept-Ranges: none
        Vary: Accept-Encoding
        Connection: close

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Header><ResponseHeader
 
xmlns="https://adwords.google.com/api/adwords/cm/v201809";><requestId>000591b92e07afe702ab44e6d10927bb</requestId><serviceName>AdService</serviceName><methodName>mutate</methodName><operations>1</operations><responseTime>221</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 ideas?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0ffa9be0-e202-4f1d-8969-641446827574%40googlegroups.com.

Reply via email to