> For the complete documentation index, see [llms.txt](https://docs.goodfit.io/goodfit-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goodfit.io/goodfit-docs/apis/enrichment-api/contacts/handling-several-matching-people.md).

# Handling several matching people

When you identify someone by name and company, more than one person at that company can fit. When none is clearly the best match, we hand the choice back to you rather than guessing.

We only match people who work at the company now. If everyone with that name has left, we list them so you can see who they were, but they aren’t added to your dataset. Sending `jobTitle` on the first request helps pick the right person, and a nickname (Bob for Robert) is only trusted on its own when the job title agrees.

#### The response

The request still completes. `found` is `false`, `reason` is `MULTIPLE_PEOPLE_FOUND`, and we return up to 10 people who fit:

```json
{
  "found": false,
  "reason": "MULTIPLE_PEOPLE_FOUND",
  "candidates": [
    {
      "candidateId": "7d9f2c1e-5b0a-4c3e-9f6d-2a1b3c4d5e6f",
      "firstName": "Sam",
      "lastName": "Rivers",
      "jobTitle": "Head of Data",
      "companyId": "abc-123",
      "companyName": "Acme Inc",
      "companyDomain": "acme.com",
      "isFormerEmployment": false,
      "linkedInUrl": "http://www.linkedin.com/in/some-handle"
    }
  ]
}
```

| Field                               | Notes                                    |
| ----------------------------------- | ---------------------------------------- |
| `candidateId`                       | Send this back as `selectedCandidateId`. |
| `firstName`, `lastName`, `jobTitle` | Who they are and their role.             |
| `companyName`, `companyDomain`      | The company they were matched at.        |
| `isFormerEmployment`                | `true` if they have left that company.   |
| `linkedInUrl`                       | Their LinkedIn profile.                  |

Nothing is added to your dataset and no contact credit is charged.

#### Picking from the request

Send the `candidateId` you picked to the original request:

```
POST /enrichment/enrich-contact/request/{requestId}/resolve
```

```json
{ "selectedCandidateId": "7d9f2c1e-5b0a-4c3e-9f6d-2a1b3c4d5e6f" }
```

This starts a new request for that person with your original options, and returns a new `requestId` to poll. The result’s `matchedBy` is `linkedInUrl`. An id we didn’t offer you, or someone who has left, is rejected with a `400`; a request that hasn’t finished or didn’t list any candidates gets a `409`.

#### Resubmitting with your choice

You can also resubmit the same identity with the `candidateId` of the person you mean as `identity.selectedCandidateId`. We resolve them through that profile, so the result's `matchedBy` is `linkedInUrl`. An id we didn't offer you is rejected with a `400`.

#### When only former staff match

If everyone who fits the name has left the company, `reason` is `FORMER_EMPLOYEE`. We still list them in `candidates`, with `isFormerEmployment: true`, so you can see who they were. Picking one is rejected with a `400`. Nothing is added to your dataset and no contact credit is charged.

If you know where they work now, submit them again with that company.
