MutacjaBetaMutation.updateClientAddress
Changes an address of a client: a field left out keeps its value, null clears an optional field. The same values sent again change nothing.
| Wymagany zakres | clients: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 |
|---|---|---|
addressIdwymagane | ID! | Identifier of the address to change. |
inputwymagane | UpdateClientAddressInput! | What to change. |
Zwraca
Przykład
mutation UpdateClientAddress($addressId: ID!, $input: UpdateClientAddressInput!) { updateClientAddress(addressId: $addressId, input: $input) { id street buildingNumber notes }}{ "addressId": "9f5b7d4e-0a6c-4b8d-8e1f-3a4b5c6d7e8f", "input": { "buildingNumber": "5", "notes": "Rampa nr 2, awizacja telefoniczna." }}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 UpdateClientAddress($addressId: ID!, $input: UpdateClientAddressInput!) {\n updateClientAddress(addressId: $addressId, input: $input) {\n id\n street\n buildingNumber\n notes\n }\n}", "variables": { "addressId": "9f5b7d4e-0a6c-4b8d-8e1f-3a4b5c6d7e8f", "input": { "buildingNumber": "5", "notes": "Rampa nr 2, awizacja telefoniczna." } }}JSON{ "data": { "updateClientAddress": { "id": "9f5b7d4e-0a6c-4b8d-8e1f-3a4b5c6d7e8f", "street": "Składowa", "buildingNumber": "5", "notes": "Rampa nr 2, awizacja telefoniczna." } }}