userBuyerListsUpdate Mutation
Description
Updates a buyer's customer list memberships. Replaces the buyer's current list memberships with the provided list references. Buyers are removed from lists not included in the new list references, and added to new lists.
mutation userBuyerListsUpdate($userRef: ID!, $listRefs: [ID!]!) {
userBuyerListsUpdate(userRef: $userRef, listRefs: $listRefs) {
_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": "55cbfd31d76374e2de6dc61a",
"listRefs": [
"3d385a36ae8d8346fbb8d84f"
]
}
Response
{
"userBuyerListsUpdate": {
"_id": "b03c01bf50afe80ddc292c48",
"created": 1732691014233,
"updated": 1712382017283,
"lastLogin": 1730458237206,
"active": true,
"birthdate": 1721391112193,
"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": "d51c3bfff4dadfd66c086b8d",
"ref": "e0ded1cff65b9eee419fea25",
"added": 1729745938038,
"lastModified": 1729039386325
}
],
"accountCreated": true,
"addresses": [
{
"_id": "9cafacf7d443a3986a9dfa26",
"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": 1750894702547,
"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 list memberships for. |
listRefs | [ID!]! | List of customer list reference IDs to set as the buyer's list memberships. |