MutacjaBetaMutation.updateAdditionalCost
Changes an additional cost of an order; refused for an archived order. Sending the same values again changes nothing, not even Order.updatedAt.
| Wymagany zakres | orders: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 |
|---|---|---|
idwymagane | ID! | Identifier of the additional cost to change. |
inputwymagane | UpdateAdditionalCostInput! | What to change. |
Zwraca
Przykład
mutation ChangeCost($id: ID!, $input: UpdateAdditionalCostInput!) { updateAdditionalCost(id: $id, input: $input) { id name isClientVisible }}{ "id": "d07c93b4-6f81-4ca3-9ecf-4a5b6c7d8e96", "input": { "amount": 100, "isClientVisible": false }}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 ChangeCost($id: ID!, $input: UpdateAdditionalCostInput!) {\n updateAdditionalCost(id: $id, input: $input) {\n id\n name\n isClientVisible\n }\n}", "variables": { "id": "d07c93b4-6f81-4ca3-9ecf-4a5b6c7d8e96", "input": { "amount": 100, "isClientVisible": false } }}JSON{ "data": { "updateAdditionalCost": { "id": "d07c93b4-6f81-4ca3-9ecf-4a5b6c7d8e96", "name": "Ekspresowa realizacja", "isClientVisible": false } }}