Sessions (sesiones) are the permanent billing records that Billar Pro generates whenever a table is closed. You never create a session directly — the system creates one automatically whenDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ierinconc/billar-pro-backend/llms.txt
Use this file to discover all available pages before exploring further.
PUT /api/mesas/{id}/cerrar is called. At that moment the service calculates elapsed time, applies the table’s hourly rate, sums all open consumptions, and writes a single immutable Sesion row. The sessions API therefore provides read-only access to the complete historical ledger of every table session that has ever been closed.
Endpoints
GET /api/sesiones
Returns the full list of completed sessions ordered by database insertion sequence. Authentication: Required — include a valid JWT Bearer token. Query parameters: None. Response:200 OK — array of Sesion objects.
Auto-generated primary key of the session.
The billiard table that was closed to produce this session.
Timestamp when the table was opened and the session clock started, e.g.
"2025-06-01T14:00:00".Timestamp when
PUT /api/mesas/{id}/cerrar was called and the session was finalised.Elapsed time in fractional hours, computed as
Duration.toMinutes() / 60.0.Table charge:
horasJugadas × mesa.precioPorHora.Sum of the
subtotal of every Consumo linked to this session.Grand total:
totalMesa + totalConsumos.Calendar date on which the session was recorded, e.g.
"2025-06-01".Request example
Response example
Sessions are created exclusively by the table-close workflow (
PUT /api/mesas/{id}/cerrar). There are no POST, PUT, or DELETE endpoints on /api/sesiones — the historical record is immutable once written.