# findContactDataProblems

Contact data problems in ONE call, never contact by contact: EMAIL_NOT_LOWERCASE, NAME_EMPTY, NAME_ONE_WORD (a first or last name missing; which is unknown), PHONE_NOT_NORMALIZED (not the 10-digit form phones are stored in; well-formed numbers are shown formatted, never stored so). Each: count of contacts you see, a sample (sampleSize ≤25) with the bad value, truncated. Pass problem for up to 500 of its contact ids past offset, what lowercaseContactEmails takes.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "findContactDataProblems", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `problem`: `ContactDataProblem` (one of `EMAIL_NOT_LOWERCASE`, `NAME_EMPTY`, `NAME_ONE_WORD`, `PHONE_NOT_NORMALIZED`). A data-shape problem the contact hygiene read groups contacts by. EMAIL_NOT_LOWERCASE: An email holding a capital letter. NAME_EMPTY: No name at all. NAME_ONE_WORD: A one-word name: a first or a last name is missing (the name is one field, so which is not known). PHONE_NOT_NORMALIZED: A stored phone that is not the 10-digit US form every phone write normalizes to.
- `sampleSize`: `Int`
- `offset`: `Int` (default `0`)

## Response (data, an example)

```json
{
  "contactQuery": {
    "contactDataProblems": {
      "problems": [
        {
          "problem": "EMAIL_NOT_LOWERCASE",
          "count": 0,
          "truncated": true,
          "contacts": [
            {
              "id": "<ID>",
              "name": "…",
              "value": "…"
            }
          ]
        }
      ]
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "findContactDataProblems",
    "variables": {}
  }'
```
