APIs & Integrations

basklomp
Membro

API import: 409 error with existing contacts

resolver

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 Avaliação positiva
1 Solução aceita
danaketh
Solução
Participante

API import: 409 error with existing contacts

resolver

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.

Exibir solução no post original

1 Resposta 1
danaketh
Solução
Participante

API import: 409 error with existing contacts

resolver

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.