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": "c70b1089896a2ee85a911db8",
"created": 1741430311066,
"updated": 1733550061147,
"lastLogin": 1713861514887,
"active": true,
"birthdate": 1737655537377,
"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": "1ab9cc357b9b28017e6d8bc8",
"ref": "65f8cc3a2f8b02ef8764618d",
"added": 1741991398946,
"lastModified": 1709049567453
}
],
"accountCreated": true,
"addresses": [
{
"_id": "a39376c0e487a43669b6af18",
"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": 1721784184146,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 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!]!