{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.efast.digital/efast-metadata/1.0.0/efast-dataset.schema.json",
  "title": "EFAST FIT-Connect DataSet",
  "description": "EFAST-spezifisches DataSet für FIT-Connect Metadaten 2.0.0. Dieses Schema beschreibt die ehemaligen EFAST-x-* AdditionalReferenceInfo-Inhalte, die ab FIT-Connect V2 als dataSets[].content übertragen werden.",
  "x-created": "2026-05-05",
  "x-status": "draft",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "applicant": {
      "type": "object",
      "additionalProperties": false,
      "description": "Antragsteller- und Login-Daten. Entspricht bisher additionalReferenceInfo.x-applicant.",
      "properties": {
        "login": {
          "$ref": "#/$defs/login"
        },
        "eidPersonalData": {
          "type": ["object", "null"],
          "description": "Optionale eID-Personendaten.",
          "additionalProperties": false,
          "properties": {
            "givenNames": {
              "type": "string",
              "description": "Vorname(n)."
            },
            "familyNames": {
              "type": "string",
              "description": "Familienname(n)."
            },
            "dateOfBirth": {
              "type": ["object", "null"],
              "description": "Geburtsdatum.",
              "additionalProperties": false,
              "properties": {
                "dateValue": {
                  "type": "string",
                  "format": "date",
                  "description": "Geburtsdatum als ISO-8601-Datum."
                }
              },
              "required": ["dateValue"]
            },
            "placeOfResidence": {
              "type": ["object", "null"],
              "description": "Wohnsitz.",
              "additionalProperties": false,
              "properties": {
                "structuredPlace": {
                  "type": ["object", "null"],
                  "description": "Strukturierte Adresse des Wohnsitzes.",
                  "additionalProperties": false,
                  "properties": {
                    "street": {
                      "type": "string",
                      "description": "Straße."
                    },
                    "city": {
                      "type": "string",
                      "description": "Ort."
                    },
                    "state": {
                      "type": "string",
                      "description": "Bundesland."
                    },
                    "country": {
                      "type": "string",
                      "description": "Land."
                    },
                    "zipCode": {
                      "type": "string",
                      "description": "Postleitzahl."
                    }
                  }
                }
              }
            },
            "organisation": {
              "type": "string",
              "description": "Organisation (nur für MeinUnternehmenskonto, nicht für eID-Schnittstelle)."
            }
          }
        },
        "authProcedure": {
          "type": "string",
          "maxLength": 128,
          "description": "Authentifizierungsverfahren, z. B. bundid."
        },
        "changeLog": {
          "type": ["object", "null"],
          "description": "Optionales Änderungsprotokoll zum Antragstellerkontext.",
          "additionalProperties": false,
          "properties": {
            "anmeldung": {
              "type": "object",
              "additionalProperties": false,
              "description": "Anmeldedaten zum Zeitpunkt der Änderung.",
              "properties": {
                "authLevel": {
                  "type": "string",
                  "maxLength": 128,
                  "description": "Vertrauensniveau/Auth-Level der Anmeldung."
                },
                "identifier": {
                  "type": "string",
                  "maxLength": 512,
                  "description": "Eindeutiger Login-Identifier der Anmeldung."
                }
              },
              "required": ["authLevel", "identifier"]
            },
            "logs": {
              "type": "array",
              "description": "Liste der Änderungseinträge.",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID des geänderten Feldes."
                  },
                  "path": {
                    "type": "string",
                    "description": "Pfad des geänderten Feldes."
                  },
                  "label": {
                    "type": "string",
                    "description": "Bezeichnung des geänderten Feldes."
                  },
                  "defaultValue": {
                    "type": "string",
                    "description": "Ursprünglicher Wert des Feldes."
                  },
                  "value": {
                    "type": "string",
                    "description": "Neuer Wert des Feldes."
                  }
                },
                "required": ["id", "path", "label", "defaultValue", "value"]
              }
            }
          },
          "required": ["anmeldung", "logs"]
        }
      },
      "required": ["login"]
    },
    "sender": {
      "type": "object",
      "additionalProperties": false,
      "description": "Legacy-Absenderdaten aus additionalReferenceInfo.x-sender. In FIT-Connect V2 werden diese zusätzlich bzw. alternativ als metadata.author abgebildet.",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 256,
          "description": "Name des sendenden Systems."
        },
        "description": {
          "type": "string",
          "maxLength": 1024,
          "description": "Beschreibung bzw. Vendor-Angabe des sendenden Systems."
        },
        "address": {
          "type": "string",
          "maxLength": 2048,
          "description": "URL oder Adresse des sendenden Systems."
        },
        "product": {
          "$ref": "#/$defs/product"
        }
      },
      "required": ["name", "address", "product"]
    },
    "application": {
      "type": "object",
      "additionalProperties": false,
      "description": "EFAST-Anwendungsdaten. Entspricht bisher additionalReferenceInfo.x-application.",
      "properties": {
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "description": "Version der Anwendung bzw. Konfiguration."
        },
        "objection": {
          "type": "string",
          "maxLength": 2048,
          "description": "Hinweis-/Widerspruchs-/Einwendungstext aus dem Anwendungskontext."
        },
        "urlConfigId": {
          "type": ["string", "null"],
          "format": "uri",
          "maxLength": 2048,
          "description": "URL zur EFAST-Konfiguration."
        },
        "urlXDF3": {
          "type": ["string", "null"],
          "format": "uri",
          "maxLength": 2048,
          "description": "URL zur XDF3-Konfiguration."
        },
        "urlPrintCiraliId": {
          "type": ["string", "null"],
          "format": "uri",
          "maxLength": 2048,
          "description": "URL zur Print-/Cirali-Konfiguration."
        },
        "urlHiddenFields": {
          "type": ["string", "null"],
          "format": "uri",
          "maxLength": 2048,
          "description": "URL zu versteckten Feldern."
        },
        "urlAttachLater": {
          "type": ["string", "null"],
          "format": "uri",
          "maxLength": 2048,
          "description": "URL zum nachträglichen Anhängen von Anlagen."
        },
        "authProcedureIsHybrid": {
          "type": "boolean",
          "description": "Gibt an, ob das Authentifizierungsverfahren hybrid war."
        },
        "deliveryWithEidLogin": {
          "type": "boolean",
          "description": "Gibt an, ob die Zustellung mit eID-Login erfolgte."
        },
        "printIdTexte": {
          "type": "boolean",
          "description": "Gibt an, ob ID-Texte im Druckkontext ausgegeben werden."
        },
        "clientStateEncode": {
          "type": "string",
          "description": "Kodierter Client-State."
        },
        "clientState": {
          "type": "string",
          "description": "Technischer Client-State des Online-Dienstes. Kann JSON als String enthalten. Der Wert ist für Empfänger optional und sollte nicht fachlich interpretiert werden."
        },
        "noEReply": {
          "type": ["boolean", "null"],
          "description": "Gibt an, ob keine elektronische Antwort gewünscht/zulässig ist."
        },
        "authChangeLog": {
          "type": ["object", "null"],
          "description": "Optionales Änderungsprotokoll zum Authentifizierungskontext.",
          "additionalProperties": false,
          "properties": {
            "anmeldung": {
              "type": "object",
              "additionalProperties": false,
              "description": "Anmeldedaten zum Zeitpunkt der Änderung.",
              "properties": {
                "authLevel": {
                  "type": "string",
                  "maxLength": 128,
                  "description": "Vertrauensniveau/Auth-Level der Anmeldung."
                },
                "identifier": {
                  "type": "string",
                  "maxLength": 512,
                  "description": "Eindeutiger Login-Identifier der Anmeldung."
                }
              },
              "required": ["authLevel", "identifier"]
            },
            "logs": {
              "type": "array",
              "description": "Liste der Änderungseinträge.",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "ID des geänderten Feldes."
                  },
                  "path": {
                    "type": "string",
                    "description": "Pfad des geänderten Feldes."
                  },
                  "label": {
                    "type": "string",
                    "description": "Bezeichnung des geänderten Feldes."
                  },
                  "defaultValue": {
                    "type": "string",
                    "description": "Ursprünglicher Wert des Feldes."
                  },
                  "value": {
                    "type": "string",
                    "description": "Neuer Wert des Feldes."
                  }
                },
                "required": ["id", "path", "label", "defaultValue", "value"]
              }
            }
          },
          "required": ["anmeldung", "logs"]
        }
      },
      "required": ["version"]
    },
    "zustaendigestelle": {
      "type": "object",
      "additionalProperties": false,
      "description": "Zuständige Stelle. Entspricht bisher additionalReferenceInfo.x-zustaendigestelle.",
      "properties": {
        "orgname1": {
          "type": "string",
          "maxLength": 256,
          "description": "Organisationsname 1."
        },
        "orgname2": {
          "type": "string",
          "maxLength": 256,
          "description": "Organisationsname 2."
        },
        "street": {
          "type": "string",
          "maxLength": 256,
          "description": "Straße."
        },
        "hsNr": {
          "type": "string",
          "maxLength": 32,
          "description": "Hausnummer."
        },
        "ort": {
          "type": "string",
          "maxLength": 256,
          "description": "Ort."
        },
        "plz": {
          "type": "string",
          "maxLength": 16,
          "description": "Postleitzahl."
        },
        "email": {
          "type": "string",
          "format": "email",
          "maxLength": 320,
          "description": "E-Mail-Adresse."
        },
        "phone": {
          "type": "string",
          "maxLength": 64,
          "description": "Telefonnummer."
        }
      }
    },
    "printinfo": {
      "type": "object",
      "additionalProperties": false,
      "description": "Druck- und Nachweis-Informationen. Entspricht bisher additionalReferenceInfo.x-printinfo.",
      "properties": {
        "antragDataHash": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "description": "Hash der Antragsdaten."
        },
        "textSchriftformArt": {
          "type": "string",
          "maxLength": 2048,
          "description": "Text zur Schriftformart."
        },
        "textIdentLinks": {
          "type": "string",
          "maxLength": 2048,
          "description": "Linker Identifikationstext."
        },
        "textIdentRechts": {
          "type": "string",
          "maxLength": 2048,
          "description": "Rechter Identifikationstext."
        },
        "textLoginLinks": {
          "type": "string",
          "maxLength": 2048,
          "description": "Linker Logintext."
        },
        "textLoginRechts": {
          "type": "string",
          "maxLength": 2048,
          "description": "Rechter Logintext."
        }
      },
      "required": ["antragDataHash"]
    },
    "attachments": {
      "type": "array",
      "description": "Mapping zwischen den pro Versand neu vergebenen FIT-Connect-attachmentIds und den stabilen GovOS-internen Anhang-IDs (contentDataCorrelationId). Ermöglicht dem Empfänger die Zuordnung der FIT-Connect-Anhänge zu den in den Fachdaten referenzierten GovOS-Anhängen, obwohl die attachmentId bei jedem Versand neu (zufällig) vergeben wird.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "attachmentId": {
            "type": "string",
            "format": "uuid",
            "description": "Pro Versand neu (zufällig) vergebene FIT-Connect-attachmentId des Anhangs."
          },
          "contentDataCorrelationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Stabile GovOS-interne Anhang-Referenz, exakt so wie sie im GovOS-Fachdatensatz vorkommt (Datei-ID = 36-stellige UUID gefolgt von der angehängten Modell-ID, z. B. 'ac74a5da-441d-4e17-9ad9-310e0093280f2345'). Daher kein reines UUID-Format. Bleibt über alle Versände hinweg gleich und ist im Fachdatensatz eindeutig auffindbar."
          }
        },
        "required": ["attachmentId", "contentDataCorrelationId"]
      }
    }
  },
  "required": ["applicant", "application", "printinfo"],
  "$defs": {
    "login": {
      "type": "object",
      "description": "Login-Informationen des Antragstellers.",
      "properties": {
        "authorizer": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Authentifizierungsanbieter, z. B. bundid."
        },
        "identifier": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Eindeutiger Login-Identifier."
        },
        "authlevel": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Vertrauensniveau/Auth-Level."
        },
        "legacypostkorbhandle": {
          "type": "string",
          "maxLength": 512
        },
        "gender": {
          "type": "string",
          "maxLength": 64
        },
        "title": {
          "type": "string",
          "maxLength": 128
        },
        "email": {
          "type": "string",
          "format": "email",
          "maxLength": 320
        },
        "firstname": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "lastname": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "birthdate": {
          "type": "string",
          "maxLength": 64
        },
        "street": {
          "type": "string",
          "maxLength": 256
        },
        "housenumber": {
          "type": "string",
          "maxLength": 32
        },
        "postalcode": {
          "type": "string",
          "maxLength": 16
        },
        "city": {
          "type": "string",
          "maxLength": 256
        },
        "country": {
          "type": "string",
          "maxLength": 128
        },
        "wstaatiso": {
          "type": "string",
          "maxLength": 8
        },
        "orgname": {
          "type": "string",
          "maxLength": 256
        },
        "orgname2": {
          "type": "string",
          "maxLength": 256
        }
      },
      "required": ["authorizer", "identifier", "authlevel", "firstname", "lastname"],
      "additionalProperties": false
    },
    "product": {
      "type": "object",
      "description": "Produktinformationen des sendenden Systems.",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "manufacturer": {
          "$ref": "#/$defs/manufacturer"
        }
      },
      "required": ["name", "description", "version", "manufacturer"],
      "additionalProperties": false
    },
    "manufacturer": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "description": {
          "type": "string",
          "maxLength": 1024
        }
      },
      "required": ["name"]
    }
  }
}
