It is possible to change the settings in Admin / Config / Permissions for Functions part of the UI programatically, could someone point me out some APIs?
Using CMS 11.10.
Have a look at using the PermissionRepository and PermissionTypeRepository classes. Be aware that they are internal and not well-documented.
Just curious: do you need this to manage built-in or custom permissions?
Small correction: both are not a internal type, and you can use them as you like. Documentation can always be better but I think the default is fairly adequate because the classes are simple and self explanatory
Most predefined permisions can be accessed via CatalogPermissions and OrdersPermissions classes (yes they are Commerce)