We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jun 3, 2021 8:42 AM
Hello, I am reading the contacts recently modified by an API call.
"https://api.hubapi.com/contacts/v1/lists/recently_updated/contacts/recent?hapikey=xxxxx&count=50"
and I will need to read the companies attached to the recently modified contacts in the contacts what is the join to read the company attached to the contact? Thank you in advance for your reply. sincerely Jean AMOROS
Solved! Go to Solution.
Jun 3, 2021 3:17 PM
Hello
No not possible in one call. But it is possible in 2-3 call.
First off I recommend you to upgrade to the latest version of the API (current v3 - you are using v1 in your example).
First use the contacts search API to find all contacts that has been modified since date x.
More info here: https://developers.hubspot.com/docs/api/crm/contacts
Click endpoint and then search.
Then you need to use the association API
https://developers.hubspot.com/docs/api/crm/associations
This will give you the company ID numbers of the associated companies (2 calls)
If you then want more information about the company (more than only the ID number) you would need to use this API as a third step:
https://developers.hubspot.com/docs/api/crm/companies
Jun 3, 2021 3:17 PM
Hello
No not possible in one call. But it is possible in 2-3 call.
First off I recommend you to upgrade to the latest version of the API (current v3 - you are using v1 in your example).
First use the contacts search API to find all contacts that has been modified since date x.
More info here: https://developers.hubspot.com/docs/api/crm/contacts
Click endpoint and then search.
Then you need to use the association API
https://developers.hubspot.com/docs/api/crm/associations
This will give you the company ID numbers of the associated companies (2 calls)
If you then want more information about the company (more than only the ID number) you would need to use this API as a third step:
https://developers.hubspot.com/docs/api/crm/companies
Jun 3, 2021 1:35 PM
Unfortunately, I do not believe this can be achieved in a single call. Particularly while using the v1 endpoints. You will need to get the ids of the contacts and then query the associations api using the batch read associations endpoint
@MichaelC , feel free to say that I am wrong 🙃
![]() | Make sure to subscribe to our YouTube channel where you can find the HubSpot Community Developer Show |