APIs & Integrations

kcanut
Participant

When is data available for certain APIs

SOLVE
I am interested to know when the data in Contacts, Deals and Emails APIs are ready to be used. I have found this other blog post but it was only for Analytics API and the answer was not specific.
So let's take Contacts API. I would like to know when this API has the full data of the previous day so I can adjust my data pipelines accordingly.
11:01 AM
If contacts API has data for all the contacts that are created till 23:59:59 of the previous day at 00:15 today, then I would like to schedule an API call to Contacts API at 00:15 so I get full contacts data for the previous day and reflect it in our reports as soon as possible.
0 Upvotes
1 Accepted solution
MCruz69
Solution
Contributor

When is data available for certain APIs

SOLVE

When you hitup HubSpot via api to GET contacts, it's going to give you the current payload of data as it knows it. The propagation time to those records is minimal, seconds maybe. I find that the front-end can be slower than the API sometimes (but that could just be my browser caching)
In short, if you GET a contact at 00:01, it should have all of 'yesterdays' data that HubSpot knows.

However, if you have 3rd party providers that are also propagating data to your records, you could run into a scenario like this (though I think this is minimally an issue):
Contact does its stuff, data is propagated in HubSpot insofar as HubSpot knows it form their default tools etc. Third party provider is also like "ay I see this contact also [did this thing] but due to limitations of my own design, I sent this data a day late"

I hope this helps!

View solution in original post

4 Replies 4
MCruz69
Solution
Contributor

When is data available for certain APIs

SOLVE

When you hitup HubSpot via api to GET contacts, it's going to give you the current payload of data as it knows it. The propagation time to those records is minimal, seconds maybe. I find that the front-end can be slower than the API sometimes (but that could just be my browser caching)
In short, if you GET a contact at 00:01, it should have all of 'yesterdays' data that HubSpot knows.

However, if you have 3rd party providers that are also propagating data to your records, you could run into a scenario like this (though I think this is minimally an issue):
Contact does its stuff, data is propagated in HubSpot insofar as HubSpot knows it form their default tools etc. Third party provider is also like "ay I see this contact also [did this thing] but due to limitations of my own design, I sent this data a day late"

I hope this helps!

kcanut
Participant

When is data available for certain APIs

SOLVE

Thank you for your answer. I think you are speaking out of your experience and I appreciate it. Would it be the same case for Deals and especially Emails API if you have experience with them?
Also thanks for your point about the external data propagation. Actually, it is the case with us and I have to check this internally.

0 Upvotes
MCruz69
Contributor

When is data available for certain APIs

SOLVE

Not a problem, always happy to help when I can. I've got a bit of experience lol. I worked at HS for about 6 years, and now I'm a CRM admin and developer so I know what I know, but am also well aware of all the things I don't know, if that makes sense.
In any event, same deal for the Deals API definitely, that one is in the CRM objects and those return for me really quickly.
For emails, I'll be transparent that I don't really pull any marketing email data myself. That said, the data should be available via API very quickly. I have memories of (when working at HS) seeing a marketing email sent that had engagements that I could see on my internal tools and on other records, but the email page itself did not propagate yet.
So in short, it should be pretty much the same answer: the data should be present by the time you call it unless there's like a millisecond different. That said remember too the real-world circumstances around marketing emails. Inboxes are weird, Apple is sending out open notifications for everything, people could have their own security apps etc, or they just might open their emails at odd times, repetitively, etc. 
What are you using this for if I may ask? Are you filling an external BI tool or something like that?
Another thing you might run into is burst limiting. If you want to GET like, idk, 1000 contacts, you'll want to use a bulk call or else you'll hit the rate-limit really quickly. Email API shouldnt have that issue because you're just getting the bulk data regarding that email, but if you're running a call like "get this contact and gimme these properties" and run try to run that against your DB, you're going to get a bunch of 429s. 
Source: I have an open thread trying to mitigate this lol.


kcanut
Participant

When is data available for certain APIs

SOLVE

Thank you Mcruz69.
Yeah you guessed it right, we are transferring HS data to our DWH (Bigquery) and then to a BI tool. However, we use Stitch as our ETL tool to send the raw data to Bigquery. So luckily, I dont have to worry about the API call limitations but Stitch is also not very flexible (little flexible). 

I appreciate your help, I think I can perceive that these APIs are up-to-date almost in real time so with a small buffer and I should not face any problems.

0 Upvotes