getCustomers
List customers (users and companies) in the authenticated network, or find them by name. To find a customer the user names, pass only query (the name, email, phone number or company as written) before listing anything: it searches people and companies, members and former customers, at every location, and returns the 10 best matches first. Omit locationRef to list customers across all locations, or provide it to scope to one location. Call getLocations to list locations, or getLocation to fetch one by locationId. Filter by type and membershipType, and sort with order.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getCustomers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Filter by customer type. Defaults to both when omitted. Must be a single value when order is createDate. Comma-separated, one or more of: user, company. | |
| limit | No | Maximum number of customers per page. Defaults to 100 when omitted or invalid, or to 10 matches with `query`; values above 100 are capped at 100. | |
| order | No | Sort order in `field:direction` format, e.g. `name:asc` or `createDate:desc`. Defaults to `name:asc` when omitted. | |
| query | No | Search customers by a person's name, surname and company, or a company's title, matching any part of a word in any order, tolerating misspellings and Cyrillic or Latin spellings, and by the beginning of their email or phone number. A query containing `@` is matched by email only. A query made only of digits, spaces, `+`, `-`, `.` and brackets is matched by email and by the digits of the phone number only; without a leading `+`, it also matches a phone number typed without the country code of the location's business address. Searches members and nonmembers of both types at every location unless type, membershipType or locationRef narrow it. Returns at most `limit` matches (10 by default), email matches first, then phone number matches, then the closest by spelling, in one page without `nextPageToken`; `order` does not apply. | |
| userRef | No | UUID of a user: lists the person customers of that user, one per location they belong to, in one page without `nextPageToken`. Companies have no user, so `type=company` returns none. The other filters still apply. | |
| locationRef | No | UUID of the location whose customers to list. Omit to list customers across every location of the network. | |
| nextPageToken | No | Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. | |
| membershipType | No | Filter by membership type: `member` for current members, `nonmember` for former members and customers who never subscribed. Defaults to `member` when omitted, or to both with `query`. Comma-separated, one or more of: member, nonmember. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customers | Yes | ||
| nextPageToken | No | Pass it back as nextPageToken, with the same filters, to get the next page. Absent on the last page. |