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.
/productos endpoints manage the hardware store product catalog. They offer three access levels: full CRUD for admins (including cost price and supplier data), read-only lookup for employees (no sensitive pricing), and a public catalog for the storefront. All authenticated endpoints require a JWT Bearer token in the Authorization header.
GET /api/productos
Returns all active products with full admin data, including purchase price and supplier name. Auth:ADMIN
Response 200 OK
Returns an array of ProductoDTO objects.
Internal product identifier.
Unique stock-keeping unit code. Maximum 50 characters.
EAN / barcode string. Maximum 100 characters. May be
null if not assigned.Display name of the product. Maximum 200 characters.
Long-form product description (plain text). May be
null.Retail selling price. Precision
12,2. Never negative.Current units in stock.
Minimum stock threshold. Products at or below this value appear in
/stock-critico.true if the product is active; false if soft-deleted.URL to the product image. Maximum 500 characters. May be
null.Display name of the assigned category. May be
null.Display name of the assigned supplier. Admin-only field. May be
null.The
precio field maps to the precio column on the Producto entity. There is no separate precioCompra field in ProductoDTO; supplier cost data is accessed through the nombreProveedor association.GET /api/productos/{id}
Returns a single product by its internal ID. Auth:ADMIN
Path Parameters
Internal product identifier.
Response 200 OK
Returns a ProductoDTO. See GET /api/productos for field descriptions.
GET /api/productos/sku/{sku}
Looks up a product by its SKU code. Auth:ADMIN
Path Parameters
The SKU to search. Case-sensitive, unique across the catalog.
Response 200 OK
Returns a ProductoDTO.
GET /api/productos/barcode/{codigo}
Looks up a product by its barcode or EAN. Auth:ADMIN
Path Parameters
The barcode / EAN-13 string to search.
Response 200 OK
Returns a ProductoDTO.
GET /api/productos/stock-critico
Returns all products whosestockActual is at or below their stockMinimo. Use this endpoint to drive low-stock alerts or reorder workflows.
Auth: ADMIN
Response 200 OK
Returns an array of ProductoDTO. The array is empty when no products are in a critical stock state.
GET /api/productos/publico
Returns the public product catalog. This endpoint requires no authentication and is intended for the Tienda storefront. It omits cost price, supplier data, and internal stock thresholds. Auth: None (public)Response 200 OK
Returns an array of ProductoPublicoDTO.
Internal product identifier.
Product display name.
Retail selling price.
Current units available.
Product image URL. May be
null.Category display name. May be
null.GET /api/productos/empleado
Returns all active products without cost price or supplier data. Designed for POS terminal use where employees need pricing and stock but must not see purchasing cost. Auth:EMPLEADO
Response 200 OK
Returns an array of ProductoEmpleadoDTO.
Internal product identifier.
Unique SKU code.
Barcode / EAN string. May be
null.Product display name.
Long-form description. May be
null.Retail selling price. Cost price is intentionally excluded.
Current units in stock.
Minimum stock threshold.
Product image URL. May be
null.Category display name. May be
null.GET /api/productos/empleado/sku/{sku}
Looks up a single product by SKU for an authenticated employee. Auth:EMPLEADO
Path Parameters
The SKU to search.
Response 200 OK
Returns a ProductoEmpleadoDTO. See GET /api/productos/empleado for field descriptions.
GET /api/productos/empleado/barcode/{codigo}
Looks up a single product by barcode for an authenticated employee. Useful for scanning workflows at the POS terminal. Auth:EMPLEADO
Path Parameters
The barcode / EAN to search.
Response 200 OK
Returns a ProductoEmpleadoDTO.
POST /api/productos
Creates a new product in the catalog. Auth:ADMIN
Request Body
Unique SKU code. Maximum 50 characters. Must not already exist in the catalog.
Product display name. Maximum 200 characters.
Retail selling price. Must be
≥ 0.00.Barcode / EAN string. Maximum 100 characters. Optional.
Long-form product description. Optional.
Supplier purchase cost. Optional; stored but not exposed to non-admin roles.
Minimum stock alert threshold. Defaults to
0 if omitted.URL of the product image. Optional.
ID of an existing category. Optional.
ID of an existing supplier. Optional.
Response 201 Created
Returns the newly created ProductoDTO.
PUT /api/productos/{id}
Updates an existing product. Only the fields included in the request body are changed; omitted fields retain their current values. Auth:ADMIN
Path Parameters
Internal product identifier.
Request Body
New display name. Maximum 200 characters.
New retail selling price. Must be
≥ 0.00 if provided.New minimum stock threshold.
New product image URL. Maximum 500 characters.
New barcode / EAN. Maximum 100 characters.
Response 200 OK
Returns the updated ProductoDTO.
DELETE /api/productos/{id}
Soft-deletes (deactivates) a product by settingactivo = false. The product record and all associated stock movement history are preserved in the database and can be restored by an admin at the database level.
Auth: ADMIN
Path Parameters
Internal product identifier.