# searchAll

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

One search over every kind of record you may read — a word, a code or an id finds products, vendors, contacts and more, grouped by kind.

ONE search over EVERY kind of record you may read — a word, a code or an id finds products, vendors, contacts and more, grouped by kind. Requires authentication; scoped server-side to the principal's rootId (never cross-tenant). The prefix is ONE word (a space inside refuses VALIDATION/INVALID — the face sends one word at a time; slice 3's grammar compiles phrases) of at least 2 folded characters (a one-character prefix is refused, never searched) and at most the caption length; it folds case- and diacritic-insensitively and matches the START of a caption word, the sysId or the record's own code. THE LENS: only the kinds whose plural read your roles permit ever answer — a hit of any other kind is dropped before the page is cut (a cashier never sees a collaborator's name in a suggestion). first defaults to 20 and clamps to 50; more says rows remained. The variant's SKU is NOT here by the catalogue ruling — resolveIdentifier is its exact door.

## What happens

Reads only — changes nothing. Only the kinds your role can list ever answer; a variant’s barcode or SKU is found through the identifier lookup instead.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Sales Associate
- Cashier
- An API key whose scope allows `api:searchAll`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `prefix` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `first` | [Int](/types/#scalars) | no | No further notes. |

## Returns

[SearchAllPage](/types/SearchAllPage/) `SearchAllPage!` — ONE typeahead page over every kind of record the caller may read — the hits grouped by type in the searchable-type order; more says rows remained beyond this page (a typeahead page is born bounded — no cursor; a face opens the full results elsewhere).

## Example request

```graphql
query ExampleSearchAll($prefix: String!, $first: Int) {
  searchAll(prefix: $prefix, first: $first) {
    more
  }
}
```

Variables:

```json
{
  "prefix": "<prefix>",
  "first": 1
}
```

## Example response

```json
{
  "data": {
    "searchAll": {
      "more": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
