Skip to main content

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": "6fc092f3b2e5661e223c613d",
"pagination": {
"page": 1,
"limit": 20,
"sort": "sort",
"order": 42
},
"page": 1,
"perPage": 42,
"term": "term"
}

Response

{
"users": {
"users": [
{
"_id": "a99446a490ca7e1713702efe",
"created": 1732734808533,
"updated": 1706342767456,
"lastLogin": 1725796735021,
"active": true,
"birthdate": 1736729803755,
"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

NameTypeDescription
listRefIDReference ID of a customer list to filter buyers by. If provided, only buyers who are members of this list are returned.
paginationPaginationInputPagination input with page, limit, sort, and order parameters.
pageIntThe requested page number. Defaults to 1 if not specified.
perPageIntNumber 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.
termStringSearch term to filter buyers by. Performs a case-insensitive search on email, first name, last name, telephone, and search field.

Returns

UsersConnection!