How to retrieve an 'owner' object or 'owner_id' property of a 'deal' returned via search endpoint?

andrewjburnett
Member

Within the context of HubSpot's CRM API.

 

In a nutshell, I'm trying to get the owner of a deal object. I'm fine retrieving the owner_id and requesting the owner separately via another endpoint; but I can't seem to figure out how to get the owner_id associated with a deal object.

 

I'm pulling deals from the /deal/search API after filtering by pipeline and dealstage. Can I simultaneously pull associated owners when querying for deals via the search endpoint? Does a deal object even have an owner_id associated with it? How can I access the owner associated with a deal when querying via the /search endpoint?

 

I'm hoping this is even the right question. I'm trying to determine who (salesperson) changed the dealstage property of the deal object so I can determine who 'opened', 'closed' a deal, etc.

 

Thanks!

0 Upvotes
2 Replies 2
dennisedson
Community Manager

@andrewjburnett ,

Maybe you are looking for the hubspot_owner_id

Add it to your requested properties to be returned

"properties": [ "email", "hubspot_owner_id" ]
Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
webdew
Top Contributor | Diamond Partner

Hi @andrewjburnett ,

You can use this property for fetch "hubspot_owner_id" in deal data.
If you want to full list for owners then use this documentation link :
https://legacydocs.hubspot.com/docs/methods/owners/get_owners

Screen shot : https://prnt.sc/1gja5cx


Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Upvotes