ZapytanieBetaQuery.operations
Operations of the orders' elements, one page at a time, with the total count: the shop floor's work by machine, by where production stands (with the production scope) and by what changed since your last sync (updatedFrom). Without sort: by the completion date of the order, nearest first, then by identifier.
| Wymagany zakres | orders:read |
|---|---|
| Dostępne od | Prynt 0.33.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | OperationFilterInput | Conditions the operations must meet; without it every operation is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | OperationSortInput | Order of the list; without it by the completion date of the order, nearest first, then by identifier. |
Zwraca
Przykład
query MachineView($machineId: ID!, $page: Int!) { operations( filter: { machineId: $machineId orderArchived: false orderStatusIn: [CREATED, ACCEPTED, IN_PRODUCTION] productionStatusIn: [NOT_STARTED, PAUSED, IN_PROGRESS] } sort: { field: ORDER_COMPLETION_DATE, direction: ASC } pagination: { page: $page, pageSize: 40 } ) { totalCount pageInfo { hasNextPage } items { id description quantity quantityCompleted unit sequenceOrder productionStatus updatedAt element { name } product { id name packingDate } order { displayId status completionDate isDeadline clientId } previousOperation { id description machineId productionStatus } } }}{ "machineId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b", "page": 1}curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \ -H "Authorization: Bearer $PRYNT_API_KEY" \ -H "Content-Type: application/json" \ --data-binary @- <<'JSON'{ "query": "query MachineView($machineId: ID!, $page: Int!) {\n operations(\n filter: {\n machineId: $machineId\n orderArchived: false\n orderStatusIn: [CREATED, ACCEPTED, IN_PRODUCTION]\n productionStatusIn: [NOT_STARTED, PAUSED, IN_PROGRESS]\n }\n sort: { field: ORDER_COMPLETION_DATE, direction: ASC }\n pagination: { page: $page, pageSize: 40 }\n ) {\n totalCount\n pageInfo {\n hasNextPage\n }\n items {\n id\n description\n quantity\n quantityCompleted\n unit\n sequenceOrder\n productionStatus\n updatedAt\n element {\n name\n }\n product {\n id\n name\n packingDate\n }\n order {\n displayId\n status\n completionDate\n isDeadline\n clientId\n }\n previousOperation {\n id\n description\n machineId\n productionStatus\n }\n }\n }\n}", "variables": { "machineId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b", "page": 1 }}JSON{ "data": { "operations": { "totalCount": 2, "pageInfo": { "hasNextPage": false }, "items": [ { "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d02", "description": "Foliowanie mat 1+0", "quantity": 2500, "quantityCompleted": 1000, "unit": "SHEETS", "sequenceOrder": 1, "productionStatus": "PAUSED", "updatedAt": "2026-10-06T11:20:00.000Z", "element": { "name": "Okładka" }, "product": { "id": "6d7e8f9a-0b1c-4d2e-8f3a-4b5c6d7e8f01", "name": "Katalog A4", "packingDate": "2026-10-08T22:00:00.000Z" }, "order": { "displayId": "1084/2026", "status": "IN_PRODUCTION", "completionDate": "2026-10-09T14:00:00.000Z", "isDeadline": true, "clientId": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f" }, "previousOperation": { "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d01", "description": "Druk 4+4", "machineId": "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a", "productionStatus": "COMPLETED" } }, { "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d12", "description": "Foliowanie błysk 1+1", "quantity": 4000, "quantityCompleted": 0, "unit": "SHEETS", "sequenceOrder": 2, "productionStatus": "NOT_STARTED", "updatedAt": "2026-10-05T15:02:00.000Z", "element": { "name": "Okładka" }, "product": { "id": "6d7e8f9a-0b1c-4d2e-8f3a-4b5c6d7e8f02", "name": "Teczka ofertowa", "packingDate": null }, "order": { "displayId": "1091/2026", "status": "ACCEPTED", "completionDate": "2026-10-14T14:00:00.000Z", "isDeadline": false, "clientId": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e70" }, "previousOperation": { "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d11", "description": "Druk 4+0", "machineId": "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a", "productionStatus": "IN_PROGRESS" } } ] } }}