I’m wondering is there a chance I can pull companies by ids I’m interested in? There is a super useful API for contacts:
Search for a batch of contacts by ID
I want the same for companies.
Maybe there are some hidden possibility, not described in docs or any plans to implement that in the future?
Issue there is that I’m pulling only deals when user is owner and related contacts and companies. I’m getting associatedVids and associatedCompanyIds from deals response. Then I can pull contacts I need. But with companies i have to iterate over all companies in portal (sometimes there are too much) and filter only those I need.
This results in redundant requests to hubspot API and it is also time consuming.
Companies can be retrieved individually by the ID:
We don’t currently have a way to get multiple contacts by ID, but batch APIs for companies are something that we’re working on.
If you’re pulling all of your contacts, you may want to also get all of your companies, and store the
companyId so that you can reference the company without needing to pull the company separately each time you’re updating contacts.