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

Variables

{
"term": "term"
}

Response

{
"userSearch": [
{
"_id": "2b500292f7d4f3b69a1266dc",
"created": 1719531142670,
"updated": 1755317050892,
"lastLogin": 1758792414580,
"active": true,
"birthdate": 1713747673949,
"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": "15e2a01aeab151600e186dc2",
"ref": "1404f032ae22b6eae61537d4",
"added": 1732444502284,
"lastModified": 1763563278466
}
],
"accountCreated": true,
"addresses": [
{
"_id": "b3f63f5d7ae72970b4cc335d",
"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": 1720716479613,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 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!]!