Restroom access control from a Switch?

You can create a virtual lock and use this to synchronize your locks.

You can also use a keypad and synchronize your keypad to your lock using CoRE. Question is how does the customer get out?