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
checkoutCount
type
}
}

Variables​

{
"userRef": "bc1f2a9ee804a27769796a42",
"userBuyerUpdateInput": {
"email": "email@example.com",
"firstName": "John",
"lastName": "Doe",
"telephone": "telephone",
"organisation": "organisation",
"taxNumber": "taxNumber",
"lists": [
"fef5d36578b6c2d6f8172807"
],
"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": 1756666729166
}
}

Response​

{
"userBuyerUpdate": {
"_id": "95467958e9bed188f8e9ccbe",
"created": 1765410969565,
"updated": 1732488620292,
"lastLogin": 1783646464443,
"active": true,
"birthdate": 1735001669623,
"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": "aac4f5c3dcabb8c95b7907d4",
"ref": "b7e5ee587da138a9991af0d9",
"added": 1778176728396,
"lastModified": 1762396740976
}
],
"accountCreated": true,
"addresses": [
{
"_id": "1b4bcf89fa54b53009e47992",
"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": 1789315738102,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"checkoutCount": 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!