Hello,
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',
'name':u'testtesttest',
'id': '0',
'active': u'false',
'archived': u'false',
'campaignId':campaign_id,
'endTime' : end_date,
'startTime': start_date,
'sizeId':size_id,
'typeId': my_enums.DFA_STANDARD_AD,
'creativeAssignment':{
'active':u'True',
'startDate': start_date,
'endDate': end_date,
'creativeId':creativeId,
'sequence': u'1',
'weight': u'1',
'clickThroughUrl':{
'customClickThroughUrl':u'
http://www.baidu.com',
'defaultLandingPageUsed':u'False',
'landingPageId':u'0'
},
},
}
ad_service.SaveAd(image_ad)
*** 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="
http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<saveAdResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/
soap/encoding/">
<ns1:AdSaveResult href="#id0" xmlns:ns1="
http://www.doubleclick.net/
dfa-api/v1.15"/>
</saveAdResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://
www.doubleclick.net/dfa-api/v1.15" xmlns:soapenc="http://
schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:AdSaveResult">
<id xsi:type="xsd:long">0</id>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
************************************************************************