APIs & Integrations

MBinStellar
Member

Composite Request (Multiple API request in Single Call)

SOLVE

Is composite request is possible in hubspot. I want to create contacts and deal within single api call. In Salesforce composite request functionality is avaliable. If composite request not allowed in hubspot than is there any alternate option to do so?

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Composite Request (Multiple API request in Single Call)

SOLVE

Hi @dennisedson ,

 

I use the batch endpoints quite a lot, but that won't solve this problem. I am afraid that currently you have to make multiple requests to create a deal and contact.



Did my answer solve your issue? Help the community by marking it as the solution.

View solution in original post

5 Replies 5
Jaycee_Lewis
Community Manager
Community Manager

Composite Request (Multiple API request in Single Call)

SOLVE

Hey, @MBinStellar 👋 To confirm, you are not missing an option. Looking at past replies, such as this one, you'll need to do this with separate calls. 

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
MBinStellar
Member

Composite Request (Multiple API request in Single Call)

SOLVE

Hi, @Jaycee_Lewis the link you provided can be used to associate the objects but to add records in multiple objects this will not work. But it will not be a proper format. It will look like we made a patch forcefully to make it happen. I just want to ask you can we make a api bridge on other platform and make it possible or is there any pre made hubspot app for the same.

0 Upvotes
dennisedson
Community Manager
Community Manager

Composite Request (Multiple API request in Single Call)

SOLVE

@Teun , what is your typical strategy for making your integration as efficient as possible regarding API calls?

 

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Composite Request (Multiple API request in Single Call)

SOLVE

Hi @dennisedson ,

 

I use the batch endpoints quite a lot, but that won't solve this problem. I am afraid that currently you have to make multiple requests to create a deal and contact.



Did my answer solve your issue? Help the community by marking it as the solution.
MBinStellar
Member

Composite Request (Multiple API request in Single Call)

SOLVE

Hello @dennisedson ,

 

I have to create deals records and contacts records with one Api call. As I am using salesforce also, Saleforce provides composite request and I am moving some part of salesforce to hubspot gradually. So if I change the format of salesforce then it will not work in my existing salesforce system. And if I create sperate calls for hubspot than it will be too much problematic due to calling sperate api for each and every thing. I have no option other than composite request right now.

 

Is there logic that I can make this possible in particluar json format. The possible json format I can make is like :-
{
     "contacts":{

          "properties": {
               "firstname": "Contacts",
               "lastname" : "123"
          }
     },
     "deals":{
          "properties": {
               "firstname": "deals",
               "lastname" : "123"
          }
    }

}

0 Upvotes