5

We are trying to export the subscribers from a list. We can see that the the list has 1.4 million subcribers:

curl -X POST -k -H "Content-Type: application/json" -H "Authorization: Bearer udxcbspxxbtng27vvx8pthz4" --data-binary @getListSizes.json https://www.exacttargetapis.com/email/v1/lists/subscribercounts

where the getListSizes.json file is

{"listIdsSubscriberCounts":
  [
    {"listId":1048647},
    {"listId":975390},
    {"listId":969054},
    {"listId":1007526}  
  ] 
}

yields these results

[{"listId":1048647,"subscriberCount":1240259},
 {"listId":975390,"subscriberCount":1473780},
 {"listId":969054,"subscriberCount":1473780},
 {"listId":1007526,"subscriberCount":1251534}]

So we know that the list with ID = 975390 has 1,473,780 subscribers in it. But when we execute this request...

<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Header>
    <fueloauth xmlns="http://exacttarget.com">csb7juxf5jg2rkjytqvh8khb</fueloauth>
  </Header>
  <Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <RetrieveRequest>
        <ObjectType>ListSubscriber</ObjectType>
        <Properties>CreatedDate</Properties>
        <Properties>Client.ID</Properties>
        <Properties>SubscriberKey</Properties>
        <Properties>Status</Properties>
        <Properties>UnsubscribedDate</Properties>
        <Properties>ID</Properties>
        <Properties>Client.PartnerClientKey</Properties>
        <Filter xsi:type="SimpleFilterPart">
          <Property>ListID</Property>
          <SimpleOperator>equals</SimpleOperator>
          <Value>975390</Value>
        </Filter>
      </RetrieveRequest>
    </RetrieveRequestMsg>
  </Body>
</Envelope>

will give this result after a minute or 10...

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Header>
    <wsa:Action>RetrieveResponse</wsa:Action>
    <wsa:MessageID>urn:uuid:6576c6f7-f7af-4611-b2e7-4ed31c012cd0</wsa:MessageID>
    <wsa:RelatesTo>urn:uuid:59d9554d-4e48-415c-8b04-f17df686de23</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
    <wsse:Security>
      <wsu:Timestamp wsu:Id="Timestamp-9bba2a37-7d89-4644-ae9c-4305a8998953">
        <wsu:Created>2015-03-08T03:48:13Z</wsu:Created>
        <wsu:Expires>2015-03-08T03:53:13Z</wsu:Expires>
      </wsu:Timestamp>
    </wsse:Security>
  </soap:Header>
  <soap:Body>
    <RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <OverallStatus>OK</OverallStatus>
      <RequestID>b99068a1-f5d0-4eed-aa12-94e7a61483ef</RequestID>
    </RetrieveResponseMsg>
  </soap:Body>
</soap:Envelope>

This is cracked. How can you return OK when clearly something is wrong? Note that we have seen this query succeed on occasion, but not since last night. We have a major media push for our client on Monday, who is on the verge of dumping ExactTarget for just this reason. We can't reliably export the data. Something will invariably fail well before we get to the end of this list. What can we do differently?

Also note that the access tokens are valid when we do this, we refresh them every 50 minutes or so. That's not the problem.

Finally, please don't suggest the FTP route, our client wants their email campaigns automatically merged with their social campaigns. It has to be programatic.

Any help at all would be appreciated.

0

You didn't mention the type of ET account you have, so I'll assume it's an Enterprise 2.0 account.

I'd recommend specifying the Client.ID:

Request:

