Marbes is built around a two-sided financial model: funds flow in from investors through contracts and collection records (TCOL), are held in controlled pools (Control de Fondos), and then flow out as loans (TPROD) disbursed to credit clients. Every entity in the system maps to a step in this cycle, and all monetary values carry an explicit currency and a BCV (Banco Central de Venezuela) exchange rate at the time of the transaction.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/scoria02/marbes2021_backend/llms.txt
Use this file to discover all available pages before exploring further.
Core entities
Aportante (Investor)
A person or legal entity that provides funds to the company. Each aportante has a unique
cedula_rif, contact details, a tipo (natural or corp), and an estatus. Aportantes are the origin of all capital in the system.Cliente (Credit Client)
A person or legal entity that receives loans. A client record tracks their credit limit (
credito), available credit (disponible), and the amount currently lent (prestado). Clients can be linked to one or more bank accounts.Contrato (Investment Contract)
An agreement between an aportante and the company. A contract defines the invested amount (
monto), currency, term (plazo_cantidad + plazo_opcion), start and end dates, and optional guarantee documents. One aportante can hold multiple contracts.Compania (Company)
The operating entity that manages the fund cycle. A TCOL is always assigned to a specific company via
id_compania. A company has a nombre, optional rif, and an estatus.TCOL (Collection)
A record of funds received from a contract and assigned to a bank account. TCOL is the “money in” step: it links
id_contrato → id_compania → id_banco, stores the amount, currency, BCV rate, optional bank cost, and a referencia. Multiple TCOLs can belong to one contract.TPROD (Loan Product)
A loan disbursed to a client from collected funds. TPROD is the “money out” step: it records the base amount (
monto_prestado), commission, bank cost, total owed (monto_total), amount repaid (monto_pagado), term, guarantees, and the disbursing bank. A TPROD links back to a TCOL via id_tcol.Control de Fondos (Fund Control)
An intermediate allocation pool created before loans are disbursed. A fund control record assigns
monto_asignado to an operator and a set of executives within a company, tracks monto_usado, and can report monto_disponible. It acts as an authorization layer between collection and lending.ContratoCerrado (Closed Contract)
A record that marks an investment contract as finalized. It stores the agreed
tasa (rate) and comision for the closing, plus an optional nota. Once closed, the contract is moved to the finalized state.Fund lifecycle
The following diagram shows how capital moves through the system from investor to client:Investor registers and signs a contract
An
Aportante is created and associated with a Contrato that specifies the amount, currency, and term. The contract has a start date (fecha_inicio) and a calculated end date (fecha_fin).Funds are collected (TCOL)
When the investor transfers funds, a
TCOL record is created linking the contract to a company and a bank account. The amount, currency, BCV rate, and optional bank cost percentage are recorded. The referencia field stores the transfer reference number.Fund control is established (optional)
A
ControlFondos record can be created to allocate a portion of collected funds to specific operators and executives before lending begins. This provides an authorization checkpoint and tracks usage against the assigned budget.Loan is disbursed (TPROD)
A
TPROD is created linking back to the TCOL, the target client, and a disbursing bank. It records the loan amount, commission percentage, term, guarantee documents, and start date. The client’s disponible balance decreases and prestado increases.Currencies
All monetary amounts in TCOL, TPROD, and Control de Fondos carry an explicitmoneda field. Every transaction also stores tasa_bcv—the BCV exchange rate at the time of the operation—to allow cross-currency reconciliation.
| Code | Currency |
|---|---|
VES | Venezuelan bolívar |
USD | US dollar |
EUR | Euro |
Status values
TCOL status
TCOL status
TCOL records follow a four-state lifecycle:
| Value | Meaning |
|---|---|
pendiente | Funds received but not yet reviewed |
aceptado | Funds accepted and available for lending |
devuelto | Funds returned to the investor |
rechazado | Collection rejected (e.g., failed validation) |
TPROD status
TPROD status
TPROD records have one additional state compared to TCOL:
| Value | Meaning |
|---|---|
pendiente | Loan created but not yet disbursed |
aceptado | Loan active and in repayment |
devuelto | Loan repaid in full |
rechazado | Disbursement rejected |
mora | Loan in default (past due) |
Control de Fondos status
Control de Fondos status
Fund control records track allocation lifecycle:
| Value | Meaning |
|---|---|
activo | Allocation is active and available |
suspendido | Temporarily paused |
finalizado | All funds used or explicitly closed |
cancelado | Allocation cancelled before use |
Term (plazo) options
Theplazo_opcion field appears on both contracts and loans and controls how plazo_cantidad is interpreted:
| Value | Unit | Example |
|---|---|---|
dias | Days | plazo_cantidad: 30, plazo_opcion: "dias" → 30-day term |
mes | Months | plazo_cantidad: 6, plazo_opcion: "mes" → 6-month term |
ano | Years | plazo_cantidad: 1, plazo_opcion: "ano" → 1-year term |
Entity field reference
Contrato fields
Contrato fields
| Field | Type | Description |
|---|---|---|
id | string | UUID |
id_aportante | string | Reference to the investor |
monto | number | Contract investment amount |
moneda | string | Currency code |
plazo_cantidad | number | Term quantity |
plazo_opcion | PlazoOpcion | dias, mes, or ano |
fecha_inicio | string | Start date (YYYY-MM-DD) |
fecha_fin | string | End date (YYYY-MM-DD) |
garantia | string | JSON array of guarantee file paths |
contrato_estatus | string | Current contract status |
responsable_id | string | Employee responsible for the contract |
TCOL fields
TCOL fields
| Field | Type | Description |
|---|---|---|
id | string | UUID |
id_contrato | string | Parent contract reference |
id_compania | string | null | Company receiving the funds |
monto | number | Amount received |
moneda | VES | USD | EUR | Currency |
tasa_bcv | number | BCV exchange rate at time of receipt |
costo_banco | number | Bank cost percentage |
id_banco | string | Receiving bank account |
referencia | string | null | Transfer reference number |
fecha_recibido | string | Date funds were received |
estatus | aceptado | pendiente | devuelto | rechazado | Current status |
TPROD fields
TPROD fields
| Field | Type | Description |
|---|---|---|
id | string | UUID |
id_tcol | string | Source collection record |
id_cliente | string | Borrowing client |
monto_prestado | number | Base loan amount |
monto_comision | number | Commission percentage applied |
monto_total | number | Total owed (principal + commission) |
monto_pagado | number | Amount repaid to date |
costo_banco | number | Bank cost percentage |
moneda | VES | USD | EUR | Currency |
tasa_bcv | number | BCV rate at disbursement |
plazo_cantidad | number | Loan term quantity |
plazo_opcion | dias | mes | ano | Loan term unit |
id_banco | string | Disbursing bank |
referencia | string | null | Disbursement reference number |
garantia | string | JSON array of guarantee file paths |
estatus | aceptado | pendiente | devuelto | rechazado | mora | Current status |
fecha_inicio | string | Disbursement start date |
fecha_fin | string | Repayment due date |