Hello,
I am successfully creating deal via API, what I’m gonna do next is to associate contact to it.
Is there any endpoint I can use to process this two at once?
Thanks for your help.
Hello,
I am successfully creating deal via API, what I’m gonna do next is to associate contact to it.
Is there any endpoint I can use to process this two at once?
Thanks for your help.
Hello @dennisedson
Yup I made it two calls for now, thank you.
Hi sir, can you show me how did you do it in two calls sir. Im struggling too ![]()
I don’t know of a way to do it in one call. But after creating the deal, the second call is one line like:
await this._client.crm.contacts.associationsApi.create(contactId,'deal',dealId,'contact_to_deal')
Phil
Could you share the code you used to associate a contact wiht a deal? I’m struggling to understand what the API expects in the association type field. Thanks!
After creating a deal use this endpoint:
https://api.hubapi.com/crm/v3/objects/deals/{DEALID}/associations/Contact/{CONTACTID}/3?hapikey={APIKEY}