🚧 Em Construção 🚧
Skip to main content

Domain Model

Entities

Ledger

AttributeTypeSizeValuesDefaultDirectionDescription
entity_idUUID v732--ResponseUnique entity identifier with temporal ordering.
external_entity_idstringup to 36 characters--Request/ResponseExternal entity identifier for interoperability with other systems.
entity_typestring-LEDGERLEDGERResponseEntity type.
versioninteger1 byte-1ResponseEntity version (incremented with each update).
namestring3 to 128 characters--Request/ResponseLedger name (unique within organization and tenant).
descriptionstring3 to 256 characters--Request/ResponseLedger description for use in reports.
created_atdatetime---ResponseLedger creation date.
updated_atdatetime--created_atResponseLast ledger update date.
discarded_atdatetime--nullResponseDiscard date.
chaptersChapter[]---ResponseRelationship with CHAPTER.
metadataJson Object4 KB--Request/ResponseAdditional metadata for ledger interoperability with other systems.

Chapter

AttributeTypeSizeValuesDefaultDirectionDescription
entity_idUUID v732--ResponseUnique entity identifier with temporal ordering.
external_entity_idstringup to 36 characters--Request/ResponseExternal entity identifier for interoperability with other systems.
entity_typestring10CHAPTERCHAPTERResponseEntity type.
versioninteger10-1ResponseEntity version (incremented with each update)
namestring3 to 128 characters--Request/ResponseChapter name (unique within ledger)
descriptionstring3 to 256 characters--Request/ResponseChapter description for use in reports.
ledgerLedger---ResponseRelationship with ledger.
created_atdatetime---ResponseChapter creation date.
updated_atdatetime---ResponseLast chapter update date.
discarded_atdatetime---ResponseChapter discard date.
booksBook[]---ResponseRelationship with BOOK.
metadataJson Object4 KB--Request/ResponseAdditional metadata for chapter interoperability with other systems.

Asset

AttributeTypeSizeValuesDefaultDirectionDescription
entity_idUUID v732--ResponseUnique entity identifier with temporal ordering.
external_entity_idstringup to 36 characters--Request/ResponseExternal entity identifier for interoperability with other systems.
entity_typestring-ASSETASSETResponseEntity type.
versioninteger1 byte-1ResponseEntity version (incremented with each update).
codestring3 to 12 characters--Request/ResponseAsset code (unique within ledger).
numberstring1 to 128 characters--Request/ResponseAsset number (unique within ledger).
exponentinteger1 byte0 to 180Request/ResponseAsset exponent.
is_fiatboolean1 bytetrue, falsefalseRequest/ResponseIndicates if it is fiat currency.
locationsstring[]---Request/ResponseRegions where the asset is accepted as exchange currency in ISO 3166-2 format.
ledgersLedger[]---ResponseRelationship with ledgers.
created_atdatetime---ResponseAsset creation date.
updated_atdatetime---ResponseLast asset update date.
discarded_atdatetime---ResponseAsset discard date.

Book

AttributeTypeSizeValuesDefaultDirectionDescription
entity_idUUID v732--ResponseUnique entity identifier with temporal ordering.
external_entity_idstringup to 36 characters--Request/ResponseExternal entity identifier for interoperability with other systems.
entity_typestring-BOOKBOOKResponseEntity type.
versioninteger1 byte-1ResponseEntity version (incremented with each update).
namestring3 to 128 characters--Request/ResponseBook name (unique within ledger).
positionPosition---ResponseRelationship with POSITION.
naturestring-CREDITOR, DEBITOR-Request/ResponseBook nature.
ledgerLedger---ResponseRelationship with ledger.
chaptersChapter[]---ResponseRelationship with chapters.
entriesEntry[]---ResponseRelationship with entries.
created_atdatetime---ResponseCreation date.
updated_atdatetime---ResponseLast update date.
discarded_atdatetime---ResponseDiscard date.
metadataJson Object4 KB--Request/ResponseAdditional metadata for book interoperability with other systems.

Entry

AttributeTypeSizeValuesDefaultDirectionDescription
entity_idUUID v732--ResponseUnique entity identifier with temporal ordering.
external_entity_idstringup to 36 characters--Request/ResponseExternal entity identifier for interoperability with other systems.
entity_typestring-ENTRYENTRYResponseEntity type.
versioninteger1 byte-1ResponseEntity version (incremented with each update)
reference_datedatetime--created_atRequest/ResponseReference date (transaction date)
directionstring-CREDIT, DEBIT-Request/ResponseEntry direction.
statusstring-PENDING, POSTED, DISCARDEDPENDINGResponseEntry status.
detail_accountBook---ResponseDetail account.
previous_positionPosition---ResponsePrevious position.
resulting_positionPosition---ResponseResulting position.
created_atdatetime---ResponseEntry creation date.
updated_atdatetime---ResponseLast entry update date.
posted_atdatetime---ResponseEntry posting date.
discarded_atdatetime---ResponseEntry discard date.
metadataJson Object4 KB--Request/ResponseAdditional metadata for entry interoperability with other systems.

