List Customers (Datagrid)
Returns the paginated, filterable customer list that backs the admin Customers datagrid. The customer's group comes back as a nested group object.
The three counters — totalOrders, totalAddresses, and totalAmountSpent — do resolve on this listing, with real per-customer values, so there is no need to call the detail query per row just to show them. They arrive as strings ("13", "689.98"), so cast before doing arithmetic. Over REST the same three are omitted from listing rows entirely and appear only on the detail endpoint, which is the one place the two transports genuinely differ here.
The nested group node carries a routeless id (/api/admin_customer_group_refs/<id>) — not a queryable path. Read group { _id code name }, and use Customer Groups to work with the group itself.
Arguments
All arguments are optional and combine in a single query — filter, sort and paginate together.
Pagination
| Argument | Description |
|---|---|
first | Number of records to return. |
after | Cursor 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.
| Argument | Type | Match |
|---|---|---|
name | String | Partial first/last name. |
email | String | Partial email. |
phone | String | Partial phone. |
customer_group_id | Int | Exact group id. |
status | Int | 0 or 1. |
channel_id | Int | Exact channel id. |
date_of_birth_from | String | Date of birth ≥ (e.g. "1980-01-01"). |
date_of_birth_to | String | Date of birth ≤. |
created_at_from | String | Registered on ≥. |
created_at_to | String | Registered on ≤. |
Sorting
| Argument | Type | Values |
|---|---|---|
sort | String | id (default), email, first_name |
order | String | asc, desc (default desc) |
See the Customers overview for how the menu works.

