configured functions for API routes