Skip to main content
GET
/
api
/
Venta
/
Reporte
Sales Report
curl --request GET \
  --url https://api.example.com/api/Venta/Reporte
{
  "status": true,
  "value": [
    {
      "NumeroDocumento": "<string>",
      "TipoPago": "<string>",
      "FechaRegistro": "<string>",
      "TotalVenta": "<string>",
      "Producto": "<string>",
      "Cantidad": 123,
      "Precio": "<string>",
      "Total": "<string>"
    }
  ],
  "msg": "<string>"
}

Query Parameters

fechaInicio
string
Start date for the report period.Format: dd/MM/yyyy (e.g., "01/03/2026")If not provided, returns all sales up to fechaFin.
fechaFin
string
End date for the report period.Format: dd/MM/yyyy (e.g., "05/03/2026")If not provided, returns all sales from fechaInicio onwards.

Response

status
boolean
Indicates whether the operation was successful
value
array
Array of detailed report records. Each record represents a line item from sales in the date range.
msg
string
Error message if status is false

Example Requests

curl "http://localhost:5000/api/Venta/Reporte?fechaInicio=01/03/2026&fechaFin=05/03/2026"

Example Response

Success Response
{
  "status": true,
  "value": [
    {
      "NumeroDocumento": "0001-00000123",
      "TipoPago": "Efectivo",
      "FechaRegistro": "05/03/2026 10:30:45 AM",
      "TotalVenta": "150.00",
      "Producto": "Laptop HP 15",
      "Cantidad": 1,
      "Precio": "120.00",
      "Total": "120.00"
    },
    {
      "NumeroDocumento": "0001-00000123",
      "TipoPago": "Efectivo",
      "FechaRegistro": "05/03/2026 10:30:45 AM",
      "TotalVenta": "150.00",
      "Producto": "Mouse Inalámbrico",
      "Cantidad": 2,
      "Precio": "15.00",
      "Total": "30.00"
    },
    {
      "NumeroDocumento": "0001-00000126",
      "TipoPago": "Tarjeta",
      "FechaRegistro": "05/03/2026 02:15:30 PM",
      "TotalVenta": "89.50",
      "Producto": "Teclado Mecánico",
      "Cantidad": 1,
      "Precio": "89.50",
      "Total": "89.50"
    },
    {
      "NumeroDocumento": "0001-00000127",
      "TipoPago": "Transferencia",
      "FechaRegistro": "05/03/2026 04:45:15 PM",
      "TotalVenta": "245.00",
      "Producto": "Monitor 24 pulgadas",
      "Cantidad": 1,
      "Precio": "245.00",
      "Total": "245.00"
    }
  ],
  "msg": null
}
Empty Report
{
  "status": true,
  "value": [],
  "msg": null
}
Error Response
{
  "status": false,
  "value": null,
  "msg": "Error al generar el reporte de ventas"
}

Notes

  • The report returns one row per product line item, not per sale
  • Each row includes both the line item details and the parent sale information
  • This format is ideal for generating detailed sales analysis and product performance reports
  • Use for export to Excel, generating charts, or analytical dashboards

Build docs developers (and LLMs) love