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.

The /api/bancos group exposes resources for registering banks in the system, configuring per-bank transaction costs, and managing bank accounts linked to credit clients. Route ordering matters here: specific named paths like /costos and /clientes/:idCliente/bancos are declared before the generic /:idCliente/:idBanco pattern so the router resolves them correctly.
Express resolves routes in registration order. Specific routes such as GET /costos and GET /clientes/:idCliente/bancos are intentionally registered before the generic GET /:idCliente/:idBanco route. If you add new routes to this group, always place them above the generic path parameter route to avoid incorrect handler resolution.

GET /api/bancos/

Returns the full list of banks registered in the system. Authentication: Required

Response

success
boolean
required
true when the request succeeds.
bancos
object[]
required
Array of bank records.
curl --request GET \
  --url https://api.marbes.org/api/bancos/ \
  --header 'Authorization: Bearer <token>'
200 Success
{
  "success": true,
  "bancos": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "nombre": "Banco de Venezuela",
      "codigo": "BDV",
      "descripcion": "Banco principal del estado venezolano",
      "estatus": "activo",
      "created_at": "2024-01-15T10:00:00.000Z",
      "updated_at": "2024-01-15T10:00:00.000Z"
    }
  ]
}
500 Internal Server Error
{
  "success": false,
  "message": "Error interno del servidor."
}

POST /api/bancos/

Creates a new bank record. Authentication: Required

Request body

nombre
string
required
Full bank name.
codigo
string
required
Alphanumeric bank code. Only letters and numbers are accepted; no spaces or special characters.
descripcion
string
Optional description for the bank.
estatus
string
Initial status of the bank. Allowed values: activo, desactivo, suspendido. Defaults to activo when omitted.

Response

success
boolean
required
true when the bank is created successfully.
data
object
The newly created bank record (same shape as the objects returned by GET /api/bancos/).
curl --request POST \
  --url https://api.marbes.org/api/bancos/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "nombre": "Banco Mercantil",
    "codigo": "MERCANTIL",
    "descripcion": "Banco privado venezolano",
    "estatus": "activo"
  }'
201 Created
{
  "success": true,
  "data": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "nombre": "Banco Mercantil",
    "codigo": "MERCANTIL",
    "descripcion": "Banco privado venezolano",
    "estatus": "activo",
    "created_at": "2024-06-01T12:00:00.000Z",
    "updated_at": "2024-06-01T12:00:00.000Z"
  }
}
400 Bad Request
{
  "success": false,
  "message": "Los campos nombre y codigo son requeridos"
}

GET /api/bancos/costos

Returns all bank cost configurations across all banks. Authentication: Required

Response

success
boolean
required
true when the request succeeds.
costos
object[]
required
Array of cost configuration records.
curl --request GET \
  --url https://api.marbes.org/api/bancos/costos \
  --header 'Authorization: Bearer <token>'
200 Success
{
  "success": true,
  "costos": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "id_banco": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "banco_nombre": "Banco de Venezuela",
      "tipo": "transferencia",
      "tasa": 0.5,
      "costo": 10.0,
      "es_mismo_banco": false,
      "estatus": "activo",
      "responsable": "user-uuid",
      "created_at": "2024-01-20T09:00:00.000Z",
      "updated_at": "2024-01-20T09:00:00.000Z"
    }
  ]
}

POST /api/bancos/costos

Creates a new cost configuration for a bank. Authentication: Required

Request body

id_banco
string
required
UUID of the bank this cost configuration applies to.
tipo
string
required
Transaction type. Allowed values: transferencia, pagoProveedor.
tasa
number
required
Percentage rate (e.g., 0.5 for 0.5%).
costo
number
required
Fixed cost amount in the base currency.
es_mismo_banco
boolean
required
Set to true if this cost configuration applies to same-bank transactions.
estatus
string
Initial status. Allowed values: activo, desactivo, suspendido. Defaults to activo.
curl --request POST \
  --url https://api.marbes.org/api/bancos/costos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "id_banco": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "tipo": "transferencia",
    "tasa": 0.5,
    "costo": 10.0,
    "es_mismo_banco": false,
    "estatus": "activo"
  }'
201 Created
{
  "success": true,
  "data": {
    "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "id_banco": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "tipo": "transferencia",
    "tasa": 0.5,
    "costo": 10.0,
    "es_mismo_banco": false,
    "estatus": "activo"
  }
}
400 Bad Request
{
  "success": false,
  "message": "Los campos id_banco, tipo, tasa, costo y es_mismo_banco son requeridos"
}

