Pull all contacts that have a particular custom field populated

Is it possible to pull a list of all contacts that have a particular custom field populated? For example, if we have a custom field called followUpDateTime, we would like to pull all contacts that have a followUpDateTime that is not null. Even better, it would be great if we could pull all contacts with a followUpDateTime that had a value between, for example, January 1, 2019 and Feb 1, 2019.

Thanks!

If you are using the XML-RPC API, then you can do most of this via the Data Service Query function. The Query Data comments explain how to do particular searches.
https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table

The one thing you will not be able to do is to search between 2 dates. You can do a Greater Than or Less Than query, but you will have to do the additional filtering yourself.

That’s helpful to know. Unfortunately we are using the REST API, and it doesn’t seem like the ability to query specific data tables is available there. Do you know of any good strategies when using the REST API?

One possibility is simply to pull ALL contacts from IS using the API and then filtering those contacts accordingly, but that would seem to consume a lot of bandwidth unnecessarily. That’s where we’re stuck at the moment.

Thank you!

To be straight to the point, I do not use the REST API at all. All my coding solutions uses the XML-RPC API.

The REST API is incomplete in several areas, and as you pointed out the filtering is one of them. The only strategy I would say is that if you cannot do it via the REST API, then the XML-RPC API would be the answer.