APIs & Integrations

mc_cuna
Membro

New way to get detailed list of engagements per contact

Hi All,

I'm trying to get engagements per contact and I found here exactly what I was looking for - https://developers.hubspot.com/docs/methods/engagements/get_associated_engagements. However, I noticed inside the API documentation that there's a warning that it's deprecated and said to use CRM Associations API instead.

But my problem with CRM Associations API is it only returns the IDs of a contact's engagements. I would like the JSON return to have more details and not just the ID. Is there a way to do this using the CRM Associations API?

0 Avaliação positiva
4 Respostas 4
kmuenze
Participante | Parceiro Platinum
Participante | Parceiro Platinum

New way to get detailed list of engagements per contact

Hi guys,

I created a separate thread saying the same thing regarding the thin data returned by the new API.

I'm sensitive to the number of api calls as an integrator since 429s impact the entire portal. The more integrations a customer has, the more likely a customer is going to run into API throttling.

This new design requires at minimum 2 Api calls but more than likely many more.

Some nice additions would also include a filter for engagement status and sorts for date created and date modified.

cbarley
Alunos da HubSpot
Alunos da HubSpot

New way to get detailed list of engagements per contact

Hi @mc.cuna, I do agree that it might be more convenient to just get the entire JSON body in the associated engagements endpoint, but to shed a bit more light on why we're moving this way:

There's a few tradeoffs that have been made here in the name of extensibility and consistency and performance. As I mentioned and what you're alluding to, it's obviously easier to just make a single call with a vid and get the full JSON for all associated engagements, but that also means you have to accept all of that data every time, no matter what you're doing. It also means that you need to code against a completely different endpoint (and potentially a different JSON response) for each HubSpot object. While the Associations API means you need to get the engagements by their IDs, you can drastically simplify your code to pull engagements from all sorts of objects. This will be particularly useful as HubSpot adds more and more CRM objects moving forward.

0 Avaliação positiva
mc_cuna
Membro

New way to get detailed list of engagements per contact

Hi Connor, thank you for answering that. That's really sad to hear but yeah, we were thinking of doing what you're suggesting in case there's no other way. :frowning:

0 Avaliação positiva
cbarley
Alunos da HubSpot
Alunos da HubSpot

New way to get detailed list of engagements per contact

Hi @mc.cuna, not at this time is there a way to do that. What many integrators will end up doing is making a GET request to the associated engagements, then make a subsequent GET to the Engagements API: https://developers.hubspot.com/docs/methods/engagements/get_engagement using the IDs retrieved from the Associations API.

0 Avaliação positiva