api: sort the routes