“_id” field’s type is “ObjectId” whereas “req.params._id” is transferred as a string in the request. try one of these, or check documentation (for mongoose?) how you do that:
@steevej , i missed that both ObjectId() and $oid are doomed to fail here as they are passed an “undefined” value.
req.params and req.body are general names but mostly point to an “express.js” server for javascript. As steve noted, you have to use the exact name you gave in your resources; here you have /stud/:id so it has to be req.params.id
by the way, if you use mongoose, you may not need to convert these manually. check the use of a model schema for passing id around.