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
Best Answer
Add
<ContinueRequest>requestID</ContinueRequest>
within theRetreiveRequest
section of the SOAP Envelope.