implemented access code api functionality