add applyToCandidate and comfirmCandidate api