Hi, I’m currently developing some jobs that synchronizes our Hub API to an internal Database. I’m only writing this because I’ve created two jobs for the deals specific API: one for a big batch load(the get all deals endpoint) and one to keep it updated. I wanted to know how offset works in the following scenario: is it possible for me to save the
offset parameter into my DB so I don’t need to request it all back again, whenever I call the job? I know there’s the parameter since, in the recently modified/created endpoints, but I’d like to know if I could use the offset as a checkpoint, as well as using the since parameter.
Thanks!
Hi @caiorochap,
I hope all is well with you 
Currently it is not possible to use the sinceparameter and using offset as a checkpoint on the Get all deals API. The offset value is the last deal ID that was given back. Offset cannot be use as a checkpoint as deals will constantly be created/deleted and so it is possible that the offset value will change.
I hope this helps to clarify things!
Hi, Wendy! Yes, this clarifies a lot. Thanks! I’d like to know if that works for all other endpoints, such as tickets, contacts and companies.
Hi @caiorochap,
That works for all the other endpoints. Such as Get all contacts, Get all companies and Get all tickets.
Hope this helps!
Thanks a lot, Wendy. I’d also like to know if there is any other parameter recommended to make this API synchronization incrementally, so I don’t have to always request the whole collection.
Thanks in advance.
Hi @caiorochap,
Currently the object API doesn’t have parameter such as date to retrieve object based on a specific date or specific property.
That said, if you have access to the list tool, you can use this endpoint: Get contacts in a list | Contact Lists API to retrieve contacts in a particular list. The list can be easily created in your HubSpot portal with criteria set. The list tool is applicable to contact records only.
For both deals and companies, the best way to go about doing this is to use the get recently created/modified endpoint if you’re not looking to request the whole collection.