finished register api