users Query
Description
Retrieves a paginated list of buyers with optional filtering by customer list and search term. You can request a specific page size, and it will be used if it does not exceed the server-enforced maximum. If your requested size exceeds the maximum, the server will enforce the maximum limit.
query users(
$listRef: ID
$pagination: PaginationInput
$page: Int
$perPage: Int
$term: String
) {
users(
listRef: $listRef
pagination: $pagination
page: $page
perPage: $perPage
term: $term
) {
users {
_id
created
updated
lastLogin
active
birthdate
firstName
lastName
email
name
path
telephone
organisation
taxNumber
accountCreated
notes
orderCount
orderTotal
creditNotesCount
wantsCount
vouchersCount
type
}
pagination {
limit
count
page
pages
hasMore
}
}
}
Variables
{
"listRef": "0ad0646f94477edc3ad0a828",
"pagination": {
"page": 1,
"limit": 20,
"sort": "sort",
"order": 42
},
"page": 1,
"perPage": 42,
"term": "term"
}
Response
{
"users": {
"users": [
{
"_id": "c4806338db0c6b6485862d8b",
"created": 1750504567192,
"updated": 1716933331819,
"lastLogin": 1718681592102,
"active": true,
"birthdate": 1707957034484,
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"accountCreated": true,
"notes": "example",
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"type": "example"
}
],
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"hasMore": true
}
}
}
Arguments
| Name | Type | Description |
|---|---|---|
listRef | ID | Reference ID of a customer list to filter buyers by. If provided, only buyers who are members of this list are returned. |
pagination | PaginationInput | Pagination input with page, limit, sort, and order parameters. |
page | Int | The requested page number. Defaults to 1 if not specified. |
perPage | Int | Number of buyers per page. You can request a specific page size, and it will be used if it does not exceed the server-enforced maximum. If your requested size exceeds the maximum, the server will enforce the maximum limit. |
term | String | Search term to filter buyers by. Performs a case-insensitive search on email, first name, last name, telephone, and search field. |