GET /api/caja/resumen
Calculates and returns a real-time summary of the currently open register, including expected cash on hand, QR balance, and a list of all recorded expenses. Use this endpoint to review figures before closing the register.
Authentication: Bearer JWT required
Required role: admin or cajero
Request
No parameters or body required.
Response
Success (200)
The current open register object (same shape as GET /api/caja/actual)
Calculated financial summary for the current shift Opening cash amount (BOB)
Total cash sales in this shift (BOB)
Total QR sales in this shift (BOB)
Total cash expenses in this shift (BOB)
Total QR expenses in this shift (BOB)
resumen.efectivo_esperado
Expected physical cash: monto_inicial + ventas_efectivo − gastos_efectivo (BOB)
Net QR balance: ventas_qr − gastos_qr (BOB)
Total revenue for the day: ventas_efectivo + ventas_qr (BOB)
Total all expenses: gastos_efectivo + gastos_qr (BOB)
List of all expense records for the current register Register ID this expense belongs to
ID of the user who recorded the expense
Payment method: efectivo or qr
Timestamp when the expense was created
Error responses
Status Description 400 No register is currently open 401 Unauthorized — missing or invalid JWT 403 Forbidden — role is not admin or cajero
Example
curl http://localhost:3000/api/caja/resumen \
-H "Authorization: Bearer <token>"
{
"caja" : {
"id" : 1 ,
"fecha" : "2026-02-04" ,
"cerrada" : false
},
"resumen" : {
"monto_inicial" : 500.00 ,
"ventas_efectivo" : 1200.00 ,
"ventas_qr" : 800.00 ,
"gastos_efectivo" : 100.00 ,
"gastos_qr" : 50.00 ,
"efectivo_esperado" : 1600.00 ,
"total_qr" : 750.00 ,
"total_del_dia" : 2000.00 ,
"total_gastos" : 150.00
},
"gastos" : [
{
"id" : 1 ,
"caja_id" : 1 ,
"usuario_id" : "usr_abc123" ,
"descripcion" : "Compra de gas" ,
"metodo_pago" : "efectivo" ,
"monto" : 100.00 ,
"creado_en" : "2026-02-04T10:00:00.000Z" ,
"actualizado_en" : "2026-02-04T10:00:00.000Z" ,
"borrado_en" : null
}
]
}