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
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
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:
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.
Thanks,
That’s exactly what I was looking for.
Glad to hear it. If this answered your question, could you mark the answer above as a solution, please?
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?
@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.
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?
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
Awesome! Will do! Thanks again @MatthewShepherd !
@mattv Is it still the case we can’t pull a list of accounts by hubspot_owner_id? It seem possible in the CRM v3 API using the companies/search endpoint. I’m trying to use a filter to limit results but I haven’t not successfully pulled a list yet.
Actually I have it working in API v3. I was using user_id instead of the top secret owner_id. Users having 2 ids is very confusing to me.
@jarbot001 Can you obtain a list of Companies by the owner_id? How did you do it? Can you help me with that?
Thanks!