Reason
Every document line must have a "reason", which explains what the line is about, like "sale" if the product is sold or "free gift" if the product is not payed by the customer or "returned" for a product that has been returned by the customer.
📄️ listReasons
Returns a list of reasons.
📄️ createReason
Create a Reason.
📄️ getReason
Returns a single reason.
📄️ deleteReason
[Delete](https://jsonapi.org/format/#crud-deleting) a Reason.
📄️ updateReason
[Update](https://jsonapi.org/format/#crud-updating) a Reason.
📄️ getReasonDocType
Get a ReasonDocType relation.
📄️ deleteReasonDocType
[Remove](https://jsonapi.org/format/#crud-deleting) a Document Type from a Reason.
📄️ updateReasonDocType
[Update](https://jsonapi.org/format/#crud-updating) the sequence number for the document type reason.
📄️ getReasonDocTypes
Returns the document types related to the given reason and the relation properties.
📄️ addReasonDocType
Add a document type to a given reason.
📄️ getReasonBlocks
Returns the given reason's blocks.
📄️ addReasonBlocks
Add blocks to a given reason. If a block is already present in the DB it will be overwritten.
📄️ getReasonBlock
Get a Reason Block.
📄️ deleteReasonBlock
[Remove](https://jsonapi.org/format/#crud-deleting) a Block from a Reason
📄️ updateReasonBlock
[Update](https://jsonapi.org/format/#crud-updating) the reason block.
📄️ validateReasonBlocks
Given the customers and items, it checks for every combination of customer and item if it is already present;