ApplyProductPartitionActions internal error

Demi Yo 1 Reputation point
2022-12-15T01:36:10.837+00:00

Docs are unclear. And I'm getting an internal error.

https://learn.microsoft.com/en-us/advertising/campaign-management-service/adgroupcriterion?view=bingads-13

If you generate the SOAP manually, use the type attribute...

Request:

POST /Api/Advertiser/CampaignManagement/V13/CampaignManagementService.svc HTTP/1.1  
Host: campaign.api.bingads.microsoft.com  
Connection: close  
Content-Type: text/xml; charset=utf-8  
SOAPAction: "ApplyProductPartitionActions"  
Content-Length: 3132  
  
<?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">  
  <SOAP-ENV:Header>  
    <ns1:CustomerAccountId>REDACTED</ns1:CustomerAccountId>  
    <ns1:CustomerId/>  
    <ns1:DeveloperToken>REDACTED</ns1:DeveloperToken>  
    <ns1:UserName/>  
    <ns1:Password/>  
    <ns1:AuthenticationToken>REDACTED</ns1:AuthenticationToken>  
  </SOAP-ENV:Header>  
  <SOAP-ENV:Body>  
    <ns1:ApplyProductPartitionActionsRequest>  
      <ns1:CriterionActions>  
        <ns1:AdGroupCriterionAction>  
          <ns1:Action>Update</ns1:Action>  
          <ns1:AdGroupCriterion type="BiddableAdGroupCriterion">  
            <ns1:AdGroupId>REDACTED</ns1:AdGroupId>  
            <ns1:Id>REDACTED</ns1:Id>  
            <ns1:CriterionBid type="FixedBid">  
              <ns1:Amount>0.1234</ns1:Amount>  
            </ns1:CriterionBid>  
          </ns1:AdGroupCriterion>  
        </ns1:AdGroupCriterionAction>  
      </ns1:CriterionActions>  
    </ns1:ApplyProductPartitionActionsRequest>  
  </SOAP-ENV:Body>  
</SOAP-ENV:Envelope>  

Response:

HTTP/1.1 200 OK  
Content-Length: 730  
Connection: keep-alive  
Content-Type: text/xml; charset=utf-8  
Date: Thu, 15 Dec 2022 01:30:11 GMT  
Server: Kestrel  
x-ms-requestid: c0bc74a2-c00a-4a13-890d-419572752e1d  
x-ms-trackingid: c0bc74a2-c00a-4a13-890d-419572752e1d  
  
<?xml version="1.0"?>  
<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 &lt;serviceDebug&gt; 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>  

Yes I tried including the i:type and xmlns:i from the docs but that just throws a parsing error instead of an internal error.

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.
425 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Demi Yo 1 Reputation point
    2022-12-21T22:41:56.65+00:00

    After a lot of tinkering I resolved it with this:

    <ns1:AdGroupCriterionAction>  
        <ns1:Action>Update</ns1:Action>  
        <ns1:AdGroupCriterion xsi:type="ns1:BiddableAdGroupCriterion">  
            <ns1:AdGroupId>REDACTED</ns1:AdGroupId>  
            <ns1:Criterion xsi:nil="true"/>  
            <ns1:Id>REDACTED</ns1:Id>  
            <ns1:Status xsi:nil="true"/>  
            <ns1:Type xsi:nil="true"/>  
            <ns1:CriterionBid xsi:type="ns1:FixedBid">  
                <ns1:Type xsi:nil="true"/>  
                <ns1:Amount>0.1234</ns1:Amount>  
            </ns1:CriterionBid>  
            <ns1:DestinationUrl xsi:nil="true"/>  
            <ns1:EditorialStatus xsi:nil="true"/>  
            <ns1:FinalAppUrls xsi:nil="true"/>  
            <ns1:FinalMobileUrls xsi:nil="true"/>  
            <ns1:FinalUrlSuffix xsi:nil="true"/>  
            <ns1:FinalUrls xsi:nil="true"/>  
            <ns1:TrackingUrlTemplate xsi:nil="true"/>  
            <ns1:UrlCustomParameters xsi:nil="true"/>  
            <ns1:CriterionCashback xsi:nil="true"/>  
        </ns1:AdGroupCriterion>  
    </ns1:AdGroupCriterionAction>  
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.