Minimized the number of api endpoints and calls