+ Start a Discussion
Dr. Thomas MillerDr. Thomas Miller 

Marketing Cloud SOAP API Bad Request Error

I am firing a SOAP request to Marketing Cloud to update a subscriber, and get back a "400 Bad request" error.
The call is modeled against the example from , except that is used an OAuth token - but the username/password version doesn't work either.
Any idea what is wrong?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
   <soapenv:Header>
   <fueloauth>authtoken</fueloauth>
   </soapenv:Header>soapenv:Header>
   <soapenv:Body>
      <par:UpdateRequest>
         <par:Options/>
         <par:Objects xsi:type="Subscriber">
           <PartnerKey xsi:nil="true"/>
           <ObjectID xsi:nil="true"/>
            <par:Attributes>
                <par:Name>First Name</par:Name>
                <par:Value>Updated</par:Value>
            </par:Attributes>
            <par:SubscriberKey>0036E00000V1YtyQAF</par:SubscriberKey>
         </par:Objects>
      </par:UpdateRequest>
   </soapenv:Body>
</soapenv:Envelope>
Dr. Thomas MillerDr. Thomas Miller
Reference added:
https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/updating_subscriber_attributes_using_the_update_method.htm
Santosh Reddy MaddhuriSantosh Reddy Maddhuri
Hi Thomas,

Try changing the code snippet 

FROM : 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
   <soapenv:Header>
   <fueloauth>authtoken</fueloauth>
   </soapenv:Header>soapenv:Header>

TO :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
   <soapenv:Header>
   <fueloauth>authtoken</fueloauth>
   </soapenv:Header>


Hope this helps!

Regards,

Santosh.