Getting a response from the api