APIs & Integrations

PSkovby
Member

Import API fails to update existing Company with a unique value property

Hi,

 

I'm trying to figure out how to use the import API to first create and later update Companies and Contacts. On the Company object I have a property, "Unique Customer Code", which needs to be unique and is defined as such in Hubspot. In the import file the Unique Customer Code, Company Email and Name is provided.

 

The first import which creates a new Company is successfull. But any subsequent imports, which are supposed to update the Company records, fails. The error message says "'unique_customer_code_v2' property requires a unique value but was set to a value already in use (details: already used on object id 10359184141)" . 

 

Note that object id 10359184141 is indeed the Company record I'm trying to update.  So, it seems to me that the import fails to find the already existing record... 

 

Any advice on how to solve this issue? 

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

Import API fails to update existing Company with a unique value property

Hi, @PSkovby 👋 Thanks for reaching out! Quick questions to get us started:

  • For your custom (unique) property, are you trying to use it as the Unique identifier?
  • Instead of Company Domain Name or Record ID? Is that correct?

Thanks! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
PSkovby
Member

Import API fails to update existing Company with a unique value property

Hi Jaycee,

 

No, not exactly  - I've already read in the documentation that it is currently not possibly to set your own Unique Identifier in Hubspot. With that being said, in the source system this is indeed the unique identifier for the companies. 

I do not have any Company Domain Names for the companies, only Company Names. However, the Company Names might not be unique, which is why the Unique Customer Code is quite important. I assumed the Name would be enough to be able to update already existing records, but I would need to use the Record ID, right?

0 Upvotes