I am using the Marketing Cloud SOAP API to update some data within my Data Extension using the following payload.
Header:
POST /Service.asmx HTTP/1.1
Host: myserverid.soap.marketingcloudapis.com
Content-Type: text/xml
SOAPaction: Update
Payload:
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<fueloauth>MYKEYGOESHERE</fueloauth>
</s:Header>
<s:Body>
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Options>
<SaveOptions>
<SaveOption>
<PropertyName>DataExtensionObject</PropertyName>
<SaveAction>UpdateAdd</SaveAction>
</SaveOption>
</SaveOptions>
<RequestType>Asynchronous</RequestType>
</Options>
<Objects xsi:type="DataExtensionObject">
<CustomerKey>MYDEKEY</CustomerKey>
<Properties>
<Property>
<Name>subscriberkey</Name>
<Value>TestSubscriberKey123</Value>
</Property>
<Property>
<Name>mobilenumber</Name>
<Value>08123456798</Value>
</Property>
<Property>
<Name>firstname</Name>
<Value>Janet</Value>
</Property>
<Property>
<Name>lastname</Name>
<Value>Doe 123</Value>
</Property>
</Properties>
</Objects>
</UpdateRequest>
</s:Body>
</s:Envelope>
However I get a Bad Request error.
EDIT: Updated payload
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<fueloauth>MYSECRETKEY</fueloauth>
</s:Header>
<s:Body>
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Options>
<SaveOptions>
<SaveOption>
<PropertyName>DataExtensionObject</PropertyName>
<SaveAction>UpdateAdd</SaveAction>
</SaveOption>
</SaveOptions>
<RequestType>Asynchronous</RequestType>
</Options>
<Objects xsi:type="DataExtensionObject">
<CustomerKey>MYDEKEY</CustomerKey>
<Keys>
<Key>
<Name>subscriberkey</Name>
<Value>TestSubscriberKey123</Value>
</Key>
</Keys>
<Properties>
<Property>
<Name>subscriberkey</Name>
<Value>TestSubscriberKey123</Value>
</Property>
<Property>
<Name>mobilenumber</Name>
<Value>08123456798</Value>
</Property>
<Property>
<Name>firstname</Name>
<Value>Janet</Value>
</Property>
<Property>
<Name>lastname</Name>
<Value>Doe 123</Value>
</Property>
</Properties>
</Objects>
</UpdateRequest>
</s:Body>
</s:Envelope>