Is it possible fetch archived objects incrementally?

I’m coding an integration with Hubspot, and I want to implement periodic incremental syncs of Objects

I learnt how to use the Search API to fetch updates in objects since some date, but I undesrtand the Search API only returns non-archived objects always, making it not possible to recognize when an object was archived since the last sync.

I also learnt we can fetch archived objects via GET /crm/objects/{version}/{object} by using the parameter archived: true, the problem with that is it fetches ALL archived objects, and ideally I’d want only those that were archived since my last sync.

Is there an official way or workaround to get recently archived objects?

Hi @Aleph-Bri,

Thank you for posting to the Community!

I’d like to tag in some of our Top Contributors to see if they have any ideas on this one!

Hi @Mike_Eastwood @MichaelMa and @Gonzalo do you all have any workarounds for @Aleph-Bri on the above?

Thank you in advance!

Cassie, Community Manager

(post deleted by author)

Sorry, commented in wrong post

Hi @Aleph-Bri

I looked into this, and unfortunately, HubSpot does not currently provide a way to fetch only the objects archived since the last sync. The Search API returns only active (non-archived) records, whereas the archived=true parameter returns all archived records, with no option to filter by archive date or last modified date.

As a result, the usual approaches are:

- Use HubSpot webhooks to receive archive/delete events in real time.

  • Periodically fetch all archived records and compare them with previously synced data to identify newly archived objects.

At the moment, there is no official API that supports incremental syncing of archived objects.

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!