Optimized the URL of the API end point