(V3) Batch endpoints not returning the results in the same order as the original payload

Hi there…

I actually spoke to you directly in a ticket regarding this issue a while ago but it clearly has never been adressed. (I am flavorgasted that its never been caught up before and still an ongoing issue).

As far as I know, this issue is true for any batch endpoint.

I am creating / updating custom objects (Batch Create & Update endpoint)

https://api.hubapi.com/crm/v3/objects/" . $objectTypeId . "/batch/createhttps://api.hubapi.com/crm/v3/objects/" . $objectTypeId . "/batch/update"

Lets say I want to create the following array of objects (as parameter to the batch endpoint)

objectsToCreate = [

“a”,

“b”,

“c”

]

They will all be created, but they are not returned in the same order. Hubspot is shuffling the order and its being returned like

Results = [

A,

C,

B

]

See image from my actual debugger explaining this visually

I just made the “mistake” to trust the endpoint and how its returning the results.

The result: I did a mapping of the hubspot object id to the associated object in my system… but they are all wrong / shuffled!!

Who the **bleep** did this endpoint ?

I dont think we should have to do so much testing to figure out that the api is returning **bleep** data.

You just send us the ball to do 1001 checks and calculations to “find” the right result in the list.

Is this a known issue ?
Are you gonna fix this ?

Thank you…

Hey @Dostiguy

This may be the issue related to the creation call which might be creating objects randomly rather than in a specified manner as you have mentioned earlier. According to your query you want the data the same as when you create them. So the problem is you are not telling or specifying anywhere the sequence order during the api call.

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.