How to Generate Json Post Request Body? 400 Bad Request

I am writing API Test scripts for an application for work and I need help on figuring out what goes in to the request body for Posts and Put requests (using raw-JSON).

I have access to the Java classes that have the @Columns defined. I assumed you took those and put them in the request body like so:

{
β€œid”: β€œ{{id}}”
β€œcreatedBy”: β€œ{{createdBy}}”
etc.
}

However, I am always getting 400 Bad Request. I am new to Postman so I am not sure what exactly goes into the request body or what exactly the API is supposed to return. Anyone have any tips?

did you set the id or createdBy in Pre-request Script?