API for checking membership level

How can I programmatically check the user membership level with Protected Content.

We are building a very customized service on Wordpress and would like to programmatically check the signed in user membership level in order to enable/disable functionality.

Thanks,
D.