MutacjaBetaMutation.updatePurchaseOrderStatus
Moves a purchase order to another status: DRAFT to SENT, SENT to CONFIRMED (or back), any status before RECEIVED to CANCELLED; any other move is refused. The current status again changes nothing, so a retry is safe. Answers with the order.
| Wymagany zakres | warehouse:write |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
| Ponawianie | Operacja idempotentna: ponowienie bez nagłówka Idempotency-Key jest bezpieczne. Zapisy i idempotencja |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
inputwymagane | UpdatePurchaseOrderStatusInput! | The order and its new status. |
Zwraca
Przykład
mutation SendPurchaseOrder($input: UpdatePurchaseOrderStatusInput!) { updatePurchaseOrderStatus(input: $input) { id status updatedAt }}{ "input": { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b07", "status": "SENT" }}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": "mutation SendPurchaseOrder($input: UpdatePurchaseOrderStatusInput!) {\n updatePurchaseOrderStatus(input: $input) {\n id\n status\n updatedAt\n }\n}", "variables": { "input": { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b07", "status": "SENT" } }}JSON{ "data": { "updatePurchaseOrderStatus": { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b07", "status": "SENT", "updatedAt": "2026-10-05T07:05:00.000Z" } }}