APIs & Integrations

SQUEZZOO
メンバー

Get associated deal ID using contact IDs

解決

Hi, I need to get an associated deal ID by giving the contact ID. I didn't find an endpoint about that. Can anybody help me?

0 いいね!
1件の承認済みベストアンサー
TomAshford
解決策
参加者 | Platinum Partner
参加者 | Platinum Partner

Get associated deal ID using contact IDs

解決

Hi,

 

On all of the below replace CONTACT.ID & HUBSPOT_API_KEY with your real values. Depending on the API version you're using:

 

Using the latest v4 API it would be the associations endpoint:

 

https://api.hubapi.com/crm/v4/objects/contacts/CONTACT.ID/associations/deals?hapikey=HUBSPOT_API_KEY

 

Documentation here

 

Using v1 or v3 API:

 

https://api.hubapi.com/crm-associations/v1/associations/CONTACT.ID/HUBSPOT_DEFINED/4?hapikey=HUBSPOT_API_KEY

 

https://api.hubapi.com/crm-associations/v3/associations/CONTACT.ID/HUBSPOT_DEFINED/4?hapikey=HUBSPOT_API_KEY

 

"4" in these URLs is the ID for contact_to_deal as outlined here:

https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview

 

Documentation here

 

These all return JSON with a list of associated deal IDs, slightly different formatting between v4 & v1/v3 but both return the IDs.

 

Hope that helps.

 

Cheers,

Tom

元の投稿で解決策を見る

1件の返信
TomAshford
解決策
参加者 | Platinum Partner
参加者 | Platinum Partner

Get associated deal ID using contact IDs

解決

Hi,

 

On all of the below replace CONTACT.ID & HUBSPOT_API_KEY with your real values. Depending on the API version you're using:

 

Using the latest v4 API it would be the associations endpoint:

 

https://api.hubapi.com/crm/v4/objects/contacts/CONTACT.ID/associations/deals?hapikey=HUBSPOT_API_KEY

 

Documentation here

 

Using v1 or v3 API:

 

https://api.hubapi.com/crm-associations/v1/associations/CONTACT.ID/HUBSPOT_DEFINED/4?hapikey=HUBSPOT_API_KEY

 

https://api.hubapi.com/crm-associations/v3/associations/CONTACT.ID/HUBSPOT_DEFINED/4?hapikey=HUBSPOT_API_KEY

 

"4" in these URLs is the ID for contact_to_deal as outlined here:

https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview

 

Documentation here

 

These all return JSON with a list of associated deal IDs, slightly different formatting between v4 & v1/v3 but both return the IDs.

 

Hope that helps.

 

Cheers,

Tom