In my code, I'm creating a new TemplateAd and then setting it with the
same fields (just changing the destination URL) from another
TemplateAd.  For some reason, it's throwing an exception on a
"videoId" field which isn't even in the original TemplateAd.  Is this
field a requirement (even if it's an old TemplateAd that doesn't even
contain the field)?  How do I set the videoId if I don't even know
what it is?

Here's my SOAP request:
-----------------BEGIN API CALL---------------------

Request
-------

POST /api/adwords/cm/v201008/AdGroupAdService
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 4.0.30319.1)
VsDebuggerCausalityData: uIDPozq+WZs+pj1Oqa4qoy3FAi0AAAAA
+vy1v2sWBUCqvWN6tqSyOCpHkFnfBUdFk18VKTMgstYACQAA
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Host: adwords.google.com
Content-Length: 2744
TimeStamp: Wed, 29 Jun 2011 17:04:23 GMT

<?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:xsd="http://www.w3.org/2001/
XMLSchema"><soap:Header><RequestHeader xmlns="https://
adwords.google.com/api/adwords/cm/v201008"><applicationToken>******</
applicationToken><authToken>******</authToken><developerToken>******</
developerToken></RequestHeader></soap:Header><soap:Body><mutate
xmlns="https://adwords.google.com/api/adwords/cm/
v201008"><operations><operator>ADD</
operator><operand><adGroupId>1545399245</adGroupId><ad
xsi:type="TemplateAd"><url>http://tracking.media.com/redirect/
Redirect.aspx?g_crID={creative}&amp;g_kw={keyword}
&amp;g_pcmt={placement}&amp;g_cnt={ifsearch:0}{ifcontent:1}</
url><displayUrl>youtube.com/BlahBlahBlah</
displayUrl><trademarkDisapproved>false</
trademarkDisapproved><Ad.Type>TemplateAd</Ad.Type><templateId>13</
templateId><templateElements><uniqueName>adData</
uniqueName><fields><name>adName</name><type>TEXT</
type><fieldText>YouTube Page - BlahBlahBlah</fieldText></
fields><fields><name>headline</name><type>TEXT</
type><fieldText>BlahBlahBlah Strategies</fieldText></
fields><fields><name>description1</name><type>TEXT</
type><fieldText>Blah Blah Blah</fieldText></
fields><fields><name>description2</name><type>TEXT</
type><fieldText>View Our Video Series Today!</fieldText></
fields><fields><name>channelName</name><type>TEXT</
type><fieldText>CleanMyCredit</fieldText></
fields><fields><name>imageUrl</name><type>URL</type><fieldText>http://
i4.ytimg.com/vi/S-NoUdY8izU/default.jpg</fieldText></
fields><fields><name>displayUrl</name><type>VISIBLE_URL</
type><fieldText>youtube.com/BlahBlahBlah</fieldText></
fields><fields><name>destinationUrl</name><type>URL</
type><fieldText>http://tracking.media.com/redirect/Redirect.aspx?
g_crID={creative}&amp;g_kw={keyword}&amp;g_pcmt={placement}
&amp;g_cnt={ifsearch:0}{ifcontent:1}</fieldText></fields></
templateElements><name>YouTube Page - BlahBlahBlah</name><duration>0</
duration></ad><status>ENABLED</status></operand></operations></
mutate></soap:Body></soap:Envelope>

Response
--------

X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=UTF-8
Date: Thu, 30 Jun 2011 00:04:23 GMT
Expires: Thu, 30 Jun 2011 00:04:23 GMT
Server: GSE
TimeStamp: Wed, 29 Jun 2011 17:04:23 GMT

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Header><ResponseHeader xmlns="https://
adwords.google.com/api/adwords/cm/
v201008"><requestId>e3f4d6f2c4a09887f8aab986c67e977d</
requestId><operations>1</operations><responseTime>317</
responseTime><units>40</units></ResponseHeader></
soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>[AdError.MISSING_REQUIRED_TEMPLATE_FIELDS @
operations[0].operand.ad.templateElements[0].fields;
trigger:'videoId']</faultstring><detail><ApiExceptionFault
xmlns="https://adwords.google.com/api/adwords/cm/
v201008"><message>[AdError.MISSING_REQUIRED_TEMPLATE_FIELDS @
operations[0].operand.ad.templateElements[0].fields;
trigger:'videoId']</message><ApplicationException.Type>ApiException</
ApplicationException.Type><errors xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:type="AdError"><fieldPath>operations[0].operand.ad.templateElements[0].fields</
fieldPath><trigger>videoId</
trigger><errorString>AdError.MISSING_REQUIRED_TEMPLATE_FIELDS</
errorString><ApiError.Type>AdError</
ApiError.Type><reason>MISSING_REQUIRED_TEMPLATE_FIELDS</reason></
errors></ApiExceptionFault></detail></soap:Fault></soap:Body></
soap:Envelope>
-----------------END API CALL-----------------------

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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

Reply via email to