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": "e5895c171a6cff9cfeb2c6a7",
"userBuyerUpdateInput": {
"email": "email@example.com",
"firstName": "John",
"lastName": "Doe",
"telephone": "telephone",
"organisation": "organisation",
"taxNumber": "taxNumber",
"lists": [
"a1309ea67d438c3eeddc02d0"
],
"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": 1727099546950
}
}
Response
{
"userBuyerUpdate": {
"_id": "098d9c626e25256476e42ff5",
"created": 1764262311866,
"updated": 1724142364696,
"lastLogin": 1758789106708,
"active": true,
"birthdate": 1757524323201,
"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": "0b3ac8b41532d7e55b266423",
"ref": "b2fc5636569c4f7726b971b6",
"added": 1764263152611,
"lastModified": 1748818617684
}
],
"accountCreated": true,
"addresses": [
{
"_id": "b91f85cbcb6bfa58610acfa9",
"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": 1727115476136,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"type": "example"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
userRef | ID! | Reference ID of the buyer to update. |
userBuyerUpdateInput | UserBuyerUpdateInput! | Buyer update data including email, personal details, addresses, lists, and notes. |