2

From my previous question (Connect to the SOAP API without using the SDK wrappers) I have managed to implement a successful call to the exact target soap API and receive some correct responses.

I now encounter the limit of 2500 records and am wondering how or where to (or even if I can) insert the ContinueRequest call in the soap envelope so I can continue to request the rest of the records.

Documentation of the ContinueRequest is here

Any help would be greatly appreciated.

UPDATE: 2015-08-17 After further searching through the very haphazard documentation for ExactTarget I found that if you add an item <ContinueRequest>RequestID</ContinueRequest> to your SOAP envelope it all seems to work perfectly.

Example SOAP Envelope to retrieve all subscribers:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <fueloauth xmlns="http://exacttarget.com"> auth_token </fueloauth>
  </Header>
  <Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <RetrieveRequest>
        <ObjectType>Subscriber</ObjectType>
        <Properties>CreatedDate</Properties>
        <Properties>Client.ID</Properties>
        <Properties>EmailAddress</Properties>
        <Properties>SubscriberKey</Properties>
        <Properties>Status</Properties>
        <Properties>UnsubscribedDate</Properties>
        <Properties>ID</Properties>
        <Properties>Client.PartnerClientKey</Properties>
      </RetrieveRequest>
    </RetrieveRequestMsg>
  </Body>
</Envelope>

Once you've got your first batch of 2500 records back you need to send the following as the next packet:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <fueloauth xmlns="http://exacttarget.com"> auth_token </fueloauth>
  </Header>
  <Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <RetrieveRequest>
        <ContinueRequest>requestID</ContinueRequest>
        <ObjectType>Subscriber</ObjectType>
        <Properties>CreatedDate</Properties>
        <Properties>Client.ID</Properties>
        <Properties>EmailAddress</Properties>
        <Properties>SubscriberKey</Properties>
        <Properties>Status</Properties>
        <Properties>UnsubscribedDate</Properties>
        <Properties>ID</Properties>
        <Properties>Client.PartnerClientKey</Properties>
      </RetrieveRequest>
    </RetrieveRequestMsg>
  </Body>
</Envelope>

Where the requestID is the request ID that was returned from your last SOAP request. The OverallStatus message lets you know if there are more records with a message of MoreDataAvailable

2

Add <ContinueRequest>requestID</ContinueRequest> within the RetreiveRequest section of the SOAP Envelope.

0

I believe paging is only available in REST, which is why the SDK (or at least the javaSDK) uses REST for a data fetch. Hope this helps!

  • The soap documentation talks to only returning 2500 records. It has also been my experience with preliminary calls that the soap api only returns 2500 records at a time. Undortunately the rest api isn't very comprehensive. – Dan Aug 16 '15 at 6:29

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.