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": "27a8b8e5c8c067f720c5159c",
"created": 1758013064327,
"updated": 1763145369280,
"lastLogin": 1765347613915,
"active": true,
"birthdate": 1742059039139,
"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": "dffc2f90cb19bbd0380e2c1d",
"ref": "759c1cbaf021dff7dc47423e",
"added": 1774190395536,
"lastModified": 1736780436379
}
],
"accountCreated": true,
"addresses": [
{
"_id": "2689bb54388a600989a2828a",
"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": 1719625694944,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"checkoutCount": 42,
"type": "example"
}
]
}
Arguments
| Name | Type | Description |
|---|---|---|
term | String! | Search term to match against buyer information. Must be at least 2 characters for search to be performed. |
Returns
[Buyer!]!