APIs & Integrations

adpaiker
Member

Deals API - Search deal using property

SOLVE

Hello 

 

We are new to hubspot and need urgent help on below question: 

 

We have created custom property for deals in hubspot and want to lookup & find deal based on this property value. 

 

Example: we have a property called gp_id for deal and it has unique value for deal. We need API which can be called using gp_id and which would return deal_id.

 

Is any such API available. We tried below but these do not  return the property gp_id: 

GET /properties/v1/deals/properties

GET /properties/v2/:deal/properties

 

Kindly help to find. 

 

Thanks.

0 Upvotes
1 Accepted solution
quentin_lamamy
Solution
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Deals API - Search deal using property

SOLVE

Hi @adpaiker ,

You will found the information you aer looking for on The Deal endpoint documentation . Just run a request on

/crm/v3/objects/deals/search

And use filter on your custom field :

{
   "filterGroups":[
      {
         "filters":[
            {
               "value":"<YUR SEARCH VALUE>",
               "propertyName":"<YOUR CUSTOM FIELD>",
               "operator":"EQ"
            }
         ]
      }
   ],
   "sorts":[
      "string"
   ],
   "query":"string",
   "properties":[
      "string"
   ],
   "limit":0,
   "after":0
}

 

hsSign_smaller.png


View solution in original post

2 Replies 2
adpaiker
Member

Deals API - Search deal using property

SOLVE

That helped. Thanks Quentin !! 

quentin_lamamy
Solution
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Deals API - Search deal using property

SOLVE

Hi @adpaiker ,

You will found the information you aer looking for on The Deal endpoint documentation . Just run a request on

/crm/v3/objects/deals/search

And use filter on your custom field :

{
   "filterGroups":[
      {
         "filters":[
            {
               "value":"<YUR SEARCH VALUE>",
               "propertyName":"<YOUR CUSTOM FIELD>",
               "operator":"EQ"
            }
         ]
      }
   ],
   "sorts":[
      "string"
   ],
   "query":"string",
   "properties":[
      "string"
   ],
   "limit":0,
   "after":0
}

 

hsSign_smaller.png