Refactored the API url string