API Routing refactoring