same api for delete as add and edit