Refactor ApiResponse to conform