APIs & Integrations

YVasudevon
Member

Search "Associated Contacts" for Deals

Hi Guys
Good day
I need some guidance
I used below to get some data from “Deals”
GET https://api.hubapi.com/crm/v3/objects/deals/4355874207
got below results
{
    "id": "4355874207",
    "properties": {
        "amount": null,
        "closedate": null,
        "createdate": "2021-02-25T07:10:19.217Z",
        "dealname": "Miga Mind Company Limited",
        "dealstage": "305989",
        "hs_lastmodifieddate": "2021-09-07T09:38:29.441Z",
        "hs_object_id": "4355874207",
        "pipeline": "ee446175-450f-4c21-9eca-7d59bded679f"
    },
    "createdAt": "2021-02-25T07:10:19.217Z",
    "updatedAt": "2021-09-07T09:38:29.441Z",
    "archived": false
}
I don’t see the “associated contacts” data in it
How I can retrieve it?
I tried below but failed.
{
  "filterGroups": [
    {
      "filters": [
        {
          "value": "Miga Mind Company Limited",
          "propertyName": "dealname",
          "operator": "EQ"
        }
      ]
    }
  ],
  "sorts": [
    "dealname"
  ],
  "properties": [
    	"amount",
        "closedate",
        "createdate",
        "dealname",
        "dealstage",
        "hs_lastmodifieddate,
        "hubspot_owner_id",
        "hs_object_id",
        "pipeline"
	    "contacts"

  ],
  "limit": 10,
  "after": 0
}
 
Please assist
0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

Search "Associated Contacts" for Deals

Hey, @YVasudevon 👋 Please see this thread — CRM API. Deal search with Company relation.

It is very similar to your request and offers two approaches for getting deals and associations with another object such as contacts or companies.

Additionally, this post from another HubSpot moderator is still valid — Get associations with deals from CRM objects deals search endpoint

 

Have fun coding! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes