I'm trying to find a simple solution to get the list (batch) of engagements (CALL, EMAIL...) for a given company of my Hubspot account. I want to get all information of engagements (content of the email, the contacts ids associated, date of creation...). This endpoint perfectly fits my needs but Hubspot marks it as deprecated. We are redirected through the association endpoint but I didn't manage to get the same result as with the deprecated endpoint (1 http call to get all activities with their data scope to 1 company).
But I just get the list of engagements ids and I would need to loop on each of one to get all data of each engagement (performing N separate http call for N engagements).
Do I have a way to reproduce easely the depreacted endpoint behavior?
1. Keep a look out for anX-HubSpot-API-Deprecatedheader in the response. If you detect this header in a response, please check this documentation to determine when it'll get sunset: Deprecated APIs.
Hello @WendyGoh i'd love to get the reply also. Indeed like @avlambertucci said, if an object has lots of engagements, we will need to make x api calls to get content of each engagements or even their type...
Hi @WendyGoh thanks for replying all these questions but can you please clarify @etienne1 last question about iterating through a list of engagements ID? because Its also exact pain point, eg: if a contact has 400 engagements we still would have to iterate through its ID's and only then, gather the data separately consuming several GET requests? instead of using the deprecated endpoint when used to return the 'explicid' data and not only IDS.
Currently, there isn't an endpoint that behavior like the deprecated endpoint. That said, thank you for sharing your use case and we will aggregate the feedback here and bring it to the product team. Appreciate it.
1. Keep a look out for anX-HubSpot-API-Deprecatedheader in the response. If you detect this header in a response, please check this documentation to determine when it'll get sunset: Deprecated APIs.
1.I just curled the Get Associated Engagements endpoint and I don't see the `X-HubSpot-API-Deprecated` header for the moment. I will add a watcher though to be warned the day it appears.
2. I'd like to use this API but if I understood well I would use this endpoint: `https://api.hubapi.com/crm-associations/v1/associations/<company_id>/HUBSPOT_DEFINED/7` which only returns the engagements ids of a company, and I would need to loop on each id of the response to get content of each engagement. From 1 HTTP call (Get Associated Engagements API) I go to N+1 HTTP calls (1 for association and N for number of engagements) which is less efficient. Maybe I miss something ?
Spot on. The Get associations for a CRM object will only return back the objectID. If you'd like to gather more details of each object, you'd need to use the respective object endpoint (i.e. CRM API | Contacts) to retrieve the object with properties.