APIs & Integrations

aram64
Member

Contacts v3 - contact exists error

In the v1 contact POST if the contact email already existed we would get back the existing contact id.  My testing indicates that  we do not get it back in v3.  Is this true?  Is there a way to get back the existing contact id when using v3?  If not, how do we get the v3 updated with that feature?

Thanks

 

8 Replies 8
GValenga
Participant

Contacts v3 - contact exists error

Hi, any update on this? We are still using v1 API for contacts.  Will V1 continue working after the Api Key Sunset with private apps key?

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Contacts v3 - contact exists error

Hey @aram64,

 

Just an update here!

 

Our team has updated the response to append the ID (vid for Contacts) to the end of the conflict error message.

 

Here's a sample:

{"status":"error","message":"Contact already exists. Existing ID: 22651","correlationId":"a9ccf455-f294-4606-9584-6b9a5c209bae","category":"CONFLICT"}

 

Let me know if you're seeing the same on your end!

AlexNtousias
Member

Contacts v3 - contact exists error

Any updates here? It has been 2 years and we still need to parse the string of the error message or do another API call to find the contact id!

How on earth could someone think that adding it to the error message would actually be a good solution?

aram64
Member

Contacts v3 - contact exists error

Wendy, that's a very dissappointing solution.  With v1 I would just need to access the identityProfile.vid field in the response to get the ID so I execute an update.  With v3 I need to actually parse the message string looking for the "Existing ID:" substring to "figure out" what is the ID and hope that someone down the road does not change the format of the message (just being free form text).  It's a very brittle solution.  Retuning the identityProfile of the duplicate contact in v1 made life easy.  The v3 API is going in the opposite direction.  Hoping you reconsider your design.

Thanks

 

vVinceth
Participant

Contacts v3 - contact exists error

I agree, can't HS add the additional property called "id", "duplicateid", "whateverid" in the response?

WendyGoh
HubSpot Employee
HubSpot Employee

Contacts v3 - contact exists error

Hey @aram64,

 

Thanks for sharing this feedback. 

 

I have passed it along to our internal team and while this may not be addressed in the near term, our team is exploring how tackling this issue might look. 

 

In the meantime, I'd suggest for you team to continue to use the v1 endpoint if this feature of the API is the most important aspect to your team.

vVinceth
Participant

Contacts v3 - contact exists error

Any update on this? How long till we get the ID without the need to parse the message?

WendyGoh
HubSpot Employee
HubSpot Employee

Contacts v3 - contact exists error

Hey @aram64,

 

That's a great feedback! I'll have to check in with our internal team and I'll keep you posted here!