0

I currently have been syncing subscribers using the .Net soap API:

https://help.marketingcloud.com/en/technical_library/web_service_guide/objects/listsubscriber/

Which gives me an easy way to get all subscribers (email and status) but it does not look like there is anyway to get the profile attributes along with this call.

So far it looks like the only way to get the attributes is to then call the Subscriber directly using:

https://help.marketingcloud.com/en/technical_library/web_service_guide/technical_articles/retrieving_profile_attributes_on_the_subscriber_object/

So first I would have to get the key or ID to pass to this API to get the attributes. Does anyone know of an easier way to avoid the double calls to get the full subscriber list along with the attributes for each subscriber?

1 Answer 1

1

Simply include the ID property in your request which will return all the Subscriber Profile Attributes (along with any other properties you want to retrieve). Here's a sample SOAP request envelope:

<?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>
      <a:Action s:mustUnderstand="1">Retrieve</a:Action>
      <a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">{{soapEndPoint}}/Service.asmx</a:To>
      <fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth>
   </s:Header>
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
            <ObjectType>Subscriber</ObjectType>
            <Properties>SubscriberKey</Properties>
            <Properties>ID</Properties>
            <Properties>EmailAddress</Properties>
            <Properties>Status</Properties>
            <Filter xmlns:q1="http://exacttarget.com/wsdl/partnerAPI" xsi:type="q1:SimpleFilterPart">
               <q1:Property>SubscriberKey</q1:Property>
               <q1:SimpleOperator>equals</q1:SimpleOperator>
               <q1:Value>[email protected]</q1:Value>
            </Filter>
         </RetrieveRequest>
      </RetrieveRequestMsg>
   </s:Body>
</s:Envelope>
3
  • I am doing a retrieve request using the ListSubscriber object which returns a list of subscribers but not the subscriber object as far as I can see.
    – james
    Commented Aug 31, 2016 at 15:57
  • Then when I retrieve the list of subscribers from the ListSunscribers call I can nest an additional call to Subscriber passing the SubscriberKey I get from the initial call. So I know I can do two separate calls but was hoping to get all subscribers from list as well as the granular subscriber profile attributes from one call.
    – james
    Commented Aug 31, 2016 at 16:05
  • The above turned out to be the only way (that I could find). So I am going to mark this as the correct answer as I can not pull subscriber attributes using the ListSubscribers method.
    – james
    Commented Sep 15, 2016 at 16:35

You must log in to answer this question.

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