Skip to content

List Customers (Datagrid)

Returns the paginated, filterable customer list that backs the admin Customers datagrid. The customer's group is returned as a nested group object (id / code / name). The detail-only counters (totalOrders, totalAddresses, totalAmountSpent) resolve only on the single-customer query and are omitted here.

Arguments

All arguments are optional and combine in a single query — filter, sort and paginate together.

Pagination

ArgumentDescription
firstNumber of records to return.
afterCursor to fetch the page after (from pageInfo.endCursor).

Filters

Each filter narrows the result; supplying more than one combines with logical AND. They mirror the admin Customers datagrid filters.

ArgumentTypeMatch
nameStringPartial first/last name.
emailStringPartial email.
phoneStringPartial phone.
customer_group_idIntExact group id.
statusInt0 or 1.
channel_idIntExact channel id.
date_of_birth_fromStringDate of birth ≥ (e.g. "1980-01-01").
date_of_birth_toStringDate of birth ≤.
created_at_fromStringRegistered on ≥.
created_at_toStringRegistered on ≤.

Sorting

ArgumentTypeValues
sortStringid (default), email, first_name
orderStringasc, desc (default desc)

TIP

See the Customers overview for how the menu works.

All admin operations require an admin Bearer token — see Authentication.

Released under the MIT License.