Create or update a batch of contacts by unique property values API error

Hi @TKeane1,

Similar to the Contacts endpoint, you cannot use the “hs_object_id” as “idProperty” because the API would try to create a value for that property, but hs_object_id can only be generated by the system when a record is created.

However, as far as I understand, it looks like there currently aren’t any unique properties for the Company record. The “name” and “domain” properties are allowed to be duplicate values among records and cannot serve as the idProperty for the upsert.

What I could suggest in your case is to create a Custom Property for the Company object, make sure you mark it to require unique values. Once you have that, you could create a workflow to copy the value of the object ID to your new custom property. Then use your custom property as the “idProperty” in the upsert endpoint.

One limitation of this approach is that you will need to have that value populated for all the company records you will try to import. This means that the values in your custom property will not be a one-to-one match to the object ID in the long run.

Hope this helps!