preventing duplicates being Created in Db- API call