added new status code parsing to API calls