APIs & Integrations

basklomp
Mitglied

API import: 409 error with existing contacts

lösung

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

0 Upvotes
1 Akzeptierte Lösung
danaketh
Lösung
Teilnehmer/-in

API import: 409 error with existing contacts

lösung

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.

Lösung in ursprünglichem Beitrag anzeigen

1 Antwort
danaketh
Lösung
Teilnehmer/-in

API import: 409 error with existing contacts

lösung

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.