Can not AddAds

Hi Everyone,

I am trying to add an ad over nusoap throught MSN adcenter API.

I am using the following method : CampaignManagement.AddAds
The example is visible here : https://adcenterapi.microsoft.com/v3/CampaignManagement/CampaignManagement.asmx op=AddAds

I am sending the following envelope :

< xml version="1.0" encoding="ISO-8859-1" >
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<ApiUserAuthHeader xmlns="http://adcenter.microsoft.com/syncapis">
<UserName>XXX</UserName>
<Password>XXX</Password>
<UserAccessKey>XXXX</UserAccessKey>
</ApiUserAuthHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<AddAds xmlns="http://adcenter.microsoft.com/syncapis">
<APIFlags>0</APIFlags>
<OrderId>XXXX</OrderId>
<Ads>
<AdCenterAdvertisement>
<AdId>0</AdId>
<AdTitle>blablabla</AdTitle>
<AdDescription>blablabla</AdDescription>
<DisplayURL>www.mydomain.com</DisplayURL>
<DestinationURL>http://mydomain.com/ cl=XXX&id=XXXX&kw={keyword}&nt=search&cr={AdId}&kws={QueryString}</DestinationURL>
</AdCenterAdvertisement>
</Ads>
</AddAds>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Regarding the <AdId> entry, it is not very clear for me what to put as I do not know the ad id. I tried with 0, with nothing or with a big int.

Everytime, MSN adcenter API replies "bool(false)" (with no error). I can not figure out what is wrong...

Any idea

I need your help :)

Denis



Answer this question

Can not AddAds

  • Constructor

    Hi Denis,

    when adding ads I omit the AdId parameter and it works fine.

    Have you tried with a simple destination URL without all the parameters such as {keyword}

    I personally set the destination URL of the ad to {param1} and I put the proper destination URL in SubstParam1 of the keyword, and I also add for instance m={MatchType}.

    Hope that helps.

  • Iago

    Hi Julien,

    Thank you for your help : I removed the <AdId> parameter but it was still not working.

    Than I removed my extra parameters in the destination url and it worked.

    So I added again my extra parameters but replaced & by &amp; and it worked !

    Thank you for your help :)

    Denis

  • MagnusJ

    he he glad to hear I helped. ;)

  • Can not AddAds