Transaction

AttributeTypeSizeValuesDefaultDirectionDescription
entity_idUUID v732--ResponseUnique entity identifier with temporal ordering.
external_entity_idstringup to 36 characters--Request/ResponseExternal entity identifier for interoperability with other systems.
entity_typestring-TRANSACTIONTRANSACTIONResponseEntity type.
versioninteger1 byte-1ResponseEntity version (incremented with each update).
reference_datedatetime--created_atRequest/ResponseReference date (transaction date).
ledgerLedger---ResponseRelationship with ledger.
statusstring-PENDING, POSTED, DISCARDEDPENDINGResponseTransaction status.
entriesEntry[]---Request/ResponseRelationship with entries.
created_atdatetime---ResponseTransaction creation date.
updated_atdatetime---ResponseLast transaction update date.
posted_atdatetime---ResponseTransaction posting date.
discarded_atdatetime---ResponseTransaction discard date.
reversed_byTransaction---ResponseTransaction that reverses this transaction.
reverses_toTransaction---ResponseTransaction that is reversed by this transaction.
metadataJson Object4 KB--Request/ResponseAdditional metadata for transaction interoperability with other systems.

Position

AttributeTypeSizeValuesDefaultDirectionDescription
entity_idUUID v732--ResponseUnique entity identifier with temporal ordering.
external_entity_idstringup to 36 characters--Request/ResponseExternal entity identifier for interoperability with other systems.
entity_typestring-POSITIONPOSITIONResponseEntity type.
versioninteger1 byte-1ResponseEntity version (incremented with each update).
reference_datedatetime--created_atRequest/ResponseReference date (transaction date).
assetAsset---ResponseRelationship with ASSET.
postedBalance---ResponsePosition of the posted balance.
confirmableBalance---ResponsePosition of the confirmable balance.
provisionedBalance---ResponsePosition of the provisioned balance (posted and confirmable).
availableBalance---ResponsePosition of the available balance.
created_atdatetime---ResponseCreation date.
updated_atdatetime---ResponseUpdate date.
discarded_atdatetime---ResponseDiscard date.

Balance

AttributeTypeSizeValuesDefaultDirectionDescription
amountinteger8 bytes-0ResponseCurrent balance position amount.
creditsinteger8 bytes-0ResponseTotal credits of the balance position.
debitsinteger8 bytes-0ResponseTotal debits of the balance position.

Events

Ledger Events

EventTopicDescription
LEDGER_CREATEDevent.guardia.lke.ledger.createdEvent triggered when a new ledger is created
LEDGER_UPDATEDevent.guardia.lke.ledger.updatedEvent triggered when a ledger is updated
LEDGER_DISCARDEDevent.guardia.lke.ledger.discardedEvent triggered when a ledger is discarded

Chapter Events

EventTopicDescription
CHAPTER_CREATEDevent.guardia.lke.chapter.createdEvent triggered when a new chapter is created
CHAPTER_UPDATEDevent.guardia.lke.chapter.updatedEvent triggered when a chapter is updated
CHAPTER_DISCARDEDevent.guardia.lke.chapter.discardedEvent triggered when a chapter is discarded

Asset Events

EventTopicDescription
ASSET_CREATEDevent.guardia.lke.asset.createdEvent triggered when a new asset is created
ASSET_UPDATEDevent.guardia.lke.asset.updatedEvent triggered when an asset is updated
ASSET_DISCARDEDevent.guardia.lke.asset.discardedEvent triggered when an asset is discarded

Book Events

EventTopicDescription
BOOK_CREATEDevent.guardia.lke.book.createdEvent triggered when a new book is created
BOOK_UPDATEDevent.guardia.lke.book.updatedEvent triggered when a book is updated
BOOK_DISCARDEDevent.guardia.lke.book.discardedEvent triggered when a book is discarded

Entry Events

EventTopicDescription
ENTRY_CREATEDevent.guardia.lke.entry.createdEvent triggered when a new entry is created
ENTRY_UPDATEDevent.guardia.lke.entry.updatedEvent triggered when an entry is updated
ENTRY_DISCARDEDevent.guardia.lke.entry.discardedEvent triggered when an entry is discarded

Transaction Events

EventTopicDescription
TRANSACTION_CREATEDevent.guardia.lke.transaction.createdEvent triggered when a new transaction is created
TRANSACTION_UPDATEDevent.guardia.lke.transaction.updatedEvent triggered when a transaction is updated
TRANSACTION_DISCARDEDevent.guardia.lke.transaction.discardedEvent triggered when a transaction is discarded

References