APIs & Integrations

MPallot
Member

Associating deals to objects with an API

Hi,

 

I am currently creating contacts and associating them to deal with an API.

 

I am then looking to create a deal and associate them with the previous objects.

 

From reading the endpoint CRM API | Deals (hubspot.com) it appears I will have to do this as a POST request then do a PUT to associate the objects to the deal.

 

Can this all be done in the initial POST request?

 

Thanks

0 Upvotes
3 Replies 3
dennisedson
HubSpot Product Team
HubSpot Product Team

Associating deals to objects with an API

Hey @MPallot 

Making sure I have this straight

Presently you are able to create the contact and associate to a deal 👍

You would like to turn this around a Create a deal and associate to contacts 👎

Have you checked out this endpoint?  Wonder if that is what you are looking for

0 Upvotes
MPallot
Member

Associating deals to objects with an API

Hello @dennisedson 

No sorry if I wasn't clear but I am currently creating a company then creating a contact and associating to that company.

 

Next I am creating a deal and looking to associate that deal to the company and contact.

 

At the moment I am having to create the deal and then associate in a seperate workflow and was wondering whether it can be done in the same one.

 

The endpoints you have linked are for v1, but it appears I need to add the associations in the Json file, should that be the same for v3 (The API  am using.)

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Associating deals to objects with an API

@MPallot ,

I haven't tested to see if that will work with the V3 endpoint.  Wouldn't hurt to give it a go 😀.  I can test it later today as well.  @quentin_lamamy , what do you think?