Can't Creat Campaigns


i error campaign description invalid, im sure is. 

my xml request

<?xml version="1.0" encoding="utf-8"?><env:envelope xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:wsdl="https://bingads.microsoft.com/campaignmanagement/v9" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:header><wsdl:authenticationtoken>token</wsdl:authenticationtoken><wsdl:developertoken>token</wsdl:developertoken><wsdl:customeraccountid>***</wsdl:customeraccountid></env:header><env:body><wsdl:addcampaignsrequest xmlns="https://bingads.microsoft.com/campaignmanagement/v9"><wsdl:accountid>***</wsdl:accountid><wsdl:campaigns><wsdl:campaign><wsdl:budgettype>monthlybudgetspenduntildepleted</wsdl:budgettype><wsdl:monthlybudget>20.0</wsdl:monthlybudget><wsdl:daylightsaving>false</wsdl:daylightsaving><wsdl:description>perfect new campaign</wsdl:description><wsdl:name>netshoes</wsdl:name><wsdl:timezone>brasilia</wsdl:timezone></wsdl:campaign></wsdl:campaigns></wsdl:addcampaignsrequest></env:body></env:envelope>

the response

<s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:body><s:fault><faultcode>s:server</faultcode><faultstring xml:lang="en-us">invalid client data. check soap fault details more information</faultstring><detail><apifaultdetail xmlns="https://bingads.microsoft.com/campaignmanagement/v9" xmlns:i="http://www.w3.org/2001/xmlschema-instance"><trackingid xmlns="https://adapi.microsoft.com">82236e5c-69fe-4818-b0a3-06d7c36b78ae</trackingid><batcherrors><batcherror><code>1104</code><details i:nil="true"/><errorcode>campaignserviceinvalidcampaigndescription</errorcode><index>0</index><message>the campaign description invalid.</message><type>batcherror</type></batcherror><batcherror><code>1110</code><details i:nil="true"/><errorcode>campaignservicedaylightsavingnotenabled</errorcode><index>0</index><message>daylight saving time should set campaign.</message><type>batcherror</type></batcherror></batcherrors><operationerrors/></apifaultdetail></detail></s:fault></s:body></s:envelope>


hello.

when create soap request message, order of elements within soap body critical. elements must in same order defined in web services description language (wsdl). if required elements out of order, call fail. if optional elements out of order, call may fail or elements ignored. wsdl syntax, shows correct order of elements, included each request message, response message, , data object documented in reference content e.g. addcampaigns (v9 | v10). more information, please see soap element xml order in bing ads services protocol guide.

in example above sending monthlybudget ahead of daylightsaving , description, whereas service expecting daylightsaving , description ahead of monthlybudget. resolve, should order daylightsaving , description ahead of monthlybudget shown below. 

<wsdl:campaigns>   <wsdl:campaign     <wsdl:budgettype>monthlybudgetspenduntildepleted</wsdl:budgettype>     <wsdl:daylightsaving>false</wsdl:daylightsaving>     <wsdl:description>perfect new campaign</wsdl:description>     <wsdl:monthlybudget>20.0</wsdl:monthlybudget>     <wsdl:name>netshoes</wsdl:name>     <wsdl:timezone>brasilia</wsdl:timezone>   </wsdl:campaign> </wsdl:campaigns>

please note announced sunset , remove v9 campaign management, bulk, optimizer , ad intelligence services @ end of calendar q2 2016. please migrate applications v9 v10 @ earliest convenience. migration, have provided guide migration bing ads api v9 v10.

i hope helps!



Bing Ads API: Development  >  Bing Ads API: Development



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'