When importing a file manually via the website UI, there is an option to select which unique identifier to use for deduplication. See link below with mention of ‘Property to use to find existing [objects]’:
However, this functionality is not available when using the API to import files. This suggestion is to add this functionality as a property in the import request.
In our particular use case, we are importing Contacts and uploading the Email property and a custom unique identifier property as well. We want to use the custom property to match existing records but Email is also a unique identifier so the import will fail if a match is found for the custom property but the email address is different. We want the Email to instead be updated when a match is found on the custom unique identifier property. This is possible when manually uploading a file using the ‘Property to use to find existing [objects]’ feature above.