REST API v2 Create/Update Contact duplicate_option

Hello, does v2 of the REST API have a similar PUT request to v1 for creating or updating a contact with duplicate_option?

Good afternoon Jonathan!

No, one of the performance issues that we saw occur in the v1 Contacts endpoint was the duplication check, which required an extensive number of subqueries regardless if a duplicate existed or not for each Contact added. To improve performance in v2 we require that the id be specified for any update (and the API design more closely aligns with Google API standards), which results in consumers needing to perform a search by whatever criteria they desire to dedup on and determine the appropriate record to update.

I see, thanks for letting me know Tom! So for something similar in v2 Contacts, does this sound about right?

  • GET request with “email” filter
  • if there’s a result, take the ID and then PATCH
  • if not, create the new contact with POST

Yep, that’s the expected flow for a create or update. :slight_smile:

1 Like