API V1 contact_list not paging properly when using filter

I’m using V1 contact_list with a filter on a custom field to get all contacts who have been through an automation.

The problem is that when trying to load all the pages that meet the filter criteria, each page is just returning the same thing with result_code == 1 (something returned). Because of this our external system keeps asking for more pages thinking there are more results to get until eventually it hits a safety limit programed into it (if that wasn’t there it would have kept asking for more pages forever!).

Here is page 1 request:

…url…/admin/api.php?api_action=contact_list&api_key=…snip…&api_output=xml&filters[fields]
[%REQUIRES_SYNC%]=Yes&page=1

And page 1 response:

<?xml version='1.0' encoding='utf-8'?>
<subscriber_list>
<row>
<id>3</id>
<subscriberid>3</subscriberid>
…snip…
<result_code>1</result_code>
<result_message>Success: Something is returned</result_message>
<result_output>xml</result_output>
</subscriber_list>

Here’s page 2,000 request (way more pages than we need to get all our contacts, let alone contacts that have been through the automation):

…url…/admin/api.php?api_action=contact_list&api_key=…snip…&api_output=xml&filters[fields]
[%REQUIRES_SYNC%]=Yes&page=10000

Here’s page 2,000 response:

<?xml version='1.0' encoding='utf-8'?>
<subscriber_list>
<row>
<id>3</id>
<subscriberid>3</subscriberid>
…snip…
<result_code>1</result_code>
<result_message>Success: Something is returned</result_message>
<result_output>xml</result_output>
</subscriber_list>

We’re just getting the same record again, and still result_code = 1. Same thing happens on any page > 1.

How do I deal with this? It is a show stopper for us. If > 20 contacts are included in the automation we have no way of getting the records above 20.

Any tips would be appreciated :slight_smile:

If you haven’t already, please email our support team at support@activecampaign.com and they can further assist. Thanks!