APIs & Integrations

gllghr
参加者

Updating integration to API v3 to create or update and batch associations V4

解決

Hello — I am working on an integration between HubSpot and another service's webhook events. Based on the information received from the other service, in HubSpot a deal, company, and contact are created.

 

Previously, with API v1, I was able to use the 

/contacts/v1/contact/createOrUpdate/email/{email} endpoint to either create a contact object, or if it already existed, update that contact object.
 
With the v3 API, I haven't found a similar endpoint or endpoints that replicate a similar behavior and instead I am needing to first search for an existing contact with one call and then use another call to create the contact if the first call returns no results. Is there a method in the V3 API to use a single call to either update OR create a new record, without needing to search first?
 
Additionally, I was able to associate a contact, company, and deal with the /crm-associations/v1/associations/create-batch endpoint sent with a body of an array containing the object associations to be made (contact to company, contact to deal, company to deal). I also have not been able to find a similar method to this in the V3 or V4 associations endpoints. Instead, this is now requiring three different calls to associate those separately. With the new associations endpoints, is there a way to complete that task in less calls?
 
Thank you!
0 いいね!
1件の承認済みベストアンサー
Jaycee_Lewis
解決策
コミュニティーマネージャー
コミュニティーマネージャー

Updating integration to API v3 to create or update and batch associations V4

解決

Hi, @gllghr 👋 Thanks for reaching out. You are not missing an option or options with these endpoints. There is not a way to make a single call to accomplish your goal(s).

 

I understand why this is challenging, and I do not want you to waste time searching for an option that doesn't exist. You'll need to make multiple calls using these endpoints. 

 

There have been many similar threads recently. I am happy to link a few here if you'd like to see them.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

元の投稿で解決策を見る

2件の返信
Jaycee_Lewis
解決策
コミュニティーマネージャー
コミュニティーマネージャー

Updating integration to API v3 to create or update and batch associations V4

解決

Hi, @gllghr 👋 Thanks for reaching out. You are not missing an option or options with these endpoints. There is not a way to make a single call to accomplish your goal(s).

 

I understand why this is challenging, and I do not want you to waste time searching for an option that doesn't exist. You'll need to make multiple calls using these endpoints. 

 

There have been many similar threads recently. I am happy to link a few here if you'd like to see them.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

gllghr
参加者

Updating integration to API v3 to create or update and batch associations V4

解決

Thank you Jaycee, I appreciate your reply and it certainly has saved me some time. Fingers crossed we can do more with less calls back and forth to the API in the future but I definitely understand the simplicity and consistency introduced in the newer versions. Thanks!

0 いいね!