How do I reject a BOL for bad data?
It is recommended that when you are rejecting a BOL for bad data, your code returns a 400 error to the API consumer. To accomplish this, use one of the following options: Use the standard’s error responses in the error response payload; or, Append custom errors as needed for your implementation. The programming stack you are using determines how your API returns error messages. Microsoft .NET Core Web API lets you pass an object or array of objects to its BadRequest response. Java Spring Boot or NodeJS contain a variety of mechanisms for easily returning meaningful HTTP 400 error messages in a RESTful API implementation. If a BOL cannot be found when using DELETE or UPDATE requests, we also recommend returning a HTTP 404 response rather than a 400.