Please help me how to generate a document for a Rest API request
What Kind of document you are looking for?,
Usually developers do documents and they provide to testers to test all possibilities from that doc.
If you are talking about API doc, we can achieve by
1) Swagger UI (https://swagger.io/tools/swagger-ui/)
2) MS word, It's a traditional model. It should contains end points, method(Get,Post etc..), Path/Query parameters, sample request body(If Post),expected HTTP codes (Including errors(400,404, 500 etc..)) and sample response body etcc..