REST /api/v1/peer-mentor-details 5 endpoints
GET /api/v1/peer-mentor-details/api/v1/peer-mentor-details

List aggregated mentor detail models for an organization

Public

Response Example

{
  "data": [
    {
      "mentor_id": "mentor_a1b2c3",
      "full_name": "Kari Nordmann",
      "org_id": "org_x9y8z7",
      "status": "active",
      "is_suppressed_from_public": false,
      "certification_expiry_date": "2026-11-15T00:00:00Z",
      "days_until_expiry": 234,
      "open_assignment_count": 2,
      "total_sessions_this_month": 8,
      "latest_activity_date": "2026-03-20T00:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 48
  }
}
GET /api/v1/peer-mentor-details/api/v1/peer-mentor-details/:id

Get full aggregated mentor detail (profile + certification + activity + assignments)

Public

Response Example

{
  "mentor_id": "mentor_a1b2c3",
  "full_name": "Kari Nordmann",
  "email": "kari.nordmann@frivillig.no",
  "org_id": "org_x9y8z7",
  "status": "active",
  "is_hlf": false,
  "is_paused": false,
  "is_suppressed_from_public": false,
  "certification": {
    "record_id": "cert_002def",
    "expiry_date": "2028-01-20T00:00:00Z",
    "days_until_expiry": 665,
    "is_within_warning_window": false,
    "course_code": "PM-ADVANCED-2026"
  },
  "activity_summary": {
    "period": "month",
    "total_activities": 12,
    "total_sessions": 8,
    "total_duration_minutes": 520,
    "unique_contacts_supported": 3
  },
  "active_assignments": [
    {
      "assignment_id": "assign_001aa",
      "contact_name": "Per Olsen",
      "assigned_date": "2025-11-01T00:00:00Z",
      "last_contact_date": "2026-03-20T00:00:00Z"
    },
    {
      "assignment_id": "assign_002bb",
      "contact_name": "Liv Svendsen",
      "assigned_date": "2026-01-15T00:00:00Z",
      "last_contact_date": "2026-03-18T00:00:00Z"
    }
  ],
  "open_assignment_count": 2
}
POST /api/v1/peer-mentor-details/api/v1/peer-mentor-details

Create mentor profile (delegates to peer-mentor-repository)

Public

Request Example

{
  "full_name": "Jon Eriksen",
  "email": "jon.eriksen@frivillig.no",
  "org_id": "org_x9y8z7",
  "certification_expiry_date": "2027-09-01T00:00:00Z"
}

Response Example

{
  "mentor_id": "mentor_j1k2l3",
  "full_name": "Jon Eriksen",
  "org_id": "org_x9y8z7",
  "status": "active",
  "created_at": "2026-03-26T10:00:00Z"
}
PUT /api/v1/peer-mentor-details/api/v1/peer-mentor-details/:id

Update mentor profile fields

Public

Request Example

{
  "full_name": "Kari Nordmann-Olsen",
  "email": "kari.updated@frivillig.no"
}

Response Example

{
  "mentor_id": "mentor_a1b2c3",
  "full_name": "Kari Nordmann-Olsen",
  "updated_at": "2026-03-26T10:30:00Z"
}
DELETE /api/v1/peer-mentor-details/api/v1/peer-mentor-details/:id

Remove mentor and cascade-close open assignments

Public

Response Example

{
  "deleted": true,
  "mentor_id": "mentor_a1b2c3",
  "assignments_closed": 2
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}