# updateColleague

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

## Operation

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

| Field | Value |
|---|---|
| operationId | updateColleague |
| method | PATCH |
| server | https://api.thomas.co/v1 |
| path | /colleagues/{id} |
| tags | `People Administration` |
| summary | Edit a colleague profile with optional effective dating |
| badges | `{"name":"Admin"}`, `{"name":"Owner"}` |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| id | path | true | string |  |

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/EditColleagueDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | Profile updated successfully with full detail response | #/components/schemas/CompanyIndividualDetailResponseDto |
| 400 | Invalid UUID format or invalid payload | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Insufficient role — admin or owner required | #/components/schemas/ApiErrorResponseDto |
| 404 | Company-individual not found (IDENTITY_COMPANY_INDIVIDUAL_NOT_FOUND) | #/components/schemas/ApiErrorResponseDto |
| 422 | Invalid effective date (INVALID_EFFECTIVE_DATE) | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed (uuid is expected)",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

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

### Response 403 example

```json
{
  "statusCode": 403,
  "message": "Insufficient role privileges",
  "error": "AUTH_INSUFFICIENT_ROLE"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Colleague not found",
  "error": "IDENTITY_COMPANY_INDIVIDUAL_NOT_FOUND"
}
```

### Response 422 example

```json
{
  "statusCode": 422,
  "message": "Invalid effective date",
  "error": "INVALID_EFFECTIVE_DATE"
}
```
