{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/senlay-cloud/json-schema/senlay-cloud-risk-events-request-schema.json",
  "title": "RiskEventsRequest",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/senlay-cloud-openapi.json#/components/schemas/RiskEventsRequest",
  "type": "object",
  "required": [
    "lat",
    "lng"
  ],
  "properties": {
    "lat": {
      "type": "number",
      "minimum": -90,
      "maximum": 90
    },
    "lng": {
      "type": "number",
      "minimum": -180,
      "maximum": 180
    },
    "field": {
      "type": "string"
    },
    "subject": {
      "type": "object",
      "description": "Optional tracker/rider/asset context for SmartSurf-style risk detection.",
      "additionalProperties": true,
      "properties": {
        "type": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "speed_kmh": {
          "type": "number"
        },
        "heading_deg": {
          "type": "number"
        },
        "minutes_stationary": {
          "type": "number"
        },
        "battery_pct": {
          "type": "number"
        },
        "last_seen_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "station": {
      "type": "object",
      "additionalProperties": true
    },
    "geofence": {
      "type": "object",
      "additionalProperties": true
    }
  }
}