APIs & Integrations

SBhatnagar8
Participant

Batch Deals Update API Limit

Hi,

 

I am trying to update almost 2K deal records, in a loop.
However, only 100 updates in a sinlge batch update api call. it works fine for the first 100 updates, however succeeding updates fail with below error:

"Cannot update more than %d objects at once [100]"

 

Kindly assist!

 

Here's header for your ref:


{
"Content-Type": "application/json;charset=utf-8",
"Content-Length": "134",
"Connection": "keep-alive",
"CF-Ray": "7382ac5d0c23a92b-MAA",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
"Vary": "Accept-Encoding",
"CF-Cache-Status": "DYNAMIC",
"Access-Control-Allow-Credentials": "false",
"Expect-CT": 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
"X-HubSpot-Correlation-Id": "4f4bc1d6-152e-4c9c-9c88-ce0e71474540",
"X-HubSpot-RateLimit-Daily": "500000",
"X-HubSpot-RateLimit-Daily-Remaining": "499855",
"X-HubSpot-RateLimit-Interval-Milliseconds": "10000",
"X-HubSpot-RateLimit-Max": "150",
"X-HubSpot-RateLimit-Remaining": "149",
"X-HubSpot-RateLimit-Secondly": "15",
"X-HubSpot-RateLimit-Secondly-Remaining": "14",
"Report-To": '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=1RHW2lclNB+8ToZ0GE6ZECeWZfwALMY9F86f4+iAF6ZTO8yvsKmDrKch3hJDgxiQtCOJ87Nw1lV4KwH3wq4d3IuUT2Gh9NOwiEVKWCdiuinfuaLXOSdIfp3/NvU7UZ07A8V9PXk7G4IV6I2G"}],"group":"cf-nel","max_age":604800}',
"NEL": '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}',
"Server": "cloudflare",
"alt-svc": 'h3=":443"; ma=86400, h3-29=":443"; ma=86400',
}

5 Replies 5
ChrisoKlepke
Key Advisor | Elite Partner
Key Advisor | Elite Partner

Batch Deals Update API Limit

Hey @SBhatnagar8 ,

 

what API endpoint are you trying to hit here? The reason I'm asking is that it if you're using

POST /crm/v3/objects/deals/batch/update

there is actually a limit of 10 per call as mentioned here

 

Each object provides batch endpoints that let you create, read, update, and archive multiple object records in a single request. Batch endpoints have a limit of 100 records per call except for creating and updating contacts, which are limited to 10 records per call. 

 

So according to this, it's surprising that the first 100 work without any trouble. Can you please confirm that this is the case? The 100 limit should only apply to things like read or archive calls.

 

Cheers, 

Chriso

0 Upvotes
SBhatnagar8
Participant

Batch Deals Update API Limit

Thanks Chriso for response back.
I am actually using V1 API

POST /deals/v1/batch-async/update

Ref: batch-update-deals 
Up to 100 deals can be updated in a single request. There is no limit to the number of properties that can be updated per deal.

Thanks in advance!

0 Upvotes
ChrisoKlepke
Key Advisor | Elite Partner
Key Advisor | Elite Partner

Batch Deals Update API Limit

Hey @SBhatnagar8 , 

 

oh, I see... In that case, I have no real clue tbh. The only thing that I can think of but seems far-fetched is that the first request wasn't entirely processed when calling the endpoint the second time.
The updates are processed asynchronously, so it may take several minutes to see the updates in HubSpot if you're sending a large number of updates.

 

But it seems unlikely that this is the issue. On the other hand, if there is no limit on the number of properties that are updated, HubSpot has to have some guardrails in place to not have a huge queue of updates to process. 

 

Sorry I can't help you here, I'm afraid. Maybe another community member has some clue on what's going on.

 

Cheers, 

Chriso

SBhatnagar8
Participant

Batch Deals Update API Limit

Appreciate your response, Chriso.

Could it be cause of ongoing updates in background being it asnyc udpate?
let me try with sync one as well, using v3.

Thanks for highlighting.

0 Upvotes
SBhatnagar8
Participant

Batch Deals Update API Limit

I did try with V3 batch update API 

POST /crm/v3/objects/deals/batch/update

First 100 updates works fine as usual and post that getting this same error: 

 

HTTP response body: {"status":"error","message":"The maximum number of inputs supported in a batch is 100. Please reduce the number of items and try again"}

It seems regardless of version, update API doesnt support update of more than 100 records (custom cooldown included) or there is something am I missing here?

 

0 Upvotes