german-ocr-3 / schemas /invoice.json
Keyven's picture
Upload schemas/invoice.json with huggingface_hub
8527a08 verified
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "german-ocr-3/schemas/invoice.json",
"title": "GermanOCR3 Invoice (Rechnung)",
"description": "Schema fuer deutsche Rechnungen. Pflichtangaben gemaess UStG § 14 sind beruecksichtigt; nicht erkennbare Felder bleiben null.",
"type": "object",
"additionalProperties": false,
"required": ["document_type", "language", "invoice_number", "invoice_date", "amount_total", "currency"],
"properties": {
"document_type": {"const": "invoice"},
"language": {"type": "string", "default": "de"},
"invoice_number": {"type": ["string", "null"]},
"invoice_date": {
"description": "Rechnungsdatum YYYY-MM-DD",
"type": ["string", "null"]
},
"delivery_date": {
"description": "Liefer-/Leistungsdatum YYYY-MM-DD",
"type": ["string", "null"]
},
"due_date": {
"description": "Faelligkeitsdatum YYYY-MM-DD",
"type": ["string", "null"]
},
"sender": {
"type": ["object", "null"],
"additionalProperties": false,
"properties": {
"name": {"type": ["string", "null"]},
"address": {"type": ["string", "null"]},
"email": {"type": ["string", "null"]},
"phone": {"type": ["string", "null"]},
"tax_id": {"description": "Steuernummer", "type": ["string", "null"]},
"vat_id": {"description": "USt-IdNr / VAT ID (DE...)", "type": ["string", "null"]},
"iban": {"type": ["string", "null"]},
"bic": {"type": ["string", "null"]},
"bank": {"type": ["string", "null"]}
}
},
"recipient": {
"type": ["object", "null"],
"additionalProperties": false,
"properties": {
"name": {"type": ["string", "null"]},
"address": {"type": ["string", "null"]},
"customer_id": {"type": ["string", "null"]},
"vat_id": {"type": ["string", "null"]}
}
},
"line_items": {
"type": "array",
"default": [],
"items": {
"type": "object",
"additionalProperties": false,
"required": ["description", "amount_net"],
"properties": {
"position": {"type": ["integer", "null"]},
"article_number": {"type": ["string", "null"]},
"description": {"type": "string"},
"quantity": {"type": ["number", "null"]},
"unit": {"type": ["string", "null"]},
"unit_price_net": {"type": ["number", "null"]},
"amount_net": {"type": ["number", "null"]},
"vat_rate": {"description": "Prozent, z.B. 19 oder 7", "type": ["number", "null"]}
}
}
},
"amount_net": {"type": ["number", "null"]},
"amount_vat": {"type": ["number", "null"]},
"amount_total": {"type": ["number", "null"]},
"currency": {
"type": ["string", "null"],
"description": "ISO-4217, typisch EUR"
},
"vat_breakdown": {
"type": "array",
"default": [],
"items": {
"type": "object",
"additionalProperties": false,
"required": ["rate", "net", "vat"],
"properties": {
"rate": {"type": "number"},
"net": {"type": "number"},
"vat": {"type": "number"}
}
}
},
"payment_terms": {"type": ["string", "null"]},
"notes": {"type": "array", "items": {"type": "string"}, "default": []},
"raw_text": {"type": ["string", "null"]},
"confidence": {"type": ["number", "null"], "minimum": 0, "maximum": 1}
}
}