0

I've done a bit of research and turns out it is possible to retrieve data from Data Extension with SOAP but not with REST. So far I've only seen examples of importing data to Data Extension but not retrieving data. Can it be done? If so, how?

Ideally, I'd have a spring boot app that would essentially send a HTTP GET request and the response would contain the the data held in the data extension..

  • Welcome to SFSE! Please take a moment to scroll through the tour and read How to Ask. Please limit your questions to one per post, unless they are very tightly coupled. Please also phrase what you are asking as a question rather than a plea for help. Thanks! – Adrian Larson Apr 23 at 16:33
4

An example is included in the help docs:

https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/retrieving_data_from_a_data_extension.htm

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
 <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
 <fueloauth xmlns:ns1="http://exacttarget.com">XXXXXXXXX</fueloauth>
 </wsse:Security>
 </soapenv:Header>
 <soapenv:Body>
 <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
 <RetrieveRequest>
 <ObjectType>DataExtensionObject[Example DE]</ObjectType>
 <Properties>EMAIL_ADDRESS</Properties>
 <Properties>CUSTOMER_ID</Properties>
 <Properties>FIRST_NAME</Properties>
 <Properties>SITE_GROUP</Properties>
 <Filter xsi:type="SimpleFilterPart">
 <Property>EMAIL_ADDRESS</Property>
 <SimpleOperator>equals</SimpleOperator>
 <Value>acruz@example.com</Value>
 </Filter>
 </RetrieveRequest>
 </RetrieveRequestMsg>
 </soapenv:Body>
</soapenv:Envelope>

The API SDK are wrappers for SOAP and REST and are not required to be used

  • It is best practice to pull relevant info from the link (in this case the sample soap envelope) into your answer in case the link provided is ever changed. This way the answer will remain relevant, even if the source documentation is removed. – Gortonington Apr 23 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.