We use state machines
Defacto API's concepts rely on a well-defined state-machine.
Each concept has a set of possible statuses and, for each status, a given set of available transitions. Some of these are available to you, and others are managed by Defacto.
All the transitions that you can invoke are prefixed with
TO, such as
TO_VALIDATE that is available on Loan.
The concepts that are managed by a state machine are the following. Follow their link to discover their state machine.