I'm slowly migrating our API to version 3 and have a couple of questions.
First, our uniqueness is First Name, Last Name, and Email. Using Contact Create, when I set the "dedupe_check" parameter on, it properly errors out if it finds a person where those three fields match. And, it checks for *any* email per contact to make the match. So if we have a contact with a primary email address and a second one, Contact Create will error even if the second one matches and not the primary.
However, Contact Get does not do this. It only returns records where the primary email address is found (if I include First, Last, and Email in my parameters). Is there something I need to tell Contact Get in order to return results where any email matches what I send it?
The issue I have is we have to do a Get before a Create to see if a contact already exists. The Get is saying it doesn't exist, but the Create then says there is a duplicate.
The second question, related to that, is when the Create finds a duplicate, it does not put the duplicate Contact ID(s) into it's own array. I believe v2 of the API did that (it put it into a field called error_data, I believe). Is there a reason we no longer have that? It would be nice to just call Contact Create with dedupe_check on and, if it finds a dupe, get the ID and move on. At this point, it seems we have to parse the error message and hope the text of it doesn't change down the road (not sure it would, but just afraid of doing that). If the Get would return the results, we wouldn't need the dedupe_check, but since it's not, we're having to rely on this as well, I think. Maybe there is another way?