php client - error when trying to change TargetCpa value using CampaignManagementExampleHelper::UpdateCampaigns()

Chris Wotton 1 Reputation point
2022-04-04T10:51:19.737+00:00

When I call $response = CampaignManagementExampleHelper::UpdateCampaigns($_campaign['customer_id'], $campaigns); I get the below error. I am trying to change the value of TargetCpa. I'm able to update a campaign name, but as soon as i try to mutate the TargetCpa i just get server errors.

I am using the php client library.

Please advise.

ERROR:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode><faultstring xml:lang="en-US">The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.</faultstring></s:Fault></s:Body></s:Envelope>

REQUEST:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v13" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
 <SOAP-ENV:Header>
 [REMOVED]
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>
 <ns1:UpdateCampaignsRequest>
 <ns1:AccountId>[REMOVED]</ns1:AccountId>
 <ns1:Campaigns>
 <ns1:Campaign>
 <ns1:AudienceAdsBidAdjustment>0</ns1:AudienceAdsBidAdjustment>
 <ns1:BiddingScheme>
 <ns1:Type>TargetCpa</ns1:Type>
 </ns1:BiddingScheme>
 <ns1:BudgetType>DailyBudgetStandard</ns1:BudgetType>
 <ns1:DailyBudget>100</ns1:DailyBudget>
 <ns1:ExperimentId xsi:nil="true"/><ns1:FinalUrlSuffix xsi:nil="true"/>
 <ns1:ForwardCompatibilityMap/>
 <ns1:Id>[REMOVED]</ns1:Id>
 <ns1:Name>STU TESTER #121</ns1:Name>
 <ns1:Status>Paused</ns1:Status>
 <ns1:SubType xsi:nil="true"/>
 <ns1:TimeZone>GreenwichMeanTimeDublinEdinburghLisbonLondon</ns1:TimeZone>
 <ns1:TrackingUrlTemplate xsi:nil="true"/><ns1:UrlCustomParameters xsi:nil="true"/>
 <ns1:CampaignType>Search</ns1:CampaignType>
 <ns1:Settings xsi:nil="true"/>
 <ns1:BudgetId xsi:nil="true"/><ns1:Languages>
 <ns2:string>English</ns2:string></ns1:Languages>
 </ns1:Campaign>
 </ns1:Campaigns>
 </ns1:UpdateCampaignsRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
392 questions
{count} votes