MutacjaBetaMutation.receiveFoil
Receives foil into stock outside purchase orders (for a delivery ordered in Prynt use receivePurchaseOrder): books a movement — with the price, supplier and delivery document given, kept on it as they were — and raises the stock in rolls. The price, currency and supplier on the foil card do not change. Not idempotent: retry with Idempotency-Key (one key per receipt written, not per delivery document: one document often holds several lines of one material). Answers with the foil after the receipt.
| Wymagany zakres | warehouse:write |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
| Ponawianie | Wysyłaj nagłówek Idempotency-Key, żeby ponowienie nie wykonało zapisu drugi raz. Zapisy i idempotencja |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
idwymagane | ID! | Identifier of the foil. |
inputwymagane | ReceiveFoilInput! | The rolls received. |
Zwraca
Foil!
Przykład
mutation ReceiveFoil($id: ID!, $input: ReceiveFoilInput!) { receiveFoil(id: $id, input: $input) { id numberOfRolls }}{ "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b03", "input": { "rollsToAdd": 4, "unitPrice": 1.85, "priceUnit": "m", "supplierId": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b06", "deliveredAt": "2026-10-24T00:00:00.000Z", "documentNumber": "WZ 78/2026" }}IDEMPOTENCY_KEY=$(uuidgen) # ponawiaj z tym samym kluczem
curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \ -H "Authorization: Bearer $PRYNT_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $IDEMPOTENCY_KEY" \ --data-binary @- <<'JSON'{ "query": "mutation ReceiveFoil($id: ID!, $input: ReceiveFoilInput!) {\n receiveFoil(id: $id, input: $input) {\n id\n numberOfRolls\n }\n}", "variables": { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b03", "input": { "rollsToAdd": 4, "unitPrice": 1.85, "priceUnit": "m", "supplierId": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b06", "deliveredAt": "2026-10-24T00:00:00.000Z", "documentNumber": "WZ 78/2026" } }}JSON{ "data": { "receiveFoil": { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b03", "numberOfRolls": 6.56 } }}