{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frihet-io/json-schema/frihet-io-reconciliation-suggestion-schema.json",
  "title": "ReconciliationSuggestion",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frihet-io-banking-api-openapi.yml#/components/schemas/ReconciliationSuggestion",
  "type": "object",
  "properties": {
    "documentType": {
      "type": "string",
      "enum": [
        "invoice",
        "expense"
      ]
    },
    "documentId": {
      "type": "string"
    },
    "score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "confidence": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "suggested": {
      "type": "boolean"
    },
    "amountDiff": {
      "type": "number"
    },
    "dateDiff": {
      "type": "number"
    },
    "reasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "breakdown": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "signal": {
            "type": "string",
            "enum": [
              "amount",
              "date",
              "reference",
              "counterparty"
            ]
          },
          "points": {
            "type": "integer"
          },
          "similarity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "reason": {
            "type": "string"
          }
        }
      }
    }
  }
}