Przejdź do głównej zawartości

operation

Dla: Programista

ZapytanieBetaQuery.operation

One operation of an order by its identifier; null when there is none.

Wymagany zakresorders:read
Dostępne odPrynt 0.33.0
StabilnośćBeta (co to znaczy)

Argumenty

NazwaTypOpis
idwymaganeID!

Identifier of the operation.

Zwraca

Operation

Przykład

Zapytanie
query Operation($id: ID!) {
operation(id: $id) {
id
description
machineId
quantity
quantityCompleted
unit
productionStatus
readyToStart
previousOperationId
element {
name
product {
name
order {
displayId
}
}
}
}
}
Zmienne
{
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d02"
}
Wywołanie (curl)
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 Operation($id: ID!) {\n operation(id: $id) {\n id\n description\n machineId\n quantity\n quantityCompleted\n unit\n productionStatus\n readyToStart\n previousOperationId\n element {\n name\n product {\n name\n order {\n displayId\n }\n }\n }\n }\n}",
"variables": {
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d02"
}
}
JSON
Odpowiedź
{
"data": {
"operation": {
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d02",
"description": "Foliowanie mat 1+0",
"machineId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
"quantity": 2500,
"quantityCompleted": 1000,
"unit": "SHEETS",
"productionStatus": "PAUSED",
"readyToStart": true,
"previousOperationId": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d01",
"element": {
"name": "Okładka",
"product": {
"name": "Katalog A4",
"order": {
"displayId": "1084/2026"
}
}
}
}
}
}