Get recently created contacts after X

contacts

#1

Hi,
We've built a custom integration between HubSpot and Synergist. Synergist is a resource planning and job costing system where we sync HubSpot leads as opportunities.

Currently, we are using the Recently created contacts list API, as we want all contacts, regardless of any list, but I don't want to be grabbing the whole list each time I sync, I'd rather pass a date through to as a query parameter, such as "after=yyyy/mm/dd", etc. which could limit the amount of requests required to get this information.

I can't rely on the workflows API, as this sync is not exposed to the internet, thus doesn't have a public DNS entry to receive webhooks, nor I do want to have to manage ensuring each contact is put into a workflow that triggers a webhook.

Is this sort of filtering on the roadmap for this API? Filtering in general would greatly reduce the amount of API calls required in certain circumstances, so this has got to be good for HubSpot too?


How to fetch recently modified contacts based on timeoffset
#2

Hi @Antaris,

Strictly speaking, it's not possible to get contacts updated after a certain date. The idea is that instead of passing in a date, and then paging forward to get all contacts updated after that date, you'd just request the 100 or so most recently updated contacts, and then page backwards until you reach the date you care about. Each contact has an addedAt field which represents the moment they were last modified. By pulling contacts and paging through until the addedAt field is older than your desired date, you can pull only a recent subset of updated contacts.

Also I'm including the 'Get recently modified contacts' doc here for reference / future visitors: