Get Deal by Contact Information


#1

Hi
I would like to know if there’s any way to get the Deal or deals associated with a contact or VID using the Conatact information

And I Have another question about Contacts, Can I modify the property “hubspot_owner_id” 'cause I need to modify or update it.
Thanks


#2

Hi Marko,

The deals API doesn’t currently have the functionality to query based on parameters other than deal ID. Dependent on what you’re trying to accomplish you could query a specific contact by ID first and check the num_associated_deals param to determine whether or not the contact has any associated deals. Though if they are, you’ll still need to request all deals and then filter by contact id.

Sebastian


#3

What is the likely hood of making this available? I assume that the Hubspot Contact Dashboard isn’t using this method.


#4

Actually this method exists but is not allowed for external api access:
POST https://api.hubapi.com/contacts/search/v1/search/deals?access_token=XXXXX
{“filterGroups”:[{“filters”:[{“operator”:“EQ”,“property”:“associations.contact”,“value”:“123456789”}]}],“offset”:0,“count”:5}

Response:
{
“status”: “error”,
“message”: “This endpoint does not accept EXTERNAL access_tokens, and has no special allowances for this access_token (XXXXXXX). access_token auth configuration for this endpoint: TokenAuthenticator{allows=APP}”,
“correlationId”: “--------------”,
“requestId”: “-------------------”
}


#5

So this is a slightly important feature for integration. If we can’t search for deals under a certain contact or company, we would essentially have to download all deals, then do a search on our side.

I’m guessing this method would probably tax the API more than either using the search api or adding a “deals” property to a contact to return the associated deals.

Is there an ETA for this?

Cheers,
Bryan


#6

Bryan, that’s how I ended up doing. searching a deal by contact and than saving the deal ID on our end for future use.


#7

Hi guys

+1 for this – this is a very basic but critically important feature - we should be able to search for companies or deals by name (at a minimum). It’s simply mad that the solution is to just sync the entire CRM database - that’s a ludicrously intensive thing to have to do in order to simply search by name two of the common models…

Thanks


#10

Hi all,

While it's still not possible to search deals by name or property, you can search for contacts by email, name, or company name. You can also search companies by domain.

Once you've done this, you can pull only the deals associated with a given contact or company record with this CRM Associations API endpoint.

For example, if I wanted to retrieve all the deals associated with company 123, I would use definitionId 6 and the following request URL:

https://api.hubapi.com/crm-associations/v1/associations/123/HUBSPOT_DEFINED/6

This topic is quite old, so I will close it. If anyone has questions pertaining to my response, please open a new topic.


#11