Added response status code check on request to API.
First version of success callback.