Stable Sort Through Constituent List

Hello,

I am wondering what the best practice is for retrieving a list of constituents via the Constituent List endpoint when a list_id is provided as a filter and maintaining a stable sort across multiple pages. The list also can contain constituents manually added to the list (not brought in by filter criteria alone)

Initially, I was querying by list_id with a limit of 5000/offset 0 and when a next_link was encountered in the response, the next_link in each subsequent response was queried until the end of the list was reached (final response contained no next_link).

In larger lists, I saw evidence that the sort between pages was not stable. I began passing a sort parameter so the next_link contained a sort token and the sort was stable between pages.

Currently, I am now encountering an issue where constituents manually added to a list show up in the next page even if they were in the previous page when using the above with a sort parameter.

1.) The initial request returns with the full count of the list (208) and a next link (even though there should be nothing in the next page)

2.) Next page returns a response that has a count of 1 with an item that was in the previous page. The only thing special about this item is it was manually added.

Main Question: What is the best way to query constituent lists by list ID with a stable sort between pages and not receive duplicates in the next page due to constituents being manually added to a list?