Compliance Reports

Monitor governance health, vendor compliance status, and violation trends. Generate PDF reports for board meetings and regulatory filings.

Compliance dashboard

bash
GET /api/mls/compliance?period=30d

Response:

json
{
  "health": {
    "mls_name": "Austin MLS",
    "coverage_area": "Greater Austin, TX",
    "active_policies": 2,
    "total_fields_restricted": 7,
    "total_fields_hidden": 4,
    "total_fields_masked": 3,
    "total_vendors_approved": 5,
    "total_vendors_pending": 2,
    "total_vendors_suspended": 0,
    "total_vendors_revoked": 1,
    "vendors_with_certificate": 4,
    "total_queries": 12450,
    "total_violations": 3,
    "violation_rate": 0.024,
    "violations_by_type": {
      "rate_limit_exceeded": 2,
      "unusual_pattern": 1
    }
  },
  "violation_trend": [
    { "date": "2026-02-01", "total_queries": 415, "violations": 0 },
    { "date": "2026-02-02", "total_queries": 458, "violations": 1 }
  ],
  "vendor_compliance": [
    {
      "vendor_id": "uuid",
      "vendor_name": "AI Realty Co",
      "access_status": "approved",
      "has_certificate": true,
      "certificate_grade": "A",
      "certificate_expires_at": "2026-08-15T00:00:00Z"
    }
  ],
  "policy_summary": [
    {
      "id": "uuid",
      "name": "Standard Access",
      "is_default": true,
      "fields_hidden": 2,
      "fields_masked": 3,
      "anti_training_enabled": true,
      "vendor_count": 4
    }
  ]
}

Key metrics

Violation rate

Percentage of queries flagged as violations. A low violation rate (<1%) indicates healthy vendor behavior.

Fields restricted

Total fields across all policies that are hidden or masked. Shows how much data protection is active.

Certificate coverage

Number of approved vendors with active compliance certificates. Vendors with certificates have been independently scanned and graded.

Vendor compliance status

The vendor_compliance array shows each active vendor's compliance posture:

  • -has_certificate: whether the vendor has a valid compliance certificate
  • -certificate_grade: trust grade at time of issue (A+, A, B+, etc.)
  • -certificate_expires_at: when the certificate needs renewal

The violation_trend array provides daily query and violation counts for charting. Use this to identify patterns and spikes in vendor violations.

PDF reports

Generate PDF compliance reports for offline review:

bash
GET /api/mls/compliance/report?period=30d

→ Content-Type: application/pdf
→ Content-Disposition: attachment; filename="compliance-report-2026-02.pdf"

The PDF includes governance health summary, vendor compliance table, violation trends, and policy configuration details.

Policy summary

The policy_summary shows each active policy with field restriction counts and the number of vendors assigned to it. Use this to verify your governance configuration is applied correctly.