Historial de trabajos de impresión
POST /api/print-jobs/list-print-jobs
Descripción
Retorna el listado paginado de trabajos de impresión recientes del restaurante.
Detalles
Devuelve hasta los 100 trabajos de impresión más recientes con su impresora, estación y estado, del más nuevo al más antiguo, en páginas. Cada trabajo indica qué se imprimió (comanda, tirilla, código de acceso) y de qué salió, con el código de la orden o el número de la factura. Permite acotar por texto de impresora, estado, tipo de trabajo, impresora puntual y rango de fechas. No incluye el contenido del trabajo: ese se consulta aparte.
Permisos requeridos
settings.module
Request
| Nombre | Tipo | Requerido | Reglas |
|---|---|---|---|
| search | string | No |
max:100
|
| status | string | No |
max:20
|
| jobType | string | No |
max:30
|
| printerId | int | No |
min_value:1
|
| dateFrom | string | No |
max:30
|
| dateTo | string | No |
max:30
|
Paginación
| defaultLimit | 15 |
| maxLimit | 100 |
| allowedSorts | createdAt |
| defaultSort | createdAt |
| defaultDir | desc |
| withTotal | true |
Ejemplo de request
curl -X POST https://restofy.pro/api/print-jobs/list-print-jobs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-H "X-Tenant-Key: <tenantKey>"
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-09-08T16:35:34Z
HTTP 200
Request
{
"status": "pending",
"limit": 100
}
Response
{
"success": true,
"message": "Operación realizada correctamente",
"data": {
"printJobs": [
{
"printJobUuid": "a256074c-ab4a-11f1-b72d-f2569efa6eee",
"printerUuid": "41f66aae-fd93-489b-82ab-42ab7a2f93b9",
"printerName": "Comandera adm 6aa03915a9fd1",
"stationName": "Estacion adm 6aa039156f819",
"status": "pending",
"jobType": "test",
"referenceType": null,
"referenceId": null,
"referenceLabel": null,
"hasResponse": 0,
"createdAt": "2026-09-08T16:34:30.000Z",
"printedAt": null,
"updatedAt": "2026-09-08T16:34:30.000Z"
},
{
"printJobUuid": "a12ff996-ab4a-11f1-b72d-f2569efa6eee",
"printerUuid": "680709bc-5834-41cf-975c-1f3d43bd1c9f",
"printerName": "Comandera adm 6aa03913cc267",
"stationName": "Estacion adm 6aa0391399ed2",
"status": "pending",
"jobType": "test",
"referenceType": null,
"referenceId": null,
"referenceLabel": null,
"hasResponse": 0,
"createdAt": "2026-09-08T16:34:28.000Z",
"printedAt": null,
"updatedAt": "2026-09-08T16:34:28.000Z"
},
{
"printJobUuid": "a0a35b99-ab4a-11f1-b72d-f2569efa6eee",
"printerUuid": "ec0b2919-0f68-4f9f-908e-73e41a615690",
"printerName": "Comandera adm 6aa03912dae8b",
"stationName": "Estacion adm 6aa03912a8601",
"status": "pending",
"jobType": "test",
"referenceType": null,
"referenceId": null,
"referenceLabel": null,
"hasResponse": 0,
"createdAt": "2026-09-08T16:34:27.000Z",
"printedAt": null,
"updatedAt": "2026-09-08T16:34:27.000Z"
},
{
"printJobUuid": "a0114a6b-ab4a-11f1-b72d-f2569efa6eee",
"printerUuid": "252d92fd-f2b4-4f9c-95ce-0ec95d04c07c",
"printerName": "Comandera adm 6aa03911e1d54",
"stationName": "Estacion adm 6aa03911a6f3d",
"status": "pending",
"jobType": "test",
"referenceType": null,
"referenceId": null,
"referenceLabel": null,
"hasResponse": 0,
"createdAt": "2026-09-08T16:34:26.000Z",
"printedAt": null,
"updatedAt": "2026-09-08T16:34:26.000Z"
}
],
"pagination": {
"page": 1,
"limit": 100,
"total": 4,
"totalPages": 1,
"hasNext": false,
"hasPrev": false
}
}
}