API import: 409 error with existing contacts

SOLVE
Highlighted
New Contributor

Hi,

Together with one of our partners, we set up an API integration to batch upload new contacts. Unfortunately we've been getting errors for all existing contacts. How can the existing contact be updated (by for instance logging the new interaction?

Details of error message
The error & message that they're seeing, is: error integrating with HubSpot. Message: Status code: 409 - {"status":"error","message":"Contact already exists","correlationId":"3dd6ce62-a0a4-4a3c-8e9f-170d71bee51a","identityProfile":{"vid":6182263,"identity" .....

We are using http://convertrmedia.com/ for the sync.

Best,
Bas

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Solution
New Contributor

You can update the contact by using the right endpoint. In your case, it might be easier to update contacts based on their e-mail address: https://developers.hubspot.com/docs/methods/contacts/update_contact-by-email

I'd probably implement this as a response to the error you get, so when a request to create new user is sent and the response is 409, it will run the update. There is a way to check for the contact first but that adds on more request to the logic.

View solution in original post

1 Reply 1
Highlighted
Solution
New Contributor

You can update the contact by using the right endpoint. In your case, it might be easier to update contacts based on their e-mail address: https://developers.hubspot.com/docs/methods/contacts/update_contact-by-email

I'd probably implement this as a response to the error you get, so when a request to create new user is sent and the response is 409, it will run the update. There is a way to check for the contact first but that adds on more request to the logic.

View solution in original post