{
 "openapi": "3.1.0",
 "info": {
  "title": "Detector Performance (Accounting)",
  "version": "20261030b",
  "description": "Precision — of the signals it raised, how many were real. The only number that decides whether a detector should keep running, and the reason outcomes are recorded at all."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "detector-performance": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "detector_id": {
      "type": "string",
      "format": "uuid",
      "description": "Detector id",
      "readOnly": true
     },
     "period_code": {
      "type": "string",
      "description": "Period code",
      "readOnly": true
     },
     "documents_scanned": {
      "type": "integer",
      "description": "Documents scanned",
      "readOnly": true
     },
     "signals_raised": {
      "type": "integer",
      "description": "Signals raised",
      "readOnly": true
     },
     "cases_opened": {
      "type": "integer",
      "description": "Cases opened",
      "readOnly": true
     },
     "true_positives": {
      "type": "integer",
      "description": "True positives",
      "readOnly": true
     },
     "false_positives": {
      "type": "integer",
      "description": "False positives",
      "readOnly": true
     },
     "inconclusive": {
      "type": "integer",
      "description": "Inconclusive",
      "readOnly": true
     },
     "amount_flagged": {
      "type": "string",
      "format": "decimal",
      "description": "Amount flagged",
      "readOnly": true
     },
     "amount_confirmed": {
      "type": "string",
      "format": "decimal",
      "description": "Amount confirmed",
      "readOnly": true
     },
     "amount_recovered": {
      "type": "string",
      "format": "decimal",
      "description": "Amount recovered",
      "readOnly": true
     },
     "precision_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Precision pct",
      "readOnly": true
     },
     "alerts_per_finding": {
      "type": "string",
      "format": "decimal",
      "description": "Alerts per finding",
      "readOnly": true
     },
     "median_resolution_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Median resolution hours",
      "readOnly": true
     },
     "computed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Computed at",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/detector-performance": {
   "get": {
    "summary": "list detector-performance",
    "operationId": "list_detector_performance_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create detector-performance",
    "operationId": "create_detector_performance_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/detector-performance/{id}": {
   "get": {
    "summary": "get detector-performance",
    "operationId": "get_detector_performance_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change detector-performance",
    "operationId": "change_detector_performance_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete detector-performance",
    "operationId": "delete_detector_performance_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/detector-performance/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_detector_performance_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}