Skip to main content

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.

An investment contract (contrato) ties an investor (aportante) to a fixed-term deposit. Funds flow in through TCOL collection records, which capture each bank transfer received from the investor. When the term ends, you close the contract by recording the agreed exchange rate and any commission earned. This guide walks through every step in order, using real field names from the API. All requests require a valid JWT token in the Authorization header.
1

Create an investor (aportante)

An aportante is a person or legal entity that deposits funds into a contract. You must create one before you can attach a contract.
curl -X POST https://your-server:7780/api/negocios/aportante \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "María",
    "apellido": "González",
    "cedula_rif": "V-12345678",
    "email": "[email protected]",
    "tipo": "natural",
    "referido": "REF-001",
    "telefono": "+58-414-1234567",
    "fecha_registro": "2026-01-15"
  }'
nombre
string
required
First name of the investor.
apellido
string
required
Last name of the investor.
cedula_rif
string
required
National ID or tax registry number. Use the format V-######## for individuals or J-######## for companies.
email
string
required
Contact email address.
tipo
string
required
Investor type — typically natural (individual) or juridico (company).
referido
string
required
Reference code for the person or channel that referred this investor.
telefono
string
Contact phone number.
fecha_registro
string
Registration date in YYYY-MM-DD format. Defaults to the current timestamp if omitted.
The response includes the newly created aportante’s id. Save it — you’ll need it in the next step.
2

Create a contract

A contract defines the currency, term length, and start/end dates for the investment. Attach it to the aportante you just created using their id.
curl -X POST https://your-server:7780/api/negocios/contrato \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id_aportante": "aportante-uuid",
    "moneda": "USD",
    "plazo_cantidad": 3,
    "plazo_opcion": "mes",
    "fecha_inicio": "2026-02-01",
    "fecha_fin": "2026-05-01",
    "garantia": "Pagaré firmado"
  }'
id_aportante
string
required
UUID of the aportante created in step 1.
moneda
string
required
Investment currency — USD, VES, or EUR.
plazo_cantidad
number
required
Numeric length of the term (e.g., 3 for three months).
plazo_opcion
string
required
Unit for the term: dias (days), mes (months), or ano (years).
fecha_inicio
string
required
Contract start date in YYYY-MM-DD format.
fecha_fin
string
Contract end date in YYYY-MM-DD format. Can be calculated automatically from plazo_cantidad and plazo_opcion if omitted.
garantia
string
Description or reference for the guarantee instrument backing this contract (e.g., a signed promissory note).
The response includes the contract id you’ll use in the next step.
3

Record incoming funds with a TCOL

A TCOL (colección de fondos) is a record of a bank transfer received from the investor. Each bank deposit gets its own TCOL entry linked to the contract.
curl -X POST https://your-server:7780/api/negocios/tcol \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id_contrato": "contrato-uuid",
    "id_compania": "compania-uuid",
    "monto": 10000,
    "moneda": "USD",
    "tasa_bcv": 36.50,
    "id_banco": "banco-uuid",
    "referencia": "REF-20260201-001",
    "fecha_recibido": "2026-02-01",
    "estatus": "aceptado",
    "costo_banco": 0.25
  }'
id_contrato
string
required
UUID of the contract this collection belongs to.
id_compania
string
required
UUID of the company that received the funds.
monto
number
required
Amount received in the specified currency.
moneda
string
required
Currency of the transfer: VES, USD, or EUR.
tasa_bcv
number
required
BCV exchange rate at the time the funds were received.
id_banco
string
required
UUID of the bank account where funds were deposited.
referencia
string
Bank transfer reference number.
fecha_recibido
string
required
Date the funds were received, in YYYY-MM-DD format.
estatus
string
Initial status of the collection record. See status values below.
costo_banco
number
Bank fee as a percentage (e.g., 0.25 for 0.25%).

TCOL statuses

StatusMeaning
pendienteFunds received but not yet reviewed or confirmed.
aceptadoFunds verified and accepted — available for lending.
devueltoFunds returned to the investor.
rechazadoTransfer rejected (e.g., incorrect amount, invalid reference).
A TCOL in pendiente status does not make funds available for lending. An operator must update it to aceptado before the funds appear in the bank’s available balance.
4

Close the contract

When a contract matures, record the closing exchange rate and any commission earned. This finalizes the contract and moves it to the completed state.
curl -X POST https://your-server:7780/api/negocios/contrato-cerrado \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id_contrato": "contrato-uuid",
    "tasa": 36.75,
    "comision": 5.00,
    "nota": "Closed at maturity, rate agreed with investor"
  }'
id_contrato
string
required
UUID of the contract to close.
tasa
number
required
Exchange rate applied at contract closure.
comision
number
required
Commission earned on the contract.
nota
string
Optional closing notes or remarks.
Use GET /api/negocios/contratos/finalizados to retrieve all closed contracts and verify the closure was recorded correctly.

Retrieve TCOL records for a contract

To list all TCOL collection records associated with a contract, use:
curl -X GET https://your-server:7780/api/negocios/contratos/{idContrato}/tcol \
  -H "Authorization: Bearer YOUR_TOKEN"

Retrieve all contracts for an aportante

curl -X GET https://your-server:7780/api/negocios/aportantes/{idAportante}/contratos \
  -H "Authorization: Bearer YOUR_TOKEN"

Build docs developers (and LLMs) love