Docs API Reference Detect Compliance Risks

Detect Compliance Risks

Run a pre-calculation compliance risk analysis on a shift scenario.

POST /api/v1/detect-risks

Identifies classification errors, time structure issues, and award coverage gaps before running the pay calculation.

Request body

Same as Calculate Pay. Same fields, same validation.

Response

FieldTypeDescription
risksarrayList of detected risk items
overall_risk_levelstringAggregate level: low, moderate, elevated, high
requires_manual_reviewbooleanWhether a human should review before finalising
total_risks_detectedintegerTotal count of risks found
risk_counts_by_severityobjectCount per severity: {"high": 0, "warning": 1, "info": 0}
risk_textstringPlain-English summary of all risks
detection_modestringAlways pre_calc for this endpoint
deterministicbooleanAlways true — no AI involved

Risk item fields

FieldTypeDescription
risk_codestringMachine-readable risk identifier (e.g. SHIFT_EXCEEDS_DAILY_MAX)
risk_labelstringHuman-readable label
categorystringRisk category (e.g. classification_mapping, time_structure)
severitystringhigh, warning, or info
confidencestringhigh, medium, or low
descriptionstringDetailed explanation of the risk
review_actionstringSuggested review action
impact_areastringWhat the risk affects (e.g. base_pay, overtime)

Common risk codes

CodeSeverityDescription
CLASSIFICATION_NOT_FOUNDhighClassification code not recognised for this award
NO_BASE_PAY_RATEhighNo pay rate found for this classification/employment type
SHIFT_EXCEEDS_DAILY_MAXwarningShift exceeds the award’s daily maximum hours
WEEKLY_HOURS_EXCEEDEDwarningWeekly hours exceed ordinary hours threshold
NO_BREAK_DEDUCTEDwarningLong shift without break deduction
MINIMUM_ENGAGEMENT_NOT_METwarningCasual shift below minimum engagement hours
CLASSIFICATION_AMBIGUOUSwarningMultiple classifications at the same level
AWARD_NOT_ENGINE_ENABLEDhighAward code is not supported for calculations

Example request

curl -X POST /api/v1/detect-risks \
  -H "Authorization: Bearer ak_KEY:sk_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "award_code": "MA000009",
    "classification_code": "INVALID_CODE",
    "employment_type": "full_time",
    "work_date": "2026-03-16",
    "total_hours_worked": 12
  }'