Validate data when create case from API

I am creating a case from an API, I am testing it in Postman and the API works well.

In the case that we create there is a lot of validate rule and edit validate rule. I have a requirement to validate the data that we send via the API. If the data transmitted via API does not pass validation, then we need to return JSON with an error code and a list of fields / properties in which an error was made, as well as a description of the error. If a mistake is made, the creation of the case should not occur.

How can I implement this requirement?
thanks for the help

***Edited by Moderator: Lochan to update platform capability tags***


Keep up to date on this post and subscribe to comments