updateCustomerUser
Requires permission customers:customer_user:update.
Changes a customer user's name, role, order limit, approver setting or assigned addresses. The Owner role is always an approver with access to every address. Needs customers:customer_user:update.
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:
- GraphQL
- cURL
mutation UpdateCustomerUser($input: UpdateCustomerUserInput!) {
updateCustomerUser(input: $input) {
id
firstName
lastName
status
createdAt
approverScope
addresses {
id
type
isActive
isApprover
isAssigned
isBranch
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateCustomerUser($input: UpdateCustomerUserInput!) {\n updateCustomerUser(input: $input) {\n id\n firstName\n lastName\n status\n createdAt\n approverScope\n addresses {\n id\n type\n isActive\n isApprover\n isAssigned\n isBranch\n }\n }\n}",
"variables": {
"input": {
"userId": "id"
}
}
}
EOF
Variables:
{
"input": {
"userId": "id"
}
}
Response:
{
"data": {
"updateCustomerUser": {
"id": "id",
"firstName": "string",
"lastName": "string",
"status": "string",
"createdAt": "2025-01-15T00:00:00Z",
"approverScope": "string",
"addresses": [
{
"id": "id",
"type": "string",
"isActive": true,
"isApprover": true,
"isAssigned": true,
"isBranch": true
}
]
}
}
}
updateCustomerUser(
input: UpdateCustomerUserInput!
): PartnerCustomerUserDetail!
Arguments
updateCustomerUser.input ● UpdateCustomerUserInput! non-null input
The user and the fields to change.
Type
PartnerCustomerUserDetail object
Everything the account owner assigned to one buyer login, in one payload.