HubSpot Web API Sync Time Not Functioning for deals

deals

#1

We are trying to run an incremental sync that should only bring data over for last 25 minutes. However, every time the sync starts, it fetches the entire data. How can I ensure that the data sync only focuses on the recent updates and not bring the entire dataset.

As per API guidelines, we have used the below API to get the deals. We have added "since" parameter in our request to get the last modified data based on unix time stamp.


"https://api.hubapi.com/deals/v1/deal/recent/modified?hapikey=demo&count=100&since=" + unixTimestamp

We are calculating time stamp as per below code.

Int32 unixTimestamp= ((Int32)(DateTime.UtcNow.AddDays(-1).Subtract(new DateTime(1970, 1, 1))).TotalSeconds).ToString()

snapshot


#3

Hi @vinebhat24,

It looks like you may be calculating the timestamp in seconds rather than in milliseconds (TotalSeconds). Can you share your Hub ID and a few example timestamps which returned the exact same deals?