Getting proper responses from the api