Skip to main content

updateCustomer

Requires permission customers:customer:update.

Updates a customer. Needs the customers update permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation UpdateCustomer($updateCustomerInput: UpdateCustomerInput!) {
updateCustomer(updateCustomerInput: $updateCustomerInput) {
id
code
registrationNumber
name
customerTierName
displayName
addresses {
id
postalCode
contactName
type
createdAt
addressLine1
}
}
}

Variables:

{
"updateCustomerInput": {
"id": "id"
}
}

Response:

{
"data": {
"updateCustomer": {
"id": "id",
"code": "string",
"registrationNumber": "string",
"name": "string",
"customerTierName": "string",
"displayName": "string",
"addresses": [
{
"id": "id",
"postalCode": "string",
"contactName": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"addressLine1": "string"
}
]
}
}
}
updateCustomer(
updateCustomerInput: UpdateCustomerInput!
): Customer!

Arguments​

updateCustomer.updateCustomerInput ● UpdateCustomerInput! non-null input​

The ID of the customer and the fields to change.

Type​

Customer object​

A customer: a partner with the customer role.