Skip to main content

userSearch Query

Description​

Searches for buyers by search term. Performs a case-insensitive search on email, first name, last name, telephone, and search field. Returns up to 92 matching buyers. If the search term is less than 2 characters, returns all buyers.

query userSearch($term: String!) {
userSearch(term: $term) {
_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​

{
"term": "term"
}

Response​

{
"userSearch": [
{
"_id": "7791328d13ecef8d108e4b0d",
"created": 1750871418270,
"updated": 1786560679933,
"lastLogin": 1752895097107,
"active": true,
"birthdate": 1759020909347,
"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": "e7cb6af39099efadcf0348c9",
"ref": "92e21daf9d32f80009bf9ee5",
"added": 1790543092383,
"lastModified": 1740322248474
}
],
"accountCreated": true,
"addresses": [
{
"_id": "1b7f9e45b8eac4ef0a839eac",
"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": 1776726861838,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"checkoutCount": 42,
"type": "example"
}
]
}

Arguments​

NameTypeDescription
termString!Search term to match against buyer information. Must be at least 2 characters for search to be performed.

Returns​

[Buyer!]!