The Reportes module provides structured JSON payloads purpose-built for two use cases: real-time dashboard charts and PDF-ready report data. Every response is pre-aggregated on the server — totals, breakdowns, and rankings are computed by the API so the frontend can pass the data straight to a charting library or a PDF renderer without additional transformation. All endpoints in this module require a validDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Eleazarguitar18/kantuta_pos_back/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <access_token> header.
Dashboard statistics
Query parameters
Four-digit year used to group the monthly sales series (e.g.
2025). Defaults to the current calendar year when omitted. Non-numeric values are silently coerced to the current year.Response
Real-time KPI counters for today.
12-element array — one entry per calendar month — for the requested
anio. Months with no completed sales have total: 0.Top 5 products ranked by total units sold across all time (completed sales only).
Monthly recharge revenue split by carrier — always returns exactly three entries:
Entel, Viva, and Tigo. Carriers with no transactions in the current month have total: 0.Example
Sales range report
Query parameters
Range start date in ISO 8601 format (
YYYY-MM-DD). Internally set to 00:00:00 local time.Range end date in ISO 8601 format (
YYYY-MM-DD). Internally set to 23:59:59.999 local time.Name of the person requesting the report — embedded in the PDF header by the frontend renderer.
Response
Aggregated totals for the requested range (only
COMPLETADA and EDITADA sales are counted).Ordered list of individual sales (most recent first).
Example
Purchases range report
Compra entity.
Query parameters
Range start date (
YYYY-MM-DD).Range end date (
YYYY-MM-DD).Auditor name embedded in the report metadata.
Response
Start date echoed back.
End date echoed back.
Auditor name echoed back.
ISO 8601 timestamp of when the report was generated.
List of purchase records (most recent first).
Sum of all purchase totals in the range.
Inventory snapshot
Query parameters
Auditor name included in the report metadata for traceability.
Response
ISO 8601 timestamp of when the snapshot was taken.
Auditor name echoed back.
All active products, ordered by
stock_actual ascending (lowest stock first).Inventory financial summary.
Operator productivity report
Query parameters
Range start date (
YYYY-MM-DD).Range end date (
YYYY-MM-DD).Optional. Filter results to a single operator by their user ID. Omit to return all operators.
Response
Start date echoed back.
End date echoed back.
ISO 8601 timestamp of report generation.
Ranked list of operators (highest billed first).
Cash session movements
404 if the session ID does not exist.
Path parameters
Numeric ID of the
SesionCaja record (e.g. 42).Response
Session metadata.
All active movements for this session, ordered chronologically.
Single sale receipt
404 if the sale ID does not exist.
Path parameters
Numeric ID of the
Venta record (e.g. 1042).Response
Sale ID.
ISO 8601 sale timestamp.
Name of the operator who processed the sale, or
"Sistema" if the user record is unavailable."EFECTIVO", "QR", or "TRANSFERENCIA".Final status:
"COMPLETADA", "EDITADA", or "ANULADA".Line items of the sale.
Sale grand total.
Product data sheet
404 if the product ID does not exist.
Path parameters
Numeric ID of the
Producto record.Response
Product ID.
Product name.
Barcode string, or
null if not assigned.Category name, or
"Sin categoría".Current units on hand.
Reorder threshold.
Current sale price.
Current purchase cost.
ISO 8601 timestamp of when the product was first created.
Cash register history extract
/movimientos-caja/:idSesion (which scopes to one session), this endpoint aggregates every movement ever recorded for the register. Throws 404 if no movements exist for the given caja ID.
Path parameters
Numeric ID of the
Caja entity (the physical register), not a session ID.Response
All movements across all sessions for this register, ordered by date ascending.
PDF generation tips
POST /ventas/reporte-resumen (in the Ventas module) provides an alternative grouped financial summary for a date range with subtotals by payment method. Use it when you need a high-level executive summary rather than the full transaction list returned by /reportes/data/ventas-rango.