CRM

AnnaND
Member

How to extract associated deals of a company

I'm trying to extract associated deals (sub deal1, sub deal 2) of a main company by writing custom code. 

0 Upvotes
3 Replies 3
AnnaND
Member

How to extract associated deals of a company

hi @ChehakWadhdwa I tried to get the associated deals by giving companyID and toObjectType. But I get the only one.  

ChehakWadhdwa
Member | Diamond Partner
Member | Diamond Partner

How to extract associated deals of a company

can you send me the request you sent with params

ChehakWadhdwa
Member | Diamond Partner
Member | Diamond Partner

How to extract associated deals of a company

hi @AnnaND 

You can use the list API in the companies endpoint then send associations param as deals and you will get all the deals associated in the json

see this= https://developers.hubspot.com/docs/api/crm/companies#endpoint?spec=GET-/crm/v3/objects/companies/{c...}


curl request =

curl --request GET \
--url 'https://api.hubapi.com/crm/v3/objects/companies?limit=10&associations=deals&archived=false&hapikey=<HUB_API_KEY>'

 

Hope this helps!

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