APIs & Integrations

Aliba
Member

Duplicated companies records with API

SOLVE

Hi,

We imported companies records that were pre-existing in Hubspot having the same domain as the pre-existing one: Hubspot duplicated the records instead of merging the imported records with the existing ones having the same domain name.

Detailed description of what happened:

  1. Company with name A and domain name A exists in Hubspot

  2. Another Company B with domain B is created via API call (B has the same name and domain name as A)

  3. Instead of merging Companies A and B, Hubspot created two separate companies

How to avoid duplication?

1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Duplicated companies records with API

SOLVE

Hi @Aliba,

Thanks for your patience.

I've confirmed with the relevant product team that HubSpot only deduplicates imported company records. Companies created via the API are not deduplicated by the Company domain name property at this time. Apologies for the confusion surrounding this distinction. I'll have this article corrected.

This endpoint allows you to check for company records with a specific Company domain name value. You could add it to your app to programmatically deduplicate before creating new records with identical domains.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
8 Replies 8
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Duplicated companies records with API

SOLVE

Hi @Aliba,

Thanks for your patience.

I've confirmed with the relevant product team that HubSpot only deduplicates imported company records. Companies created via the API are not deduplicated by the Company domain name property at this time. Apologies for the confusion surrounding this distinction. I'll have this article corrected.

This endpoint allows you to check for company records with a specific Company domain name value. You could add it to your app to programmatically deduplicate before creating new records with identical domains.

Isaac Takushi

Associate Certification Manager
0 Upvotes
LSadowski
Contributor

Duplicated companies records with API

SOLVE

This limitation still seems to exist in 2023, can you say if there are any plans to make deduplication for API-generated company records possible?

0 Upvotes
raihaniqbal
Participant

Duplicated companies records with API

SOLVE

@IsaacTakushi where in the request JSON do I provide the domain that I would like to search. The example JSON in the doc just specifies the properties to be returned in the response.

 

{
  "limit": 2,
  "requestOptions": {
    "properties": [
      "domain",
      "createdate",
      "name",
      "hs_lastmodifieddate"
    ]
  },
  "offset": {
    "isPrimary": true,
    "companyId": 0
  }
}
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Duplicated companies records with API

SOLVE

Welcome, @raihaniqbal.

 

Happy to clarify.

 

With the Search for companies by domain endpoint, you specify the domain in the request URL itself.

 

Note where the :domain placeholder is below:

 

https://api.hubapi.com/companies/v2/domains/:domain/companies

For example, if I were searching for hubspot.com, I would use:

 

https://api.hubapi.com/companies/v2/domains/hubspot.com/companies

Other search settings like limits and desired properties are included in the payload.

Isaac Takushi

Associate Certification Manager
IsaacTakushi
HubSpot Employee
HubSpot Employee

Duplicated companies records with API

SOLVE

Hi @Aliba,

Not yet, but I'm investigating further with my team. I appreciate your patience.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Aliba
Member

Duplicated companies records with API

SOLVE

Hi @Isaac_Takushi, any update on this?
Thank you,

Alice

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Duplicated companies records with API

SOLVE

Hi @Aliba,

I believe I was able to replicate this behavior in my own portal. Could you send me links to two company records where this happened?

Isaac Takushi

Associate Certification Manager
0 Upvotes