Skip to main content

GET /api/transacciones

Returns all transactions that have not been soft-deleted, ordered by creation time descending (newest first). Each item includes the calculated monto_pendiente field. Authentication: Required Required role: Any authenticated user

Request

Headers

HeaderValueRequired
AuthorizationBearer <token>Yes

Response

Success (200)

Returns an array of transaction objects. Each object has the following fields:
[].id
number
Transaction ID.
[].nro_reg
number
Sequential registration number.
[].concepto
string
Transaction description.
[].tipo
string
Transaction type (e.g. venta).
[].mesa
string | null
Service location.
[].cliente
string | null
Customer name.
[].estado
string
Status: pendiente, abierto, or cerrado.
[].estado_cocina
string
Kitchen status: pendiente or terminado.
[].monto_total
string
Total amount as a decimal string.
[].monto_pagado
string
Amount already paid as a decimal string.
[].monto_pendiente
string
Calculated outstanding amount (monto_total - monto_pagado).
[].caja_id
number | null
Associated register ID.
[].usuario_id
string | null
ID of the user who created the transaction.
[].fecha
string
Creation date (YYYY-MM-DD).
[].hora
string
Creation timestamp with timezone.

Error responses

StatusDescription
401Unauthorized

Example

curl http://localhost:3000/api/transacciones \
  -H "Authorization: Bearer $TOKEN"
[
  {
    "id": 42,
    "nro_reg": 1,
    "concepto": "Pedido mesa 5",
    "tipo": "venta",
    "mesa": "Mesa 5",
    "cliente": "Juan Pérez",
    "estado": "abierto",
    "estado_cocina": "pendiente",
    "monto_total": "85.00",
    "monto_pagado": "0.00",
    "monto_pendiente": "85.00",
    "caja_id": 3,
    "usuario_id": "usr_1234567890",
    "fecha": "2026-03-18",
    "hora": "2026-03-18T14:30:00.000Z",
    "creado_en": "2026-03-18T14:30:00.000Z",
    "actualizado_en": "2026-03-18T14:35:00.000Z",
    "borrado_en": null
  }
]

Build docs developers (and LLMs) love