POST /api/caja/cerrar
Closes the currently open register. Provide a physical count of all denominations present in the drawer; the server computes monto_contado, compares it against the expected cash amount, and returns a reconciliation result.
Authentication: Bearer JWT requiredRequired role:
admin or cajero
The
monto_contado is derived entirely from the denomination fields — you do not pass it directly. All denomination fields are required (pass 0 for empty denominations).Request
Body
Number of 200 BOB bills counted at closing (min: 0)
Number of 100 BOB bills counted at closing (min: 0)
Number of 50 BOB bills counted at closing (min: 0)
Number of 20 BOB bills counted at closing (min: 0)
Number of 10 BOB bills counted at closing (min: 0)
Number of 5 BOB bills counted at closing (min: 0)
Number of 2 BOB coins counted at closing (min: 0)
Number of 1 BOB coins counted at closing (min: 0)
Number of 0.50 BOB coins counted at closing (min: 0)
Number of 0.20 BOB coins counted at closing (min: 0)
Number of 0.10 BOB coins counted at closing (min: 0)
Optional closing observations (e.g. “Cierre normal sin novedades”)
Response
Success (200)
ID of the register that was closed
Date of the closed register (
YYYY-MM-DD)Physical cash counted, computed from the submitted denomination counts
Expected cash:
monto_inicial + ventas_efectivo − gastos_efectivomonto_contado − efectivo_esperado. Negative means a shortage, positive means a surplus.Reconciliation result. One of:
exacto, sobrante, faltanteFull summary object — same shape as the response from
GET /api/caja/resumenError responses
| Status | Description |
|---|---|
| 400 | No register is currently open |
| 401 | Unauthorized — missing or invalid JWT |
| 403 | Forbidden — role is not admin or cajero |