put and post with validation along with all API