Skip to main content
GET
/
api
/
violations
curl -X GET "https://api.example.com/api/violations?scan_id=abc123&severity=CRITICAL&page=1&limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "violations": [
    {
      "id": "viol_789xyz",
      "scan_id": "abc123",
      "rule_id": "SAR_THRESHOLD",
      "rule_name": "Suspicious Activity Report Filing Required",
      "severity": "CRITICAL",
      "account": "ACC-2024-001",
      "amount": 15000,
      "transaction_type": "WIRE",
      "evidence": {
        "transaction_id": "TXN-456",
        "transaction_date": "2024-01-15",
        "counterparty": "High Risk Entity",
        "risk_score": 85
      },
      "threshold": 10000,
      "actual_value": 15000,
      "policy_excerpt": "Financial institutions must file a SAR within 30 days of detecting suspicious activity involving $5,000 or more.",
      "policy_section": "31 CFR 1020.320",
      "explanation": "Transaction exceeds SAR filing threshold and involves a high-risk counterparty without proper documentation.",
      "status": "pending",
      "review_note": null,
      "reviewed_at": null,
      "created_at": "2024-02-28T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 47,
    "pages": 3
  }
}
List all violations detected during compliance scans. Supports filtering by scan, severity, status, and rule.

Query Parameters

scan_id
string
Filter violations by scan ID
severity
string
Filter by severity level. Valid values: CRITICAL, HIGH, MEDIUM
status
string
Filter by review status. Valid values: pending, approved, false_positive
page
integer
default:"1"
Page number for pagination
limit
integer
default:"20"
Number of violations per page

Response

violations
array
Array of violation objects
id
string
Unique violation identifier
scan_id
string
ID of the scan that detected this violation
rule_id
string
Identifier of the violated rule (e.g., CTR_MISSING, SAR_THRESHOLD)
rule_name
string
Human-readable rule name
severity
string
Severity level: CRITICAL, HIGH, or MEDIUM
account
string
Account or entity associated with the violation
amount
number
Transaction amount that triggered the violation
transaction_type
string
Type of transaction (e.g., WIRE, ACH, CASH)
evidence
object
Evidence data supporting the violation (transaction details, metrics, etc.)
threshold
number
Policy threshold that was exceeded
actual_value
number
Actual value that exceeded the threshold
policy_excerpt
string
Relevant excerpt from the policy document
policy_section
string
Section reference in the policy (e.g., Article 33, Section 12.4)
explanation
string
Detailed explanation of why this is a violation
status
string
Review status: pending, approved, or false_positive
review_note
string
Notes added during review
reviewed_at
string
ISO 8601 timestamp when the violation was reviewed
created_at
string
ISO 8601 timestamp when the violation was created
pagination
object
Pagination metadata
page
integer
Current page number
limit
integer
Items per page
total
integer
Total number of violations matching the filters
pages
integer
Total number of pages
curl -X GET "https://api.example.com/api/violations?scan_id=abc123&severity=CRITICAL&page=1&limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "violations": [
    {
      "id": "viol_789xyz",
      "scan_id": "abc123",
      "rule_id": "SAR_THRESHOLD",
      "rule_name": "Suspicious Activity Report Filing Required",
      "severity": "CRITICAL",
      "account": "ACC-2024-001",
      "amount": 15000,
      "transaction_type": "WIRE",
      "evidence": {
        "transaction_id": "TXN-456",
        "transaction_date": "2024-01-15",
        "counterparty": "High Risk Entity",
        "risk_score": 85
      },
      "threshold": 10000,
      "actual_value": 15000,
      "policy_excerpt": "Financial institutions must file a SAR within 30 days of detecting suspicious activity involving $5,000 or more.",
      "policy_section": "31 CFR 1020.320",
      "explanation": "Transaction exceeds SAR filing threshold and involves a high-risk counterparty without proper documentation.",
      "status": "pending",
      "review_note": null,
      "reviewed_at": null,
      "created_at": "2024-02-28T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 47,
    "pages": 3
  }
}

Common Use Cases

Get all violations for a specific scan

GET /api/violations?scan_id=abc123

Filter by severity and status

GET /api/violations?scan_id=abc123&severity=CRITICAL&status=pending

Paginate through results

GET /api/violations?scan_id=abc123&page=2&limit=50

Build docs developers (and LLMs) love