GET /api/caja/historial
Returns a list of past register records ordered by date descending. Includes both open and closed registers.
Required role: admin
Request
Query parameters
Maximum number of records to return (default: 10)
Response
Success (200)
An array ofcaja_turno objects.
Register ID
Register date (
YYYY-MM-DD)Opening timestamp (ISO 8601)
Closing timestamp, or
null if still openID of the user who opened the register
Opening cash amount (BOB)
Total cash sales for the shift (BOB)
Total QR sales for the shift (BOB)
Total expenses for the shift (BOB)
true if the register has been closedClosing observations, if any
Error responses
| Status | Description |
|---|---|
| 401 | Unauthorized — missing or invalid JWT |
| 403 | Forbidden — role is not admin |
Example
GET /api/caja/:id/detalle
Returns the full detail of a specific register, including a computed financial summary and all associated expenses.
Required role: admin or cajero
Request
Path parameters
The numeric ID of the register
Response
Success (200)
Same shape as the response fromGET /api/caja/resumen, but for any register (not just the open one).
The full
caja_turno record for the requested registerComputed financial summary
All expenses recorded against this register
Error responses
| Status | Description |
|---|---|
| 400 | Register not found |
| 401 | Unauthorized — missing or invalid JWT |
| 403 | Forbidden — insufficient role |