Retrieve More than 2500 Records Using the ContinueRequest Property

The SOAP API returns up to 2,500 records at a time per retrieve call. If the total number of records exceeds 2,500, the call includes a status update that more data is available. You can use the code samples in the document to retrieve those more records using ContinueRequest.

Code Examples 

Use these code examples to create your own API retrieve calls.

Sample .NET Code 

1//Do While MoreDataAvailable
2do
3{
4    status = client.Retrieve(rr, out requestID, out Results);
5    Console.WriteLine("Total Records: " + Results.Length);
6    //Display Results
7    for (int i = 0; i < Results.Length; i++)
8    {
9        sEvent = (SentEvent)Results[i];
10        Console.WriteLine("SubKey on Event: " + sEvent.SubscriberKey);
11    }
12    //This call the API again to get the next 2500 records
13    rr = new RetrieveRequest();
14    rr.ContinueRequest = requestID;
15}while (status.Equals("MoreDataAvailable"));//This means there are more than 2500 records
16Console.WriteLine("DONE!");