REST /api/v1/duplicate-checks 6 endpoints
GET /api/v1/duplicate-checks/api/v1/duplicate-checks

List duplicate check records for audit purposes

Public

Response Example

{
  "data": [
    {
      "check_id": "dc-20260325-001",
      "mentor_id": "mentor-042",
      "activity_type_id": "group-session",
      "check_date": "2026-03-24T10:00:00Z",
      "is_duplicate": true,
      "conflicting_activity_id": "pact-20260324-008",
      "checked_at": "2026-03-25T08:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 5
  }
}
GET /api/v1/duplicate-checks/api/v1/duplicate-checks/:id

Get full duplicate details for a specific activity ID

Public

Response Example

{
  "activity_id": "pact-20260324-008",
  "mentor_id": "mentor-042",
  "mentor_name": "Sam Rivera",
  "activity_type_id": "group-session",
  "activity_date": "2026-03-24T10:00:00Z",
  "duplicate_of": "pact-20260324-003",
  "duplicate_type": "exact_duplicate",
  "registered_by": "coord-007",
  "registered_at": "2026-03-24T09:45:00Z",
  "original_registered_by": "mentor-042",
  "original_registered_at": "2026-03-24T08:30:00Z"
}
POST /api/v1/duplicate-checks/api/v1/duplicate-checks

Check whether a specific mentor-date-activity combination is a duplicate

Public

Request Example

{
  "mentor_id": "mentor-042",
  "date": "2026-03-24T10:00:00Z",
  "activity_type_id": "group-session"
}

Response Example

{
  "is_duplicate": true,
  "duplicate_type": "exact_duplicate",
  "conflicting_activity_id": "pact-20260324-008",
  "conflicting_date": "2026-03-24T10:00:00Z",
  "conflicting_type": "group-session",
  "registered_by": "mentor-042",
  "registered_at": "2026-03-24T08:30:00Z"
}
PUT /api/v1/duplicate-checks/api/v1/duplicate-checks/:id

Update the resolution status of a duplicate check record (e.g. mark as resolved)

Public

Request Example

{
  "resolution_status": "resolved",
  "resolution_notes": "Original entry confirmed correct; new entry voided"
}

Response Example

{
  "check_id": "dc-20260325-001",
  "resolution_status": "resolved",
  "resolution_notes": "Original entry confirmed correct; new entry voided",
  "resolved_by": "coord-007",
  "resolved_at": "2026-03-25T10:30:00Z"
}
DELETE /api/v1/duplicate-checks/api/v1/duplicate-checks/:id

Delete a duplicate check record (admin/audit cleanup only)

Public

Response Example

{
  "message": "Duplicate check record dc-20260325-001 deleted",
  "deleted_at": "2026-03-25T11:00:00Z"
}
POST /api/v1/duplicate-checks/api/v1/duplicate-checks/batch

Check a list of mentor-date-activity combinations for duplicates in a single call

Public

Request Example

{
  "checks": [
    {
      "mentor_id": "mentor-001",
      "date": "2026-03-24T10:00:00Z",
      "activity_type_id": "group-session"
    },
    {
      "mentor_id": "mentor-042",
      "date": "2026-03-24T10:00:00Z",
      "activity_type_id": "group-session"
    },
    {
      "mentor_id": "mentor-019",
      "date": "2026-03-24T10:00:00Z",
      "activity_type_id": "group-session"
    }
  ]
}

Response Example

{
  "results": [
    {
      "mentor_id": "mentor-001",
      "is_duplicate": false
    },
    {
      "mentor_id": "mentor-042",
      "is_duplicate": true,
      "duplicate_type": "exact_duplicate",
      "conflicting_activity_id": "pact-20260324-008"
    },
    {
      "mentor_id": "mentor-019",
      "is_duplicate": true,
      "duplicate_type": "same_day",
      "conflicting_activity_id": "pact-20260324-005"
    }
  ],
  "total_checked": 3,
  "duplicate_count": 2,
  "clean_count": 1
}

Additional Metadata

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