validation and update api