SaveAd using python api 1.15 No error message, but No new ad created

Skip to first unread message

zamplus zamplus

Oct 28, 2011, 9:26:07 AM10/28/11
to Google's DoubleClick for Advertisers API Forum

I am trying to explicitly create a new default ad using the DFA
API v1.15. python.

The campaign and creative are already created and ready to go.
After SaveAd , I got no error, but there is no new Ad created.

I am unsure on how to resolve this. Any help will be appreciated.

Here is some example code of what I am attempting. Thanks.

image_ad ={
'xsi_type': 'DefaultAd',
'id': '0',
'active': u'false',
'archived': u'false',
'endTime' : end_date,
'startTime': start_date,
'typeId': my_enums.DFA_STANDARD_AD,
'startDate': start_date,
'endDate': end_date,
'sequence': u'1',
'weight': u'1',

*** Incoming HTTP headers
HTTP/1.? 200 OK
Content-Type: text/xml;charset=utf-8
Vary: Accept-Encoding
Date: Fri, 28 Oct 2011 12:51:28 GMT
Server: Google
*** Incoming SOAP
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="
envelope/" xmlns:xsd=""
<saveAdResponse soapenv:encodingStyle="
<ns1:AdSaveResult href="#id0" xmlns:ns1="
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://" xmlns:ns2="http://" xmlns:soapenc="http://" xsi:type="ns2:AdSaveResult">
<id xsi:type="xsd:long">0</id>

DFA API Advisor

Oct 28, 2011, 10:55:22 AM10/28/11
to Google's DoubleClick for Advertisers API Forum
Hello there!

Hmm, this is interesting. One thing I think may be a problem is that
your typeId is set to Standard Ad, but DefaultAds have their own type
ID numbers. You can find the listing here: You
probably want ID 13 or 14, while Standard Ads are type 1.

There are other reasons this DefaultAd may be a problem. Do you
already have a DefaultAd of the same dimensions (sizeId) in this
campaign? You're only allowed to have 1 default ad for each slot size
per campaign.

In troubleshooting this issue, I've noticed that saving a faulty
DefaultAd seems to give a success message with a returned ID of 0, as
it did for you. This is a problem unique to the DefaultAd ad type. I
will bring this issue up and try to get better error messages attached
to these ads.

Let me know if neither of these suggestions helps.

- Joseph DiLallo, the DFA API Team
>" xmlns:ns2="" xmlns:soapenc="http://
Reply all
Reply to author
0 new messages