title: REST HTTP codes for business logic errors
body: <p>I'm trying to understand the principles of building REST HTTP API's, and I'm having troubles with HTTP response codes. I've read <a href="http://www.restapitutorial.com/httpstatuscodes.html" rel="nofollow noreferrer">this article</a> and I still cannot understand which code the REST API should output if the request cannot be successfully completed due to some restrictions enforced by complex business logic.</p>
  
  <p>For example, an online shop API is exposing a method for adding an item into the cart, and the shop manager decided to enforce a few rules regarding this:</p>
  
  <ul>
  <li>products of categories A and B cannot be added to the same cart</li>
  <li>the total discount amount for all products in the cart cannot exceed $10</li>
  <li>products of category A cannot be added to the cart on Mondays</li>
  </ul>
  
  <p>If any of these rules would be violated after adding a new item to the cart, I can send JSON responses like <code>{ "Result": "Failed", "Reason": "TotalDiscountCannotExceed10Dollars"}</code>, etc, but what kind of HTTP status code sould I send along with the response?</p>