{"product":"NebenkostenBlitz","purpose":"Advanced import schema for AI assistants that collect German Nebenkostenabrechnung data with heating, warm water, cold water, wastewater, meters, split rules, and additional Betriebskosten for deterministic validation and calculation in NebenkostenBlitz.","schemaVersion":"advanced-1.0","maxInputBytes":200000,"importMarkers":{"start":"BEGIN_NEBENKOSTENBLITZ_ADVANCED_IMPORT","end":"END_NEBENKOSTENBLITZ_ADVANCED_IMPORT"},"agentRules":["Collect and structure advanced billing data only.","Do not calculate final tenant balances, Nachzahlung, Guthaben, or PDF totals.","Use NebenkostenBlitz for deterministic validation, heating/water allocation, checkout, and PDF generation.","Do not invent missing meter readings, living areas, dates, costs, advance payments, addresses, tenant names, or split rules.","If a meter reading, split rule, or cost item is uncertain, include review notes or mark the item as needsReview.","Use separate for separate heating/water systems and combined only when a connected heating/warm-water system is clear."],"schema":{"type":"object","required":["schemaVersion","billingPeriod","landlord","property","units","costs","allocation"],"additionalProperties":false,"properties":{"schemaVersion":{"const":"advanced-1.0"},"source":{"enum":["chatgpt","claude","other"]},"billingPeriod":{"type":"object","required":["from","to"],"additionalProperties":false,"properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}}},"landlord":{"type":"object","required":["name","address","email"],"additionalProperties":false,"properties":{"name":{"type":"string"},"address":{"type":"string"},"email":{"type":"string","format":"email"}}},"property":{"type":"object","required":["address"],"additionalProperties":false,"properties":{"name":{"type":"string"},"address":{"type":"string"},"systemType":{"enum":["separate","combined"]}}},"units":{"type":"array","minItems":1,"items":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"tenantName":{"type":"string"},"tenantAddress":{"type":"string"},"advancePayments":{"type":"number","minimum":0},"livingAreaSqm":{"type":"number","exclusiveMinimum":0,"description":"Use as direct living area only when areaComponents is omitted; if both are present, NebenkostenBlitz uses areaComponents to avoid double-counting."},"areaComponents":{"type":"object","additionalProperties":false,"properties":{"fullHeightAreaM2":{"type":"number","minimum":0},"halfHeightAreaM2":{"type":"number","minimum":0},"zeroHeightAreaM2":{"type":"number","minimum":0},"additionalFullAreaM2":{"type":"number","minimum":0}}},"meters":{"type":"object","additionalProperties":false,"properties":{"heat":{"type":"object","additionalProperties":false,"properties":{"startReading":{"type":"number","minimum":0},"endReading":{"type":"number","minimum":0},"directConsumption":{"type":"number","minimum":0},"unit":{"enum":["kWh","MWh","units"]},"meterNumber":{"type":"string"},"label":{"type":"string"}}},"warmWater":{"type":"object","additionalProperties":false,"properties":{"startReading":{"type":"number","minimum":0},"endReading":{"type":"number","minimum":0},"directConsumption":{"type":"number","minimum":0},"unit":{"enum":["m3"]},"meterNumber":{"type":"string"},"label":{"type":"string"}}},"coldWater":{"type":"object","additionalProperties":false,"properties":{"startReading":{"type":"number","minimum":0},"endReading":{"type":"number","minimum":0},"directConsumption":{"type":"number","minimum":0},"unit":{"enum":["m3"]},"meterNumber":{"type":"string"},"label":{"type":"string"}}}}}}}},"costs":{"type":"object","additionalProperties":false,"properties":{"heatingGas":{"$ref":"#/$defs/cost"},"warmWaterElectricity":{"$ref":"#/$defs/cost"},"warmWaterWater":{"$ref":"#/$defs/cost"},"coldWater":{"$ref":"#/$defs/cost"},"wastewater":{"$ref":"#/$defs/cost"},"baseFees":{"type":"array","items":{"$ref":"#/$defs/allocatedCost"}},"other":{"type":"array","items":{"$ref":"#/$defs/allocatedCost"}}}},"allocation":{"type":"object","required":["heating","warmWaterElectricity"],"additionalProperties":false,"properties":{"heating":{"$ref":"#/$defs/splitRule"},"warmWaterElectricity":{"oneOf":[{"const":"consumption"},{"$ref":"#/$defs/splitRule"}]}}},"combinedSystem":{"type":"object","additionalProperties":false,"properties":{"totalAmount":{"type":"number","minimum":0},"heatingAmount":{"type":"number","minimum":0},"warmWaterAmount":{"type":"number","minimum":0},"heatingPercentage":{"type":"number","minimum":0,"maximum":100},"warmWaterPercentage":{"type":"number","minimum":0,"maximum":100}}},"reviewNotes":{"type":"array","items":{"type":"string"}}},"$defs":{"cost":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string"},"amount":{"type":"number","exclusiveMinimum":0},"quantity":{"type":"number","minimum":0},"unitPrice":{"type":"number","minimum":0},"quantityUnit":{"type":"string"},"aiConfidence":{"type":"number","minimum":0,"maximum":1},"needsReview":{"type":"boolean"}}},"allocatedCost":{"type":"object","required":["label","allocationMode"],"additionalProperties":false,"properties":{"label":{"type":"string"},"amount":{"type":"number","exclusiveMinimum":0},"quantity":{"type":"number","minimum":0},"unitPrice":{"type":"number","minimum":0},"quantityUnit":{"type":"string"},"allocationMode":{"enum":["area","consumption","equal","split_consumption_area","manual"]},"meterType":{"enum":["heat","warm_water","cold_water","total_water"]},"manualAmounts":{"type":"object","additionalProperties":{"type":"number","minimum":0}},"aiConfidence":{"type":"number","minimum":0,"maximum":1},"needsReview":{"type":"boolean"}}},"splitRule":{"type":"object","required":["consumptionPercentage","areaPercentage"],"additionalProperties":false,"properties":{"consumptionPercentage":{"type":"number","minimum":0,"maximum":100},"areaPercentage":{"type":"number","minimum":0,"maximum":100}}}}},"example":{"schemaVersion":"advanced-1.0","source":"chatgpt","billingPeriod":{"from":"2025-01-01","to":"2025-12-31"},"landlord":{"name":"Max Vermieter","address":"Vermieterweg 1, 97070 Würzburg","email":"max@example.com"},"property":{"name":"Beispielhaus","address":"Otto-Hahn-Str. 32, 97080 Würzburg","systemType":"separate"},"units":[{"id":"eg","name":"EG","advancePayments":1200,"livingAreaSqm":80,"meters":{"heat":{"startReading":1000,"endReading":1500,"unit":"kWh"}}},{"id":"og","name":"OG","advancePayments":1000,"livingAreaSqm":60,"meters":{"heat":{"directConsumption":320,"unit":"kWh"}}}],"costs":{"heatingGas":{"amount":1200},"other":[{"label":"Gebäudeversicherung","amount":400,"allocationMode":"area"}]},"allocation":{"heating":{"consumptionPercentage":70,"areaPercentage":30},"warmWaterElectricity":"consumption"}},"validationEndpoint":"https://nebenkostenblitz.de/api/ai-import/validate-advanced","advancedImportUrl":"https://nebenkostenblitz.de/ai-import/advanced","advancedBillingUrl":"https://nebenkostenblitz.de/erweiterte-abrechnung"}