Consultar una merma
POST /api/inventory/get-waste
Descripción
Devuelve una merma con cada línea y su costo.
Detalles
Retorna la bodega, el motivo, las notas, el costo total y quién la registró. Cada línea trae el insumo o el plato, su cantidad y su costo. Si está anulada, trae quién la anuló y por qué.
Permisos requeridos
inventory.waste.create
Request
| Nombre | Tipo | Requerido | Reglas |
|---|---|---|---|
| wasteUuid | string | Sí |
min:36
max:36
|
Ejemplo de request
curl -X POST https://restofy.pro/api/inventory/get-waste \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-d '{
"wasteUuid": "string"
}'
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-11-02T19:00:57Z
HTTP 200
Request
{
"wasteUuid": "ae6c17ca-fbdc-4537-b75f-f76b9e91ae61"
}
Response
{
"success": true,
"message": "Operación realizada correctamente",
"data": {
"waste": {
"wasteId": 3,
"wasteUuid": "ae6c17ca-fbdc-4537-b75f-f76b9e91ae61",
"storageLocationId": 4,
"locationName": "Bodega Bebidas",
"wasteReasonId": 1,
"reasonName": "Vencido",
"notes": "Se venció en el cuarto frío",
"totalCostCents": 1000,
"statusCode": "completed",
"actorName": "App Testing",
"cancelledByName": null,
"cancelledAt": null,
"cancelReason": null,
"createdAt": "2026-11-02T18:34:43.000Z"
},
"lines": [
{
"wasteLineId": 3,
"inventoryItemId": 31,
"productId": null,
"name": "Insumo Test 6ae8d7c2297ff",
"lineType": "inventory_item",
"quantity": "100.0000",
"unitSymbol": "g",
"costCents": 1000
}
]
}
}