refactor
refactor response
complete api code of registrar-device