APIs & Integrations

JeanAMOROS
Member

Contact / Company link

SOLVE

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

1 Accepted solution
MichaelC
Solution
Guide | Partner
Guide | Partner

Contact / Company link

SOLVE

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

 

 

 



Need further help with integrations or business development?



Want to help me?

Go to the following links and read through the ideas. If you like them - give the idea an upvote

Upvote the following ideas:

View solution in original post

2 Replies 2
MichaelC
Solution
Guide | Partner
Guide | Partner

Contact / Company link

SOLVE

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

 

 

 



Need further help with integrations or business development?



Want to help me?

Go to the following links and read through the ideas. If you like them - give the idea an upvote

Upvote the following ideas:

dennisedson
Community Manager
Community Manager

Contact / Company link

SOLVE

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 🙃

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show