Hi, HubSpot community
I’m integrating the CRM with our platform using the python’s HubSpot library.
When I try to create a contact using an email that already exist, the platform replies with an http status 409 (CONFLICT) - That’s totally fine and we rely on this error code to try to update the contact.
However, our custom objects rely on our internal Id, so we’ve created a unique custom property called “trade_id”. The inconsistency that I see is that if you try to create an object with an existing “trade_id”, HubSpot replies with an http status 400 instead.
Is there any way to create a custom id that follows the same rules applied to the native Id fields? (hs_object_id or email)
Hi, @aparisi
Thanks for the interesting question. I didn’t find anything in the custom object docs that indicates that we can change this messaging. I agree, it would be helpful from a consistency standpoint.
Hey, @taran42 @tominal, do you have any thoughts here?
Best,
Jaycee
Hey @aparisi
You have entered the realm of HubSpot middleware applications! There are some techniques to make sure your data synchronizes with HubSpot. One of them is to download quite literally everything onto your servers so that you can have your system manipulate the data to return to HubSpot. This is the technique I use to get around the inconsistent error messages thrown by HubSpot’s API.
As for your question, I do not think there is a way to create a custom ID that follows the same error reporting as the other properties without the devs introducing breaking changes.
Hope that helps!