Skip to main content
All CollectionsTechnical cornerAPI
Duplicate companies being created over the API
Duplicate companies being created over the API

Why companies can be created 2x when created with the API

Christian Dreyer avatar
Written by Christian Dreyer
Updated over 6 years ago

A company's unique identifier in Planhat is the external ID. This allows Planhat to map usage data, users, and more to the correct account. 

When adding a new company manually or through the excel import Planhat won't allow you to add a company if it has the same external ID as an existing one. 

However, if a new customer is added over the API with the same external ID it will be created if Planhat is told to do so. 

For example, if Planhat receives POST (request to create) a company, then a new profile will be created with the same external ID. 

However, if Planhat receives PUT (request to update) then the corresponding company profile in Planhat will be updated, with the data that's been sent.

Did this answer your question?