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": "823c2dcd00cd70b81702b081",
"userBuyerUpdateInput": {
"email": "email@example.com",
"firstName": "John",
"lastName": "Doe",
"telephone": "telephone",
"organisation": "organisation",
"taxNumber": "taxNumber",
"lists": [
"fb17ba441e0df248dd260846"
],
"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": 1751724531782
}
}

Response​

{
"userBuyerUpdate": {
"_id": "9b45c11d0d828e2e78be7769",
"created": 1768096313549,
"updated": 1771927003545,
"lastLogin": 1739653876789,
"active": true,
"birthdate": 1768456692474,
"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": "82cced67d1da47e723ea5982",
"ref": "71bc15e060b4ce394e00ae30",
"added": 1754745882533,
"lastModified": 1777029544656
}
],
"accountCreated": true,
"addresses": [
{
"_id": "09a318a180365f8d3de94e54",
"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": 1733098189089,
"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!