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.

Investors (aportantes) are the individuals or entities who fund investment contracts in Marbes. These endpoints let you register new investors, list all investors on record, and look up the contracts that belong to a given investor. Every request must include a valid Authorization: Bearer <token> header issued by the auth service.

Create investor

Method: POST
Path: /api/negocios/aportante
Authentication: Bearer JWT required
Content-Type: application/json

Body parameters

nombre
string
required
Investor’s first name.
apellido
string
required
Investor’s last name.
cedula_rif
string
required
National identity number or tax ID (RIF). Must be unique in the system.
email
string
required
Contact email address. Must be unique in the system.
tipo
string
required
Investor classification. Typical values: natural (individual), juridico (company).
referido
string
required
Name or identifier of the person who referred this investor.
telefono
string
Contact phone number. Optional; can be added or updated later.
fecha_registro
string
Registration date in YYYY-MM-DD format. Defaults to the current timestamp when omitted.

Response fields

id
string
Unique UUID for the investor.
nombre
string
First name.
apellido
string
Last name.
cedula_rif
string
Identity or tax ID number.
email
string
Email address.
telefono
string
Phone number.
tipo
string
Investor type (natural or juridico).
referido
string
Referral source or referrer name.
responsable
string
ID of the authenticated user who created this record.
estatus
string
Account status. Typically activo after creation.
fecha_registro
string
ISO 8601 date when the investor was registered.
created_at
string
ISO 8601 timestamp of record creation.
updated_at
string
ISO 8601 timestamp of the last update.

Examples

curl --request POST \
  --url https://api.example.com/api/negocios/aportante \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "nombre": "Carlos",
    "apellido": "Ramírez",
    "cedula_rif": "V-18765432",
    "email": "[email protected]",
    "tipo": "natural",
    "referido": "Ana Pérez",
    "telefono": "+58 414 555 0200",
    "fecha_registro": "2025-01-15"
  }'

Success response

201
{
  "id": "d4e5f6a7-b8c9-0123-def0-456789abcdef",
  "nombre": "Carlos",
  "apellido": "Ramírez",
  "cedula_rif": "V-18765432",
  "email": "[email protected]",
  "telefono": "+58 414 555 0200",
  "tipo": "natural",
  "referido": "Ana Pérez",
  "responsable": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "estatus": "activo",
  "fecha_registro": "2025-01-15T00:00:00.000Z",
  "created_at": "2025-01-15T14:30:00.000Z",
  "updated_at": "2025-01-15T14:30:00.000Z"
}

Error responses

400
{
  "success": false,
  "message": "Los campos nombre, apellido, cedula_rif y email son requeridos"
}
401
{
  "success": false,
  "message": "Usuario no autenticado"
}
500
{
  "success": false,
  "message": "Error interno del servidor"
}

List all investors

Returns all investor records in the system. Method: GET
Path: /api/negocios/aportantes
Authentication: Bearer JWT required

Examples

curl --request GET \
  --url https://api.example.com/api/negocios/aportantes \
  --header 'Authorization: Bearer <token>'

Success response

200
{
  "success": true,
  "aportantes": [
    {
      "id": "d4e5f6a7-b8c9-0123-def0-456789abcdef",
      "nombre": "Carlos",
      "apellido": "Ramírez",
      "cedula_rif": "V-18765432",
      "email": "[email protected]",
      "telefono": "+58 414 555 0200",
      "tipo": "natural",
      "referido": "Ana Pérez",
      "responsable": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "estatus": "activo",
      "fecha_registro": "2025-01-15T00:00:00.000Z",
      "created_at": "2025-01-15T14:30:00.000Z",
      "updated_at": "2025-01-15T14:30:00.000Z"
    }
  ]
}

Error responses

500
{
  "message": "Error interno del servidor."
}

Get contracts for an investor

Returns all investment contracts linked to the specified investor. Method: GET
Path: /api/negocios/aportantes/:idAportante/contratos
Authentication: Bearer JWT required

Path parameters

idAportante
string
required
UUID of the investor whose contracts you want to retrieve.

Examples

curl --request GET \
  --url https://api.example.com/api/negocios/aportantes/d4e5f6a7-b8c9-0123-def0-456789abcdef/contratos \
  --header 'Authorization: Bearer <token>'

Success response

200
{
  "success": true,
  "data": [
    {
      "id": "c1d2e3f4-a5b6-7890-cdef-012345678901",
      "id_aportante": "d4e5f6a7-b8c9-0123-def0-456789abcdef",
      "aportante": "Carlos Ramírez",
      "cedula_rif": "V-18765432",
      "monto": 50000,
      "moneda": "USD",
      "plazo_cantidad": 6,
      "plazo_opcion": "mes",
      "fecha_inicio": "2025-02-01",
      "fecha_fin": "2025-08-01",
      "garantia": null,
      "contrato_estatus": "activo",
      "responsable": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "fecha_registro": "2025-02-01T00:00:00.000Z"
    }
  ]
}

Error responses

400
{
  "success": false,
  "message": "El id_aportante es requerido"
}
500
{
  "success": false,
  "message": "Error interno del servidor"
}

Build docs developers (and LLMs) love