JSON Request Body Validation

Is there a way to check if one of the JSON request entity has no value or if it is null? In the sample request below, the postcode has no value, then it should return an error that either one of the parameters are empty etc.

I tried using extract variable, but for complex request body, I think it is not efficient.

6493-request-body.png

0 2 3,895
2 REPLIES 2

You can use Message Validation policy here or you can use javascript based validator. Then you need to create a Javascript callout which has your script to validate.

Check it here here..