Listar conteos de inventario
POST /api/inventory/list-inventory-counts
Descripción
Devuelve el historial paginado de conteos por bodega.
Detalles
Retorna los conteos de inventario con su bodega, estado, quién lo abrió y lo cerró, cuándo y cuántos insumos se contaron. No incluye sobrante ni faltante: esas cifras solo salen en el reporte de cada conteo. Acepta filtro por bodega y por estado.
Permisos requeridos
inventory.count.close
inventory.count.totals.view
El usuario solo necesita uno de los permisos listados.
Request
| Nombre | Tipo | Requerido | Reglas |
|---|---|---|---|
| storageLocationId | int | No |
min_value:1
|
| status | string | No |
enum:open,closed,cancelled
|
Paginación
| defaultLimit | 50 |
| maxLimit | 100 |
| defaultDir | desc |
| withTotal | true |
| allowedSorts | [openedAt, closedAt] |
Ejemplo de request
curl -X POST https://restofy.pro/api/inventory/list-inventory-counts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>"
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-11-02T19:00:57Z
HTTP 200
Request
{
"storageLocationId": 14
}
Response
{
"success": true,
"message": "Operación realizada correctamente",
"data": {
"inventoryCounts": [
{
"inventoryCountUuid": "1f858204-ead0-4c4c-b562-7cf5feee0dd3",
"storageLocationId": 14,
"locationName": "Bodega conteo 6ae8d7b9d4401",
"status": "closed",
"openedAt": "2026-11-02T18:34:35.000Z",
"closedAt": "2026-11-02T18:34:35.000Z",
"openedByName": "App Testing",
"closedByName": "App Testing",
"countedCount": 1
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 1,
"totalPages": 1,
"hasNext": false,
"hasPrev": false
}
}
}