a generic api service for web and mobile app