Need help with Java - Send object in request body and handle the json response and errors

Job ID: 33012441

Budget: $10 – $30 USD

Need help with Java - Send object in request body and handle the json response and errors. A parameter is being sent in an api as a qurey parameter. Instead of query parameter, I want to send it in request body.
Currently the response is a nested json, but need to handle simple json response and accordingly handle the response similar to the one I have for the nested json. Also need help understanding how error handling is done.