{
  "$defs": {
    "AccidentInsurance": {
      "description": "Accident insurance registration (VBG).",
      "properties": {
        "kundennummer": {
          "type": [
            "string",
            "null"
          ]
        },
        "unternehmensnummer": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "BankingInfo": {
      "description": "Banking information.",
      "properties": {
        "account_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "bank_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "bic": {
          "type": [
            "string",
            "null"
          ]
        },
        "blz": {
          "type": [
            "string",
            "null"
          ]
        },
        "iban": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "CapitalFlow": {
      "description": "Capital flow between entities.",
      "properties": {
        "deployment": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "Contact": {
      "description": "Contact information.",
      "properties": {
        "email": {
          "format": "email",
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "EmployeeCount": {
      "description": "Employee count snapshot.",
      "properties": {
        "as_of": {
          "$ref": "#/$defs/IsoDate"
        },
        "value": {
          "format": "int64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "value",
        "as_of"
      ],
      "type": "object"
    },
    "EntityCustom": {
      "description": "Typed extension fields for Entity.\nUnion of all jurisdiction-specific fields observed in .corpospec/ YAML data.",
      "properties": {
        "banking": {
          "anyOf": [
            {
              "$ref": "#/$defs/BankingInfo"
            },
            {
              "type": "null"
            }
          ]
        },
        "capital_flow": {
          "anyOf": [
            {
              "$ref": "#/$defs/CapitalFlow"
            },
            {
              "type": "null"
            }
          ]
        },
        "capital_flow_pre_pivot": {
          "anyOf": [
            {
              "$ref": "#/$defs/CapitalFlow"
            },
            {
              "type": "null"
            }
          ]
        },
        "geschaeftsfuehrer": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "labor_registration": {
          "anyOf": [
            {
              "$ref": "#/$defs/LaborRegistration"
            },
            {
              "type": "null"
            }
          ]
        },
        "paid_in_before_filing_eur": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "planned_reorganization": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReorganizationPlan"
            },
            {
              "type": "null"
            }
          ]
        },
        "planned_subsidiaries": {
          "items": {
            "$ref": "#/$defs/PlannedSubsidiary"
          },
          "type": "array"
        },
        "registered_seat_rationale": {
          "type": [
            "string",
            "null"
          ]
        },
        "relationship_to_unstarter": {
          "type": [
            "string",
            "null"
          ]
        },
        "role": {
          "type": [
            "string",
            "null"
          ]
        },
        "sole_shareholder": {
          "type": [
            "string",
            "null"
          ]
        },
        "stammkapital_eur": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "target_incorporation": {
          "anyOf": [
            {
              "$ref": "#/$defs/IncorporationTimeline"
            },
            {
              "type": "null"
            }
          ]
        },
        "tax_structure": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxStructure"
            },
            {
              "type": "null"
            }
          ]
        },
        "vbg_unfallversicherung": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccidentInsurance"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "EntityType": {
      "description": "Entity type discriminator.",
      "enum": [
        "corporation",
        "llc",
        "partnership",
        "sole-proprietorship",
        "non-profit",
        "cooperative",
        "trust",
        "foundation",
        "lp",
        "llp",
        "joint-venture",
        "association",
        "reit",
        "pbc"
      ],
      "type": "string"
    },
    "IncorporationTimeline": {
      "description": "Incorporation timeline targets.",
      "properties": {
        "formation_deed_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "handelsregister_entry_target": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "steuernummer_target": {
          "type": [
            "string",
            "null"
          ]
        },
        "wandeldarlehen_ready_target": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "IsoCountry": {
      "description": "ISO 3166-1 alpha-2 country code.",
      "pattern": "^[A-Z]{2}$",
      "type": "string"
    },
    "IsoCurrency": {
      "description": "ISO 4217 currency code.",
      "pattern": "^[A-Z]{3}$",
      "type": "string"
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "LaborRegistration": {
      "description": "Labor registration details (German Betriebsnummer).",
      "properties": {
        "betriebsnummer": {
          "type": [
            "string",
            "null"
          ]
        },
        "kundennummer": {
          "type": [
            "string",
            "null"
          ]
        },
        "wirtschaftsunterklasse": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "Lei": {
      "description": "ISO 17442 Legal Entity Identifier (20-character alphanumeric).",
      "pattern": "^[A-Z0-9]{18}[0-9]{2}$",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "PlannedSubsidiary": {
      "description": "Planned subsidiary entity.",
      "properties": {
        "capitalization_eur": {
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "formation_service": {
          "type": [
            "string",
            "null"
          ]
        },
        "formation_timing": {
          "type": [
            "string",
            "null"
          ]
        },
        "jurisdiction": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "ownership": {
          "type": [
            "string",
            "null"
          ]
        },
        "purpose": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "PostalAddress": {
      "description": "Physical address aligned with schema.org PostalAddress.",
      "properties": {
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "$ref": "#/$defs/IsoCountry"
        },
        "postal_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "street": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "country"
      ],
      "type": "object"
    },
    "ReorganizationPlan": {
      "description": "Corporate reorganization plan.",
      "properties": {
        "action": {
          "type": [
            "string",
            "null"
          ]
        },
        "commitment": {
          "type": [
            "string",
            "null"
          ]
        },
        "trigger": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "StatusActive": {
      "description": "Lifecycle status for entities.",
      "enum": [
        "active",
        "inactive",
        "dissolved",
        "pre-incorporation",
        "planned"
      ],
      "type": "string"
    },
    "TaxId": {
      "description": "Tax identification number with type discriminator.",
      "properties": {
        "country": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoCountry"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "id_type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "id_type",
        "value"
      ],
      "type": "object"
    },
    "TaxStructure": {
      "description": "Tax structure configuration.",
      "properties": {
        "dba_reference": {
          "type": [
            "string",
            "null"
          ]
        },
        "effective_exit_tax_rate": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "participation_exemption": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.7.1/entity.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Company profile aligned with schema.org Organization and GLEIF LEI reference data.",
  "properties": {
    "address": {
      "anyOf": [
        {
          "$ref": "#/$defs/PostalAddress"
        },
        {
          "type": "null"
        }
      ]
    },
    "company_purpose": {
      "type": [
        "string",
        "null"
      ]
    },
    "contact": {
      "anyOf": [
        {
          "$ref": "#/$defs/Contact"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom": {
      "anyOf": [
        {
          "$ref": "#/$defs/EntityCustom"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_of_incorporation": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ]
    },
    "founders": {
      "default": [],
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "functional_currency": {
      "$ref": "#/$defs/IsoCurrency",
      "description": "Functional (reporting) currency of the entity. ISO 4217. Canonical\ndefault for any monetary value elsewhere in the corpus that does not\ncarry its own currency declaration."
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "jurisdiction": {
      "$ref": "#/$defs/IsoCountry"
    },
    "legal_form": {
      "type": [
        "string",
        "null"
      ]
    },
    "legal_name": {
      "type": "string"
    },
    "lei": {
      "anyOf": [
        {
          "$ref": "#/$defs/Lei"
        },
        {
          "type": "null"
        }
      ]
    },
    "number_of_employees": {
      "anyOf": [
        {
          "$ref": "#/$defs/EmployeeCount"
        },
        {
          "type": "null"
        }
      ]
    },
    "parent_organization": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ]
    },
    "registered_seat": {
      "type": [
        "string",
        "null"
      ]
    },
    "registration_authority": {
      "type": [
        "string",
        "null"
      ]
    },
    "registration_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "$ref": "#/$defs/StatusActive"
    },
    "subsidiaries": {
      "default": [],
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "tax_ids": {
      "default": [],
      "items": {
        "$ref": "#/$defs/TaxId"
      },
      "type": "array"
    },
    "trade_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "$ref": "#/$defs/EntityType"
    },
    "url": {
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "type",
    "legal_name",
    "jurisdiction",
    "functional_currency",
    "status"
  ],
  "title": "Entity",
  "type": "object"
}