PUT /api/bancos/costos/:id

Updates an existing bank cost configuration. Authentication: Required

Path parameters

id
string
required
UUID of the cost configuration record to update.

Request body

All fields are optional. Only send the fields you want to change.
tipo
string
Transaction type. Allowed values: transferencia, pagoProveedor.
tasa
number
Updated percentage rate.
costo
number
Updated fixed cost amount.
es_mismo_banco
boolean
Whether the cost applies to same-bank transactions.
estatus
string
Updated status. Allowed values: activo, desactivo, suspendido.
curl --request PUT \
  --url https://api.marbes.org/api/bancos/costos/c3d4e5f6-a7b8-9012-cdef-123456789012 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "tasa": 0.75,
    "costo": 12.0
  }'
200 Success
{
  "success": true,
  "data": {
    "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "tasa": 0.75,
    "costo": 12.0
  }
}

GET /api/bancos/:idBanco/costos

Returns all cost configurations for a specific bank. Authentication: Required

Path parameters

idBanco
string
required
UUID of the bank whose costs you want to retrieve.

Response

success
boolean
required
true when the request succeeds.
costos
object[]
required
Array of cost records for the specified bank. See GET /api/bancos/costos for the record shape.
curl --request GET \
  --url https://api.marbes.org/api/bancos/a1b2c3d4-e5f6-7890-abcd-ef1234567890/costos \
  --header 'Authorization: Bearer <token>'
200 Success
{
  "success": true,
  "costos": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "id_banco": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "tipo": "transferencia",
      "tasa": 0.75,
      "costo": 12.0,
      "es_mismo_banco": false,
      "estatus": "activo"
    }
  ]
}

GET /api/bancos/clientes/:idCliente/bancos

Returns all banks linked to a credit client through their registered bank accounts. Authentication: Required

Path parameters

idCliente
string
required
UUID of the credit client (cliente_credito).

Response

success
boolean
required
true when the request succeeds.
bancos
object[]
required
Array of banks associated with the client’s registered accounts.
curl --request GET \
  --url https://api.marbes.org/api/bancos/clientes/d4e5f6a7-b8c9-0123-defa-234567890123/bancos \
  --header 'Authorization: Bearer <token>'
200 Success
{
  "success": true,
  "bancos": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "nombre": "Banco de Venezuela",
      "codigo": "BDV",
      "estatus": "activo"
    }
  ]
}

POST /api/bancos/clientes/:idCliente/cuentas

Registers a new bank account for a credit client. Authentication: Required

Path parameters

idCliente
string
required
UUID of the credit client for whom the account is being created.

Request body

id_banco
string
required
UUID of the bank where the account is held.
cuenta
string
required
Account number. Must contain digits only.
telefono
string
Optional phone number associated with the account. Formatted automatically by the server.
curl --request POST \
  --url https://api.marbes.org/api/bancos/clientes/d4e5f6a7-b8c9-0123-defa-234567890123/cuentas \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "id_banco": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "cuenta": "01020304050607080900",
    "telefono": "04141234567"
  }'
201 Created
{
  "success": true,
  "data": {
    "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
    "id_cliente_credito": "d4e5f6a7-b8c9-0123-defa-234567890123",
    "id_banco": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "cuenta": "01020304050607080900",
    "telefono": "+58 414-123-4567",
    "estatus": "activo"
  }
}
400 Bad Request
{
  "success": false,
  "message": "id_banco y cuenta son requeridos"
}

GET /api/bancos/:idCliente/:idBanco

Returns the active bank account record for a specific client and bank combination. Authentication: Required
This route is registered last in the router because it uses two generic path parameters (/:idCliente/:idBanco). Any request that does not match a specific named path above will fall through to this handler. Ensure you pass UUIDs for both parameters to avoid conflicts with named segments.

Path parameters

idCliente
string
required
UUID of the credit client.
idBanco
string
required
UUID of the bank.

Response

success
boolean
required
true when the request succeeds.
bancos
object[]
required
Array of active account records matching the client and bank. Typically contains one record.
curl --request GET \
  --url https://api.marbes.org/api/bancos/d4e5f6a7-b8c9-0123-defa-234567890123/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  --header 'Authorization: Bearer <token>'
200 Success
{
  "success": true,
  "bancos": [
    {
      "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
      "id_cliente_credito": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "id_banco": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "cuenta": "01020304050607080900",
      "estatus": "activo"
    }
  ]
}
400 Bad Request
{
  "success": false,
  "message": "El id_cliente es requerido"
}

Build docs developers (and LLMs) love