Currently, we’re using the above endpoint in addition to the company endpoint:
/companies/v2/companies/:company_id
to get the company’s name, but this adds at least 100ms to every imported contact, which makes importing inefficient for large sets of users.
I noticed a Company field is returned with the first api endpoint above, however it doesn’t appear to be the same as the associatedcompanyid, and I’m not sure where it is originating or what it refers to.
@hubspotclient My apologies I thought that property would be linked to the associated company. I can see from some light testing on my end that is not the case. It appears that you cannot get the name of the company from the contacts endpoint. Sorry for misleading you there.
Thanks Peter. I’ve tried property=company, property=companyname, and property=company_name
However, the last two return no results, while property=company returns “Company Name” as the value, but that is not the name of the company associated with the associatedcompanyid.
Do you know the exact parameter name I should be using to get the name of the company associated with the associatedcompanyid parameter?
@hubspotclient You can find all the internal names under Contact Settings and then clicking contact properties. Here is an example of what it would look like.
@hubspotclient
Anthony,
You should add the company name property in the query string with the property parameter. This will return the name for you. The association will just return an array of IDs.