You're passing an org.json.JSONObject directly to RestTemplate, which doesn't automatically convert it into a proper JSON request body. It just sends it as an object, which becomes null in deserialization.Postman automatically sets the correct Content-Type and sends the JSON string. In code, unless you use the right body object and headers, Spring might not serialize it to the proper format, resulting in null values being received by the API.Use a Map<String, String> or create a POJO for the request body, and ensure the correct headers are set.