Use email as identifier instead of ID in customer

Hi,

I’m currently wondering why the rest API in the customer management framework uses ID’s for CRUD operations. There must have been good reason to do so architecturally, but since I don’t want other applications to know the Pimcore customer ID but rather the email, I’m not quite sure what route to take.

I could rewrite the CustomerHandler class for my purposes, which seems like the cleanest solution, but I’m hesitant because I feel like I don’t fully understand the design choice to use ID’s instead of a customizable field like email.

Can anyone shed some light on this?