<?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:5bfeb4d6-ff33-42ab-a03e-3ec3eec533a6</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">https://webservice.exacttarget.com/Service.asmx</a:To>
      <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
         <u:Timestamp u:Id="_0">
            <u:Created>2015-03-09T12:43:09.701Z</u:Created>
            <u:Expires>2015-03-09T12:48:09.701Z</u:Expires>
         </u:Timestamp>
         <o:UsernameToken u:Id="uuid-5229fc62-6eae-451f-91b4-34ad552b63a2-3">
            <o:Username><!-- Removed--></o:Username>
            <o:Password><!-- Removed--></o:Password>
         </o:UsernameToken>
      </o:Security>
   </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>
            <ClientIDs>
               <ClientID>BU MID GOES HERE</ClientID>
            </ClientIDs>
            <ObjectType>ListSubscriber</ObjectType>
            <Properties>Client.ID</Properties>
            <Properties>Client.PartnerClientKey</Properties>
            <Properties>CreatedDate</Properties>
            <Properties>ID</Properties>
            <Properties>ListID</Properties>
            <Properties>ModifiedDate</Properties>
            <Properties>ObjectID</Properties>
            <Properties>Status</Properties>
            <Properties>SubscriberKey</Properties>
            <Filter xsi:type="ComplexFilterPart">
               <LeftOperand xsi:type="SimpleFilterPart">
                  <Property>ListID</Property>
                  <SimpleOperator>equals</SimpleOperator>
                  <Value>31756454</Value>
               </LeftOperand>
               <LogicalOperator>AND</LogicalOperator>
               <RightOperand xsi:type="SimpleFilterPart">
                  <Property>Client.ID</Property>
                  <SimpleOperator>equals</SimpleOperator>
                  <Value>BU MID GOES HERE</Value>
               </RightOperand>
               <AdditionalOperands />
            </Filter>
            <Retrieves />
         </RetrieveRequest>
      </RetrieveRequestMsg>
   </s:Body>
</s:Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <wsa:Action>RetrieveResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:7895e732-6d8d-4354-b49f-1c7632da876e</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:5bfeb4d6-ff33-42ab-a03e-3ec3eec533a6</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-599aef55-653c-4152-b0d1-df21762c49e7">
            <wsu:Created>2015-03-09T12:43:11Z</wsu:Created>
            <wsu:Expires>2015-03-09T12:48:11Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </env:Header>
   <soap:Body>
      <RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <OverallStatus>OK</OverallStatus>
         <RequestID>91f14b77-c520-486b-ba11-6907f91d7515</RequestID>
         <Results xsi:type="ListSubscriber">
            <Client>
               <ID><!-- REMOVED --></ID>
            </Client>
            <PartnerKey xsi:nil="true" />
            <CreatedDate>2013-10-01T14:34:00</CreatedDate>
            <ModifiedDate>2014-02-03T15:47:00</ModifiedDate>
            <ID>953328655</ID>
            <ObjectID>5004725354</ObjectID>
            <Status>Unsubscribed</Status>
            <ListID>31756454</ListID>
            <SubscriberKey>test@email.com</SubscriberKey>
         </Results>
         <Results xsi:type="ListSubscriber">
            <Client>
               <ID><!-- REMOVED --></ID>
            </Client>
            <PartnerKey xsi:nil="true" />
            <CreatedDate>2014-08-15T13:10:00</CreatedDate>
            <ModifiedDate>2014-08-15T13:10:00</ModifiedDate>
            <ID>982568453</ID>
            <ObjectID>5604149869</ObjectID>
            <Status>Active</Status>
            <ListID>31756454</ListID>
            <SubscriberKey>test2@email.com</SubscriberKey>
         </Results>
         <Results xsi:type="ListSubscriber">
            <Client>
               <ID><!-- REMOVED --></ID>
            </Client>
            <PartnerKey xsi:nil="true" />
            <CreatedDate>2014-08-15T13:07:00</CreatedDate>
            <ModifiedDate>2014-08-15T13:07:00</ModifiedDate>
            <ID>1080267646</ID>
            <ObjectID>5604146673</ObjectID>
            <Status>Active</Status>
            <ListID>31756454</ListID>
            <SubscriberKey>test3@email.com</SubscriberKey>
         </Results>
      </RetrieveResponseMsg>
   </soap:Body>
</soap:Envelope>
| improve this answer | |
  • Thanks Adam, The Client ID made no difference. I am not sure what kind of account it is, we have an API Integration app attached to our client's account. They are a very large media company with 14M users in a master list and 4+ Business Units off of that, each filtering the master list. We are trying to export the master list from one of the business units. The master list id and the "All Subscribers" lists both return zero records or time out. The list creation date is in May 2010. – Brent Haines Mar 9 '15 at 23:22
  • I'd check on the permissions of your API user. – Adam Spriggs Mar 10 '15 at 10:57
  • 1
    Which permissions do we need to have? We can query more recent users and we can query a filter group on the master list, but we can't get users from the master list. – Brent Haines Mar 13 '15 at 21:42

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.