# getColleague

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| GET | https://staging-api.thomas.co/v1/colleagues/{id} |

| Field | Value |
|---|---|
| operationId | getColleague |
| method | GET |
| server | https://staging-api.thomas.co |
| path | /v1/colleagues/{id} |
| tags | `Colleagues & Profiles` |
| summary | Get colleague profile detail |
| badges | `{"name":"Viewer"}`, `{"name":"Admin"}`, `{"name":"Owner"}`, `{"name":"Partner scope: users:r"}` |
| scopes | `users:r` |

## Description

Returns a full profile with identity, membership history, manager links, audit summary, and enrichment placeholders. personalEmail is included for Admin/Owner roles or when the caller reads their own record; a non-self Viewer gets null. A person reading another candidate must be an Admin or Owner, even when the candidate is not confidential. Other readers receive the same not-found response as a missing profile. Candidate self-access is preserved, and Admin reads still require access-circle membership for confidential candidates. **`{id}` is interpreted by CALLER KIND, never by the value's shape.** For a human caller it is the Thomas colleague id (a UUID) and the response is the profile detail above. For a Partner API client that is the tenant's active `users` source of record it is that client's OWN opaque `partnerReference`, resolved only within its own tenant/API-client namespace, and the response is the partner employee projection. The same opaque value under another API client or another tenant is a different colleague and is never returned. Partner references are opaque and may legitimately be UUID-shaped; that is why the caller kind, and not the value, selects the interpretation. **`view`** shapes the human response only: omit it or send `full` for the response above. Send `identity` when you need only who the person is — `behaviourProfile` and `personalisedInsights` are then `null` and are not fetched, and every other field is unchanged. A response that carries no behaviour content records no profile view. A Partner API client's projection is unaffected by a valid `view`; an unrecognised value is a 400 for every caller.

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| id | path | true | string |  |
| view | query | false | string | `full` (default): the complete profile detail. `identity`: the same detail with `behaviourProfile` and `personalisedInsights` returned as null and not fetched. |
| Thomas-Tenant-Id | header | true | string:uuid | Required for API clients: the Tenant this call acts in. Send exactly one. Signed-in users don't send it — their Tenant comes from their session. The header only selects the Tenant; your Grant for it decides access, and is checked on every call. |
| Thomas-On-Behalf-Of | header | false | string | Optional for a Partner API client on this operation. Send it to act on behalf of one named person: thomas:<companyIndividualId> or partner:<partnerReference>. The call is then authorised as that person, within that person's access circles and the scopes your Grant holds. Omit it to call as your API client. A signed-in person never sends it. |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | Full colleague profile detail for a human caller; the partner employee projection for a Partner API client reading by its own reference | #/components/schemas/CompanyIndividualDetailResponseDto, #/components/schemas/PartnerEmployeeResponseDto |
| 400 | Invalid UUID format for id parameter, malformed partner reference, or an unknown `view` value. Also returned when the Thomas-On-Behalf-Of header is repeated or malformed. | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | For an API client: not the tenant's active `users` source of record (AUTH_SOURCE_OF_RECORD_REQUIRED), no active Grant carrying `users:r` on this tenant (AUTH_TENANT_NOT_GRANTED), or a caller whose kind this operation could not resolve. An API client is refused before any tenant data is read or changed when its service membership is absent (AUTH_SERVICE_MEMBERSHIP_MISSING), or when the operation is not published to its principal kind (PRINCIPAL_TYPE_NOT_ALLOWED). An API client holds no organisation role, so AUTH_INSUFFICIENT_ROLE never applies to it. | #/components/schemas/ApiErrorResponseDto |
| 404 | Colleague not found (IDENTITY_COMPANY_INDIVIDUAL_NOT_FOUND), or no colleague in this tenant/API-client namespace (PARTNER_EMPLOYEE_NOT_FOUND). Also returned when the person named in Thomas-On-Behalf-Of is unavailable. | #/components/schemas/ApiErrorResponseDto |
| 429 | Rate limit exceeded. | #/components/schemas/ApiErrorResponseDto |

### Response 429 headers

| Name | Description | Schema |
|---|---|---|
| Retry-After | Seconds until the rate-limit block expires before retrying. | {"type":"integer","minimum":0} |
| RateLimit-Limit | Configured request limit for the active rate-limit window. | {"type":"integer"} |
| RateLimit-Remaining | Requests remaining in the active rate-limit window; zero when blocked. | {"type":"integer"} |
| RateLimit-Reset | Seconds until the rate-limit block expires. | {"type":"integer","minimum":0} |

## Artifact Examples

### Response 400 example — AUTH_TENANT_CONTEXT_INVALID

```json
{
  "statusCode": 400,
  "message": "Exactly one valid Thomas-On-Behalf-Of header is required",
  "error": "AUTH_TENANT_CONTEXT_INVALID"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 403 example — AUTH_SOURCE_OF_RECORD_REQUIRED

```json
{
  "statusCode": 403,
  "message": "API client is not the source of record for this data domain in this tenant",
  "error": "AUTH_SOURCE_OF_RECORD_REQUIRED"
}
```

### Response 403 example — AUTH_TENANT_NOT_GRANTED

```json
{
  "statusCode": 403,
  "message": "API client is not granted access to this tenant",
  "error": "AUTH_TENANT_NOT_GRANTED"
}
```

### Response 403 example — AUTH_SERVICE_MEMBERSHIP_MISSING

```json
{
  "statusCode": 403,
  "message": "API client has no active service membership in this tenant",
  "error": "AUTH_SERVICE_MEMBERSHIP_MISSING"
}
```

### Response 403 example — PRINCIPAL_TYPE_NOT_ALLOWED

```json
{
  "statusCode": 403,
  "message": "API client is not permitted to call this operation",
  "error": "PRINCIPAL_TYPE_NOT_ALLOWED"
}
```

### Response 404 example — AUTH_ON_BEHALF_PERSON_NOT_AVAILABLE

```json
{
  "statusCode": 404,
  "message": "The named person is not available for this operation",
  "error": "AUTH_ON_BEHALF_PERSON_NOT_AVAILABLE"
}
```

### Response 429 example

```json
{
  "statusCode": 429,
  "message": "ThrottlerException: Too Many Requests",
  "error": "HTTP_TOO_MANY_REQUESTS"
}
```
