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..

1
  • 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
    Commented Apr 23, 2019 at 16:33

1 Answer 1

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>[email protected]</Value>
 </Filter>
 </RetrieveRequest>
 </RetrieveRequestMsg>
 </soapenv:Body>
</soapenv:Envelope>

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

2
  • 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. Commented Apr 23, 2019 at 16:27
  • Oddly enough, somewhat per Gortonington's point, that page does not currently reflect OAuth usage. It instead illustrates usage of the traditional username/password method. There is no mention of the OAuth token or the fueloauth tags. Currently trying to wrap my head around what's going on with this myself.
    – andrewb
    Commented Apr 1, 2020 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .