Exception while adding a template Ad

179 views
Skip to first unread message

Narendra Mohan

unread,
Sep 25, 2014, 10:34:49 AM9/25/14
to adwor...@googlegroups.com
Hi ,

I am using V201402 and I am trying to Add a template ad but getting an error "[AdError.AD_FORMAT_NOT_SPECIFIED @ operations[0].operand.ad.adFormat]".

I'd very much appreciate if you can provide guidance on how/where to set the AD_FORMAT.  Can't seem find it anywhere in the API.

 .

The Request going to API :


<Operation xmlns:q2="https://adwords.google.com/api/adwords/cm/v201402" xsi:type="q2:AdGroupAdOperation">
    <q2:operator>ADD</q2:operator>
    <q2:operand>
      <q2:adGroupId>10032677681</q2:adGroupId>
      <q2:ad xsi:type="q2:TemplateAd">
        <q2:url>http://www.test.com</q2:url>
        <q2:displayUrl>www.test.com</q2:displayUrl>
        <q2:templateId>277</q2:templateId>
        <q2:templateElements>
          <q2:uniqueName>adData</q2:uniqueName>
          <q2:fields>
            <q2:name>creationContext</q2:name>
            <q2:type>TEXT</q2:type>
            <q2:fieldText>WORKFLOW:BURDOCK,TEMPLATE_SOURCE:AD_GALLERY</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>backgroundColor</q2:name>
            <q2:type>ENUM</q2:type>
            <q2:fieldText>#ffffff</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>layout</q2:name>
            <q2:type>ENUM</q2:type>
            <q2:fieldText>blank_V1</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_Height</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>30</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_Width</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>100</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_Z</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>3</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_TextSize</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>18</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_ButtonColor</q2:name>
            <q2:type>ENUM</q2:type>
            <q2:fieldText>#000000</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_TextColor</q2:name>
            <q2:type>ENUM</q2:type>
            <q2:fieldText>#ffffff</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_TextFont</q2:name>
            <q2:type>ENUM</q2:type>
            <q2:fieldText>arialuni</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_BUTTON_0_Text</q2:name>
            <q2:type>TEXT</q2:type>
            <q2:fieldText>Learn more</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_IMAGE_0_Z</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>1</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_IMAGE_0_Image</q2:name>
            <q2:type>IMAGE</q2:type>
            <q2:fieldMedia xsi:type="q2:Image">
              <q2:mediaId>1093813086</q2:mediaId>
              <q2:type>IMAGE</q2:type>
              <q2:referenceId>-6794462060366266368</q2:referenceId>
              <q2:dimensions>
                <q2:key>FULL</q2:key>
                <q2:value>
                  <q2:width>468</q2:width>
                  <q2:height>60</q2:height>
                </q2:value>
              </q2:dimensions>
              <q2:urls>
                <q2:key>FULL</q2:key>
              </q2:urls>
              <q2:mimeType>IMAGE_JPEG</q2:mimeType>
              <q2:sourceUrl>media://da/image?source=user_file&amp;id_from_source=imgad.jpg&amp;operation=original</q2:sourceUrl>
              <q2:Media.Type>Image</q2:Media.Type>
            </q2:fieldMedia>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_TEXT_0_Height</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>25</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_TEXT_0_Width</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>120</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_TEXT_0_Z</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>2</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_TEXT_0_TextSize</q2:name>
            <q2:type>NUMBER</q2:type>
            <q2:fieldText>20</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_TEXT_0_TextColor</q2:name>
            <q2:type>ENUM</q2:type>
            <q2:fieldText>#000000</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_TEXT_0_TextFont</q2:name>
            <q2:type>ENUM</q2:type>
            <q2:fieldText>arialuni</q2:fieldText>
          </q2:fields>
          <q2:fields>
            <q2:name>CUSTOM_TEXT_0_Text</q2:name>
            <q2:type>TEXT</q2:type>
            <q2:fieldText>TestAd1</q2:fieldText>
          </q2:fields>
        </q2:templateElements>
        <q2:dimensions>
          <q2:width>160</q2:width>
          <q2:height>600</q2:height>
        </q2:dimensions>
        <q2:name>Display Ad created 1/28/14</q2:name>
        <q2:duration>0</q2:duration>
      </q2:ad>
      <q2:status>PAUSED</q2:status>
    </q2:operand>
  </Operation>


Response

<?xml version="1.0" encoding="utf-16"?>
    <PlaceHolder />
  </results>
  <errors xsi:type="AdError" xmlns="https://adwords.google.com/api/adwords/cm/v201402">
    <fieldPath>operations[0].operand.ad.adFormat</fieldPath>
    <trigger />
    <errorString>AdError.AD_FORMAT_NOT_SPECIFIED</errorString>
    <ApiError.Type>AdError</ApiError.Type>
  </errors>
</SimpleMutateResult>

Josh Radcliff (AdWords API Team)

unread,
Sep 25, 2014, 12:49:20 PM9/25/14
to adwor...@googlegroups.com
Hi,

The list of supported template ad templates is here, and I don't see template ID 277 in that list. What type of template ad are you looking to create?

Thanks,
Josh, AdWords API Team

Narendra Mohan

unread,
Sep 26, 2014, 4:16:40 AM9/26/14
to adwor...@googlegroups.com
Hi Josh,

Thank you for your quick response.

I am trying to create a  general purpose Ad from Ad gallery.

I created this type of ad in API as below.

Ad Gallery --> General Purpose Ad --> Blank template.

We are getting template Id as 277 for the above created ad.

My selectors :

"TemplateId",
"TemplateAdUnionId",
"TemplateAdName",
"TemplateAdDuration",
"TemplateOriginAdId"

Josh Radcliff (AdWords API Team)

unread,
Sep 26, 2014, 3:10:42 PM9/26/14
to adwor...@googlegroups.com
Hi,

The only template types (IDs) supported by the API are the ones listed on the templates page I mentioned earlier. Since 277 is not on that page, you'll only be able to create those ads from the UI.

Cheers,
Josh, AdWords API Team

Christopher White

unread,
Nov 3, 2014, 4:47:08 PM11/3/14
to adwor...@googlegroups.com
Are there any plans to support additional templates that are currently only available via the UI?

Josh Radcliff (AdWords API Team)

unread,
Nov 4, 2014, 4:43:22 PM11/4/14
to adwor...@googlegroups.com
Hi,

Could you let me know which templates you would be interested in creating via the API and I'll pass that information along?

Thanks,
Josh, AdWords API Team

veseo

unread,
May 15, 2015, 10:38:45 AM5/15/15
to adwor...@googlegroups.com

Hi,

is there a possibility to support Templates with ID 424 via the API? We are interested in automated change of urls of these ads and it seems impossible to do it via the API for now (I'm getting the same error as the guy from the first message).

Josh Radcliff (AdWords API Team)

unread,
May 15, 2015, 11:42:19 AM5/15/15
to adwor...@googlegroups.com, herni...@gmail.com
Hi,

There are no immediate plans to add API support for additional template ad IDs. You'll have to use the user interface to make changes to unsupported template ads.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages