How do you get the Company owner from the companies API

SOLVE
Highlighted
New Contributor

Hi,

 

I have extracted a list of owners, but would now like to see which owners are assigned to which companies. Is there a parameter on the companies API that will provide this information?

 

Thanks

 

 

 

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Advisor | Platinum Partner

Hi @BrianM2 

If you use the Get all companies endpoint of the Companies API you can include the hubspot_owner_id property in the properties parameter as follows:

 

https://api.hubapi.com/companies/v2/companies/paged?hapikey=yourapikey&properties=name&properties=hubspot_owner_id

 

You then need to match this up to a list of your Hubspot owners.

 

Edit: In reading your question again, you may be looking for a way to just pull companies with a specific owner ID. I don't see a way to do this directly through one API request.


Did my post help answer your query? Help the Community by marking it as a solution.

Matthew Shepherd

An Inbound Growth Agency
Platinum HubSpot Partner

8 Replies 8
Highlighted
Advisor | Platinum Partner

Hi @BrianM2 

If you use the Get all companies endpoint of the Companies API you can include the hubspot_owner_id property in the properties parameter as follows:

 

https://api.hubapi.com/companies/v2/companies/paged?hapikey=yourapikey&properties=name&properties=hubspot_owner_id

 

You then need to match this up to a list of your Hubspot owners.

 

Edit: In reading your question again, you may be looking for a way to just pull companies with a specific owner ID. I don't see a way to do this directly through one API request.


Did my post help answer your query? Help the Community by marking it as a solution.

Matthew Shepherd

An Inbound Growth Agency
Platinum HubSpot Partner

Highlighted
New Contributor

Thanks,

 

That's exactly what I was looking for.

Reply
0 Upvotes
Highlighted
Advisor | Platinum Partner

@BrianM2 

Glad to hear it. If this answered your question, could you mark the answer above as a solution, please?


Did my post help answer your query? Help the Community by marking it as a solution.

Matthew Shepherd

An Inbound Growth Agency
Platinum HubSpot Partner

Reply
0 Upvotes
Highlighted
Occasional Contributor

Is there any way to include the company owner data in the companies request to avoid another request and having to pair up the data?

Reply
0 Upvotes
Highlighted
Advisor | Platinum Partner

@Dan_Potts I don't believe so.

https://api.hubapi.com/companies/v2/companies/paged?hapikey=yourapikey&properties=name&properties=hubspot_owner_id

 

is returning the Hubspot owner, just not in a recognisable format (numeric ID). Hence the need to match Hubspot Owner ID to an owner name via a call to the  Hubpsot Owners Endpoint. 


Did my post help answer your query? Help the Community by marking it as a solution.

Matthew Shepherd

An Inbound Growth Agency
Platinum HubSpot Partner

Reply
0 Upvotes
Highlighted
Occasional Contributor

Oh I see :/ Thanks @MatthewShepherd for the answer!

 

Do you have an open feature request for the ability to include this data in the request, either as an `includes` parameter, or by config?

Reply
0 Upvotes
Highlighted
Advisor | Platinum Partner

Hi @Dan_Potts 

 

I don't see one in the ideas forum, but worth searching there to see if you can a similar feature request. If not feel free to submit your idea here: https://community.hubspot.com/t5/custom/page/page-id/ideaslandingpage


Did my post help answer your query? Help the Community by marking it as a solution.

Matthew Shepherd

An Inbound Growth Agency
Platinum HubSpot Partner

Reply
0 Upvotes
Highlighted
Occasional Contributor

Awesome! Will do! Thanks again @MatthewShepherd !

Reply
0 Upvotes