For one of our customers, we developed an API that allows them to send us data. When we receive the data, we perform various checks to ensure its validity. Some fields are mandatory for the automation flow to function correctly, while others are optional.
Our question is: Would it be possible to return a 400 status code (or any other code that is not 200) if any required fields are missing?
Currently, we handle this by including a specific output in the response body under certain conditions. However, we’d like to know if we can instead return a 400 status code when required fields are not provided.