Explanation of Stream Position in getMultipleLeads

Anonymous
Not applicable

Explanation of Stream Position in getMultipleLeads

We have had an issue where we are trying to use getMultipleLeads but it is returning 23k records so we keep getting the same 1k records.  I'm wondering if the streamposition option will allow me to specify the next batch but I'm not sure if that is the correct use and if so, what value we should be passing to avoid duplicates.
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Explanation of Stream Position in getMultipleLeads

Hi Bill - The StreamPosition is the right approach to paginate through a large list of records.  In the response of the first call you'll see a newStartPosition node.  Take all the fields such as offset and latestCreateAt from newStartPosition and populate the startPosition values for the subsequent API calls to get the next set of records.
 
Sample XML Response:
        <newStartPosition>
          <latestCreatedAt>2013-07-31T21:33:59-05:00</latestCreatedAt>
          <oldestCreatedAt xsi:nil="true" />
          <activityCreatedAt xsi:nil="true" />
          <offset>ID:1024814</offset>
        </newStartPosition>