The inventory API group covers three stock management workflows: direct goods receipt for immediate single-item additions without an approval step, the remito workflow for multi-item supplier deliveries that require admin confirmation before stock is updated, and manual adjustments for ad-hoc corrections backed by a full audit trail. All endpoints require a JWT Bearer token.Documentation 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.
POST /api/recepcion
Immediately increases the stock level of a single product. The movement is recorded inMovimientoStock and takes effect instantly — there is no approval step.
Auth: ADMIN or EMPLEADO
The empleadoId performing the receipt is extracted from the JWT; it does not need to be sent in the request body.
Request Body (RecepcionRequest)
ID of the product whose stock is being replenished.
Number of units received. Minimum
1.Optional free-text note about the receipt (e.g. delivery reference). Maximum 500 characters.
Optional ID of an existing remito to associate this movement with. Use when manually linking a direct receipt to a supplier remito record.
Response 201 Created
Returns a RecepcionResponse.
ID of the generated
MovimientoStock record.ID of the restocked product.
SKU of the restocked product.
Display name of the restocked product.
Units added to stock.
Stock level immediately before this receipt.
Stock level after this receipt (
stockAnterior + cantidadRecibida).Timestamp of the movement in ISO-8601 format.
POST /api/recepciones-remito
Creates a pending supplier delivery (remito). The remito captures header information — supplier, remito number, and notes — but does not update stock. An admin must approve the remito before stock levels change. Auth:ADMIN or EMPLEADO
The empleadoId who created the remito is extracted from the JWT automatically.
Request Body (RecepcionRemitoRequest)
ID of the supplier issuing the remito.
Supplier’s document number for this delivery. Maximum 100 characters. Used as a human-readable reference and deduplication key.
Optional free-text notes about the delivery. Maximum 500 characters.
Response 201 Created
Returns a RecepcionRemitoResponse. The estado field will be PENDIENTE.
After creating a remito header, add individual product lines by creating
RecepcionRequest records with recepcionRemitoId set to the new remito ID. Then submit the remito for admin approval via PATCH /api/recepciones-remito/{id}/confirmar.GET /api/recepciones-remito/mis-recepciones
Returns all remito receipts created by the authenticated user. BothADMIN and EMPLEADO callers see only their own records.
Auth: ADMIN or EMPLEADO
Response 200 OK
Returns an array of RecepcionRemitoResponse. See RecepcionRemitoResponse fields below.
GET /api/recepciones-remito/pendientes
Returns all remitos currently inPENDIENTE state, across all employees. Use this endpoint to build the admin approval queue.
Auth: ADMIN
Response 200 OK
Returns an array of RecepcionRemitoResponse where estado = PENDIENTE.
GET /api/recepciones-remito
Returns all remitos regardless of state (PENDIENTE, CONFIRMADO, or RECHAZADO).
Auth: ADMIN
Response 200 OK
Returns an array of RecepcionRemitoResponse.
GET /api/recepciones-remito/{id}
Returns the full details of a single remito, including its item list. Auth:ADMIN or EMPLEADO
Path Parameters
Internal remito identifier.
Response 200 OK
Returns a RecepcionRemitoResponse.
PATCH /api/recepciones-remito/{id}/confirmar
Confirms or rejects a pending remito. On confirmation (aprobar: true), all associated MovimientoStock records are applied and product stock levels are updated atomically. On rejection (aprobar: false), no stock change occurs.
Auth: ADMIN
Path Parameters
Internal remito identifier. Must currently be in
PENDIENTE state.Request Body (ConfirmarRemitoRequest)
true to confirm the remito and update stock; false to reject it. The resulting estado will be CONFIRMADO or RECHAZADO respectively.Optional admin notes explaining the decision (e.g. reason for rejection). Maximum 500 characters.
Response 200 OK
Returns the updated RecepcionRemitoResponse with the new estado and confirmadoAt timestamp.
RecepcionRemitoResponse Fields
Internal remito identifier.
ID of the associated supplier.
Display name of the supplier.
Supplier’s document number for this delivery.
Current approval state. One of
PENDIENTE, CONFIRMADO, RECHAZADO.Full name of the employee who created the remito.
Full name of the admin who confirmed or rejected the remito.
null while still pending.Employee notes recorded at creation time. May be
null.Admin notes recorded at confirmation / rejection time. May be
null.Timestamp when the remito was created.
Timestamp when the remito was confirmed or rejected.
null while still pending.Stock movement lines associated with this remito. Populated after individual
RecepcionRequest records are linked.POST /api/ajustes-stock
Manually increases or decreases the stock of any product. Every adjustment creates an immutableMovimientoStock audit record attributed to the calling admin.
Auth: ADMIN
Request Body (AjusteStockRequest)
ID of the product to adjust.
Units to add (positive integer) or remove (negative integer). For example,
10 adds ten units; -3 removes three units.Human-readable reason for the adjustment (e.g.
"Rotura en depósito", "Corrección inventario físico"). Maximum 500 characters.Response 201 Created
Returns an AjusteStockResponse.
ID of the created
MovimientoStock record.ID of the adjusted product.
SKU of the adjusted product.
Display name of the adjusted product.
The signed adjustment applied (
+ for addition, - for removal).Stock level before the adjustment.
Stock level after the adjustment.
Reason for the adjustment as supplied in the request.
Full name of the admin who performed the adjustment.
Timestamp of the adjustment in ISO-8601 format.
GET /api/ajustes-stock
Returns a paginated list of all manual stock adjustments, ordered from most recent to oldest. Auth:ADMIN
Query Parameters
Zero-based page number. Defaults to
0.Number of records per page. Defaults to
50.Response 200 OK
Returns a Spring Page<AjusteStockResponse> envelope.
Array of
AjusteStockResponse objects for the current page.Total number of adjustments across all pages.
Total number of pages given the requested
size.Current page number (zero-based).
Page size used for this response.
true if this is the first page.true if this is the last page.Reference: EstadoRecepcionEnum
| Value | Description |
|---|---|
PENDIENTE | Remito created and awaiting admin review |
CONFIRMADO | Remito approved; stock has been updated |
RECHAZADO | Remito rejected by admin; no stock change applied |