TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DragonesMagicos/ferromax_v0.8/llms.txt
Use this file to discover all available pages before exploring further.
/ventas endpoints handle all sales transactions — both in-store POS sales and online Tienda orders. The sale origin (POS vs WEB) is set automatically based on the caller’s role: a CLIENTE token produces a WEB origin, while ADMIN or EMPLEADO tokens produce a POS origin. The cajeroId is always extracted from the JWT; callers never supply it directly.
POST /api/ventas
Registers a new sale and decrements stock for each item in the transaction. Auth:ADMIN, EMPLEADO, or CLIENTE
Request Body (VentaRequest)
Payment method. Must be one of the
MedioPagoEnum values listed below.List of line items. Must contain at least one entry.
Optional ID of the customer. Required for
WEB sales when linking to a customer account; omit for anonymous POS transactions.Response 201 Created
Returns a VentaDetalleResponse.
Internal sale identifier.
Timestamp of the transaction in ISO-8601 format with timezone offset (Argentina/Buenos Aires,
UTC-3).Sum of all line item subtotals before discounts.
Total discount applied to the sale.
Final amount charged after discounts.
Current sale state. One of
COMPLETADA, ANULADA, PENDIENTE.Payment method used.
Full name of the employee or admin who processed the sale.
Sale channel:
POS (in-store) or WEB (online Tienda).ID of the associated fiscal receipt record. May be
null if receipt generation is pending.Line items included in the sale.
GET /api/ventas
Lists all sales within a date range. Defaults to the last 30 days when no parameters are supplied. Dates are interpreted in theAmerica/Argentina/Buenos_Aires timezone.
Auth: ADMIN
Query Parameters
Start date in ISO-8601 format (
YYYY-MM-DD). Inclusive. Defaults to 30 days before today.End date in ISO-8601 format (
YYYY-MM-DD). Inclusive. Defaults to today.Response 200 OK
Returns an array of VentaResponse.
Internal sale identifier.
Transaction timestamp (ISO-8601 with timezone offset).
Final charged amount.
Sale state:
COMPLETADA, ANULADA, or PENDIENTE.Payment method used.
Name of the employee who processed the sale.
Total number of line items in the sale.
Sale channel:
POS or WEB.GET /api/ventas/mis-compras
Returns the authenticated customer’s complete online order history. Only sales withorigen = WEB linked to the caller’s user ID are returned.
Auth: CLIENTE
Response 200 OK
Returns an array of VentaResponse filtered to the caller’s userId. See GET /api/ventas for field descriptions.
GET /api/ventas/mis-ventas-hoy
Returns all sales processed by the authenticated employee during the current calendar day (Argentina timezone). Auth:EMPLEADO
Response 200 OK
Returns an array of VentaResponse filtered to today’s sales for the calling employee.
GET /api/ventas/{id}
Returns summary information for a single sale. Auth:ADMIN or EMPLEADO
Path Parameters
Internal sale identifier.
Response 200 OK
Returns a VentaResponse.
GET /api/ventas/{id}/detalle
Returns the full details of a single sale, including the complete line-item list with product names, quantities, and per-unit prices. Auth:ADMIN or EMPLEADO
Path Parameters
Internal sale identifier.
Response 200 OK
Returns a VentaDetalleResponse. See POST /api/ventas for full field descriptions.
PUT /api/ventas/{id}/anular
Voids a sale by changing itsestado to ANULADA. The sale record is retained for audit purposes.
Auth: ADMIN
Path Parameters
Internal sale identifier.
Response 200 OK
Returns the updated VentaResponse with estado: "ANULADA".
Reference: Enumerations
MedioPagoEnum — Payment Methods
| Value | Description |
|---|---|
EFECTIVO | Cash payment |
DEBITO | Debit card |
CREDITO | Credit card |
MERCADOPAGO | MercadoPago digital wallet |
EstadoVentaEnum — Sale States
| Value | Description |
|---|---|
PENDIENTE | Sale created but not yet fully processed (e.g. awaiting payment confirmation) |
COMPLETADA | Sale successfully finalised and stock decremented |
ANULADA | Sale voided by an admin; stock is not automatically restored |
OrigenVentaEnum — Sale Channel
| Value | Description |
|---|---|
POS | In-store sale processed by an ADMIN or EMPLEADO |
WEB | Online order placed by a CLIENTE through the Tienda storefront |