Skip to main content

userBuyerUpdate Mutation

Description

Updates a buyer's information. You can update email, personal details, contact information, addresses, list memberships, notes, and birthdate. Only the fields provided in the input are updated; other fields remain unchanged. Email must be unique if changed.

mutation userBuyerUpdate(
$userRef: ID!
$userBuyerUpdateInput: UserBuyerUpdateInput!
) {
userBuyerUpdate(
userRef: $userRef
userBuyerUpdateInput: $userBuyerUpdateInput
) {
_id
created
updated
lastLogin
active
birthdate
firstName
lastName
email
name
path
telephone
organisation
taxNumber
lists {
_id
ref
added
lastModified
}
accountCreated
addresses {
_id
description
firstName
lastName
addressLine1
addressLine2
streetNumber
city
state
stateCode
postCode
alpha2
country
type
}
notes
verification {
status
token
code
date
hash
}
orderCount
orderTotal
creditNotesCount
wantsCount
vouchersCount
type
}
}

Variables

{
"userRef": "51e903ddff14d21646e03c4e",
"userBuyerUpdateInput": {
"email": "email@example.com",
"firstName": "John",
"lastName": "Doe",
"telephone": "telephone",
"organisation": "organisation",
"taxNumber": "taxNumber",
"lists": [
"c30c6b563943f1c648f45c42"
],
"addresses": [
{
"description": "A description",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": 42,
"city": "Montreal",
"state": "Quebec",
"postCode": "postCode",
"alpha2": "alpha2",
"country": "Canada",
"stateCode": "stateCode",
"type": "type",
"geoLoc": {
"type": "type",
"coordinates": [
30.7
]
}
}
],
"notes": "notes",
"birthdate": 1715000648398
}
}

Response

{
"userBuyerUpdate": {
"_id": "526e1369e086a4e4135e5c21",
"created": 1760051443005,
"updated": 1734937686535,
"lastLogin": 1718302448248,
"active": true,
"birthdate": 1751186143414,
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"lists": [
{
"_id": "2dff36f5ed501fa875e980a2",
"ref": "8ab3b9e0aa6afca58a6e5cb8",
"added": 1732248845593,
"lastModified": 1765534310571
}
],
"accountCreated": true,
"addresses": [
{
"_id": "ea8576cb2bf1b75dcf9b2d64",
"description": "example",
"firstName": "example",
"lastName": "example",
"addressLine1": "example",
"addressLine2": "example",
"streetNumber": 42,
"city": "example",
"state": "example",
"stateCode": "example",
"postCode": "example",
"alpha2": "example",
"country": "example",
"type": "example"
}
],
"notes": "example",
"verification": {
"status": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ",
"code": "example",
"date": 1756792764854,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"type": "example"
}
}

Arguments

NameTypeDescription
userRefID!Reference ID of the buyer to update.
userBuyerUpdateInputUserBuyerUpdateInput!Buyer update data including email, personal details, addresses, lists, and notes.

Returns

Buyer!