Is there any way to create a parent-child relationship for companies using the API?
SOLVE
Hi HubSpot API-ers,
I am getting up to speed on the Companies API and see how to create companies as well as populating custom properties.
I stumbled on a possible gotcha and wanted to confirm - is it truly impossible to set hs_parent_company_id? Grabbing a list of properties using the properties API, I see it's listed readOnlyValue = true. Just hoping there might be another way of approaching this issue - if you have 100,000 companies in your on-prem database and many of them have children, it seems like a gap you can't set that programmatically and represent that in HubSpot.
When looking to create association between Parent company to child company, this is definitely possible by using Associate CRM objects and you can learn more about the definitionId here - CRM associations overview.
For example, if you're looking to add company ID 456 as the child company of company ID 123, you can do so by using the following PUT body:
When looking to create association between Parent company to child company, this is definitely possible by using Associate CRM objects and you can learn more about the definitionId here - CRM associations overview.
For example, if you're looking to add company ID 456 as the child company of company ID 123, you can do so by using the following PUT body: