APIs & Integrations

Not applicable

Associated Company Name in Contact List Call

Is it possible to get the name of the company associated with the associatedcompanyid attribute, from the following API endpoint:

/contacts/v1/lists/recently_updated/contacts/recent

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.

Any help would be appreciated.

Thanks,
Anthony

0 Upvotes
5 Replies 5
Not applicable

Associated Company Name in Contact List Call

@pmanca

Based on this, it looks like you’re saying

property=company

is the correct value here, but it does not return the name of the company associated with the associatedcompanyid value.

Thanks again,
Anthony

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Associated Company Name in Contact List Call

@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.

0 Upvotes
Not applicable

Associated Company Name in Contact List Call

@pmanca

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?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Associated Company Name in Contact List Call

@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.

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Associated Company Name in Contact List Call

@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.

0 Upvotes