finisma – ZUGFeRD e-invoices
Verify ZUGFeRD/Factur-X e-invoices, convert PDF invoices to ZUGFeRD, check VAT IDs and Peppol.
¿Debería usar esto?
Calidad y seguridad
Hallazgos (2)
- LOWen verify_zugferd
- LOWen check_vat_id
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"finisma": {
"url": "https://finisma.de/api/mcp"
}
}
}Puntos de conexión remotos
https://finisma.de/api/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (6)
🟢verify_zugferd(pdf_base64, upload_id)
Prüft eine ZUGFeRD-/Factur-X-PDF: Struktur, EN-16931-Regeln, PDF/A-3-Anhänge.
Esquema de entrada
{
"type": "object",
"properties": {
"pdf_base64": {
"type": "string",
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die zu prüfende PDF-Datei, Base64-kodiert (max. 25 MB). Alternativ 'upload_id' angeben. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf."
},
"upload_id": {
"type": "string",
"description": "Referenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Genau eines von beiden angeben."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"structure": {
"type": "object",
"description": "Strukturelle Prüfung der PDF (ohne die eingebettete XML).",
"properties": {
"file": {
"type": "object",
"properties": {
"present": {
"type": "boolean"
},
"bytes": {
"type": "integer"
},
"isPdf": {
"type": "boolean"
},
"pdfVersion": {
"type": [
"string",
"null"
]
}
}
},
"zugferd": {
"type": "object",
"properties": {
"embeddedFiles": {
"type": "boolean"
},
"facturXFilename": {
"type": "boolean"
},
"associatedFile": {
"type": "boolean"
},
"pdfAPart": {
"type": [
"string",
"null"
],
"description": "z. B. \"3\" für PDF/A-3."
},
"pdfAConformance": {
"type": [
"string",
"null"
],
"description": "z. B. \"B\", \"U\"."
},
"facturXMetadata": {
"type": "boolean"
},
"xmlEmbedded": {
"type": "boolean"
},
"xmlMatchesGenerated": {
"type": [
"boolean",
"null"
]
}
}
}
}
},
"en16931": {
"type": [
"object",
"null"
],
"description": "EN-16931-Prüfung; null, wenn keine XML eingebettet war.",
"properties": {
"checked": {
"type": "boolean"
},
"errorCount": {
"type": "integer"
},
"warningCount": {
"type": "integer"
},
"profile": {
"type": "string"
},
"findings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "z. B. \"BR-CO-25\"."
},
"message": {
"type": "string"
},
"severity": {
"type": "string",
"enum": [
"error",
"warning"
]
},
"location": {
"type": "string"
},
"source": {
"type": "string",
"enum": [
"schematron",
"supplementary"
]
}
},
"required": [
"code",
"message",
"severity",
"source"
]
}
}
}
},
"pdfa3": {
"type": [
"object",
"null"
],
"description": "PDF/A-3-Anbindung der eingebetteten Dateien (ISO 19005-3 §6.8).",
"properties": {
"hasAfArray": {
"type": "boolean"
},
"allOk": {
"type": "boolean"
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"filename": {
"type": "string"
},
"afRelationship": {
"type": [
"string",
"null"
]
},
"associated": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"ok",
"warning",
"error"
]
},
"message": {
"type": "string"
}
}
}
}
}
},
"attachments": {
"type": "array",
"description": "Im CII referenzierte Anhänge (BT-125).",
"items": {
"type": "object",
"properties": {
"filename": {
"type": "string"
},
"mimeCode": {
"type": "string"
},
"sizeBytes": {
"type": "integer"
}
}
}
},
"authoritative": {
"type": "object",
"description": "Autoritative Prüfung: PDF/A-Konformität (ISO 19005-3), XML-Syntax (XSD) und Geschäftsregeln des erkannten Profils. available=false, wenn der Validator-Service nicht erreichbar war; das Ergebnis basiert dann nur auf der Schnellprüfung.",
"properties": {
"available": {
"type": "boolean"
},
"profile": {
"type": "string"
},
"verdict": {
"type": "string",
"enum": [
"valid",
"valid_with_warnings",
"invalid"
]
},
"errorCount": {
"type": "integer"
},
"warningCount": {
"type": "integer"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"findings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"severity": {
"type": "string",
"enum": [
"error",
"warning",
"info"
]
},
"message": {
"type": "string"
},
"location": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string",
"description": "xsd | schematron | pdfa | structure"
},
"ruleset": {
"type": "string"
},
"engine": {
"type": "string"
}
},
"required": [
"code",
"severity",
"message",
"source"
]
}
},
"note": {
"type": "string"
}
},
"required": [
"available"
]
}
},
"required": [
"structure",
"attachments",
"authoritative"
]
}🟡create_zugferd(pdf_base64, upload_id, invoice, attachments, filename)
Erzeugt eine ZUGFeRD-PDF aus visueller PDF und strukturierten EN-16931-Daten (kein LLM). Verletzen die Daten EN-16931-Geschäftsregeln, liefert der Remote-Kanal (Chat-Connector) strukturierte Issues statt einer Datei zurück — invoice korrigieren (siehe extract_invoice) und mit denselben Quelldaten (upload_id/pdf_base64) erneut aufrufen. Ohne aktives Abo kostenlos mit Konto (API-Key): die PDF trägt dann das finisma-Prüfsiegel als Wasserzeichen, standardmäßig bis zu 5 Rechnungen pro Tag; mit Abo ohne Wasserzeichen und ohne Tageslimit. Rabatte und Zuschläge je Position (lines[].allowanceCharges) dürfen als Prozentsatz ohne Betrag kommen: amount = round2(Menge × unitPriceNet × percent / 100); ebenso auf die ganze Rechnung (allowanceCharges): Grundbetrag ohne Angabe ist die Summe der lineNetAmount mit ratePercent. lineNetAmount, vatBreakdown und die Summen muss der Aufrufer mit diesen Beträgen rechnen. Für öffentliche Auftraggeber erzeugt invoice.profile='xrechnung' eine XRechnung 3.0 (nur als reines XML über die REST-API mit format=xml; Pflichten: Leitweg-ID in buyerReference, Verkäufer-Kontakt mit Telefon und E-Mail, payment, electronicAddress beider Parteien).
Esquema de entrada
{
"type": "object",
"properties": {
"pdf_base64": {
"type": "string",
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die visuelle Rechnungs-PDF, Base64-kodiert (max. 25 MB). In sie wird das CII-XML eingebettet. Alternativ 'upload_id' angeben. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf."
},
"upload_id": {
"type": "string",
"description": "Referenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Genau eines von beiden angeben."
},
"invoice": {
"description": "Strukturierte Rechnungsdaten nach EN 16931 (wird gegen Schema und Geschäftsregeln geprüft).",
"type": "object",
"properties": {
"invoiceNumber": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"profile": {
"type": "string",
"enum": [
"en16931",
"xrechnung"
],
"default": "en16931"
},
"documentTypeCode": {
"type": "string",
"default": "380"
},
"precedingInvoiceNumber": {
"type": "string",
"maxLength": 60
},
"precedingInvoiceDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"issueDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"dueDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"deliveryDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"deliveryCountryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"delivery": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"city": {
"type": "string",
"maxLength": 100
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"default": "EUR"
},
"buyerReference": {
"type": "string",
"maxLength": 80
},
"costCenter": {
"type": "string",
"maxLength": 60
},
"purchaseOrderReference": {
"type": "string",
"maxLength": 60
},
"contractReference": {
"type": "string",
"maxLength": 200
},
"invoicingPeriod": {
"type": "object",
"properties": {
"start": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"additionalProperties": false
},
"projectReference": {
"type": "string",
"maxLength": 200
},
"despatchAdviceRef": {
"type": "string",
"maxLength": 200
},
"receivingAdviceRef": {
"type": "string",
"maxLength": 200
},
"allowanceCharges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"charge": {
"type": "boolean",
"description": "true = Zuschlag (BG-21), false = Abzug/Nachlass (BG-20)."
},
"amount": {
"type": "number",
"minimum": 0,
"description": "BT-92/BT-99: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100)."
},
"basisAmount": {
"type": "number",
"description": "BT-93/BT-100: Grundbetrag des Prozentsatzes. Ohne Angabe die Summe der lineNetAmount aller Positionen mit ratePercent (bei gemischten Kategorien desselben Satzes nur die mit categoryCode)."
},
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "BT-94/BT-101: Prozentsatz, z. B. 2 für 2 % Nachlass."
},
"categoryCode": {
"type": "string",
"maxLength": 12,
"default": "S"
},
"ratePercent": {
"type": "number",
"description": "BT-96/BT-103: Steuersatz in Prozent. Darf beim Prozent-Eintrag ohne basisAmount fehlen, wenn alle Positionen denselben Satz haben."
},
"reason": {
"type": "string",
"maxLength": 200
},
"reasonCode": {
"type": "string",
"maxLength": 10
}
},
"required": [
"charge"
],
"additionalProperties": false
},
"maxItems": 50
},
"seller": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vatId": {
"type": "string",
"maxLength": 20
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60,
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht."
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"default": "DE"
}
},
"additionalProperties": false,
"default": {}
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 150
},
"email": {
"type": "string",
"maxLength": 150
},
"phone": {
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false
},
"electronicAddress": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scheme": {
"type": "string",
"maxLength": 10,
"default": "EM"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"name"
],
"additionalProperties": false
},
"buyer": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vatId": {
"type": "string",
"maxLength": 20
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60,
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht."
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"default": "DE"
}
},
"additionalProperties": false,
"default": {}
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 150
},
"email": {
"type": "string",
"maxLength": 150
},
"phone": {
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false
},
"electronicAddress": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scheme": {
"type": "string",
"maxLength": 10,
"default": "EM"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"name"
],
"additionalProperties": false
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"quantity": {
"type": "number"
},
"unitCode": {
"type": "string",
"maxLength": 12,
"default": "C62"
},
"sellerArticleId": {
"type": "string",
"maxLength": 200
},
"buyerArticleId": {
"type": "string",
"maxLength": 200
},
"globalArticleId": {
"type": "string",
"maxLength": 60
},
"globalArticleScheme": {
"type": "string",
"maxLength": 10,
"pattern": "^[0-9A-Za-z]+$"
},
"unitPriceNet": {
"type": "number"
},
"vatRatePercent": {
"type": "number"
},
"categoryCode": {
"type": "string",
"maxLength": 12
},
"allowanceCharges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"charge": {
"type": "boolean",
"description": "true = Zuschlag (BG-28), false = Abzug/Rabatt (BG-27)."
},
"amount": {
"type": "number",
"minimum": 0,
"description": "BT-136/BT-141: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100)."
},
"basisAmount": {
"type": "number",
"description": "BT-137/BT-142: Grundbetrag des Prozentsatzes. Ohne Angabe Menge × unitPriceNet der Position (je Eintrag, nicht gestaffelt)."
},
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "BT-138/BT-143: Prozentsatz, z. B. 10 für 10 % Rabatt."
},
"reason": {
"type": "string",
"maxLength": 200
},
"reasonCode": {
"type": "string",
"maxLength": 10
}
},
"required": [
"charge"
],
"additionalProperties": false
},
"maxItems": 10
},
"lineNetAmount": {
"type": "number"
}
},
"required": [
"name",
"quantity",
"unitPriceNet",
"vatRatePercent",
"lineNetAmount"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ratePercent": {
"type": "number"
},
"basisAmount": {
"type": "number"
},
"taxAmount": {
"type": "number"
},
"categoryCode": {
"type": "string",
"maxLength": 12,
"default": "S"
},
"exemptionReason": {
"type": "string",
"maxLength": 500
},
"exemptionReasonCode": {
"type": "string",
"maxLength": 30
}
},
"required": [
"ratePercent",
"basisAmount",
"taxAmount"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50
},
"totalNet": {
"type": "number"
},
"totalVat": {
"type": "number"
},
"totalGross": {
"type": "number"
},
"paidAmount": {
"type": "number",
"minimum": 0
},
"notes": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 1000
},
"subjectCode": {
"type": "string"
}
},
"required": [
"text"
],
"additionalProperties": false
}
]
},
"maxItems": 20
},
"taxCurrencyCode": {
"type": "string",
"minLength": 3,
"maxLength": 3
},
"totalVatInTaxCurrency": {
"type": "number"
},
"payee": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60
}
},
"required": [
"name"
],
"additionalProperties": false
},
"payment": {
"type": "object",
"properties": {
"terms": {
"type": "string",
"maxLength": 1000
},
"iban": {
"type": "string",
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$"
},
"bic": {
"type": "string",
"maxLength": 15,
"pattern": "^[A-Za-z0-9 ]*$"
},
"reference": {
"type": "string",
"maxLength": 140
},
"meansCode": {
"type": "string"
},
"mandateId": {
"type": "string",
"maxLength": 35
},
"creditorId": {
"type": "string",
"maxLength": 35
},
"debitedIban": {
"type": "string",
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$"
},
"accountName": {
"type": "string",
"maxLength": 200
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"discountDays": {
"type": "integer",
"minimum": 0,
"maximum": 999
}
},
"additionalProperties": false
}
},
"required": [
"invoiceNumber",
"issueDate",
"seller",
"buyer",
"lines",
"vatBreakdown",
"totalNet",
"totalVat",
"totalGross"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
},
"attachments": {
"type": "array",
"description": "Optionale Anhänge (z. B. Stundennachweise). Erlaubt: PDF, PNG, JPEG, CSV, XLSX, ODS, XML; je max. 10 MB.",
"items": {
"type": "object",
"properties": {
"filename": {
"type": "string"
},
"mime_type": {
"type": "string",
"description": "Optional; wird sonst aus der Dateiendung abgeleitet."
},
"description": {
"type": "string",
"description": "Optionale Beschreibung der rechnungsbegründenden Unterlage (BT-123), z. B. \"Stundennachweis März 2026\". Ohne Angabe steht dort der Dateiname."
},
"data_base64": {
"type": "string",
"contentEncoding": "base64",
"description": "Dateiinhalt, Base64-kodiert (max. 10 MB)."
}
},
"required": [
"filename",
"data_base64"
],
"additionalProperties": false
}
},
"filename": {
"type": "string",
"description": "Dateiname der erzeugten Rechnung (Standard: invoice.pdf)."
}
},
"required": [
"invoice"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"pdf_base64": {
"type": "string",
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die erzeugte ZUGFeRD-Rechnung (PDF/A-3 mit eingebettetem CII-XML). Nur gesetzt, wenn die Eingabe als 'pdf_base64' kam; wurde 'upload_id' verwendet, steht stattdessen download_url im Ergebnis."
},
"download_url": {
"type": "string",
"description": "Kurzlebiger Download-Link zur erzeugten PDF. Nur gesetzt, wenn die Eingabe als 'upload_id' kam (Chat-Client-Fallback)."
},
"expires_at": {
"type": "string",
"description": "ISO-8601-Zeitpunkt, ab dem download_url verfällt (nur mit download_url gesetzt)."
},
"bytes": {
"type": "integer",
"description": "Größe der erzeugten PDF in Bytes."
},
"watermarked": {
"type": "boolean",
"description": "true, wenn die PDF aus dem kostenlosen Tageskontingent stammt und das finisma-Prüfsiegel als Wasserzeichen trägt (Aufruf ohne aktives Abo)."
},
"issues": {
"type": "array",
"description": "Nur gesetzt, wenn die übergebenen Rechnungsdaten EN-16931-Geschäftsregeln verletzen: es wurde keine Datei erzeugt (Korrekturschleife, T20). Felder anhand der Issues korrigieren und create_zugferd mit denselben Quelldaten (upload_id/pdf_base64) und dem korrigierten invoice erneut aufrufen.",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Maschinencode, z. B. \"BR-CO-26\" oder \"EXTRACTION_UNCERTAIN\"."
},
"path": {
"type": "string",
"description": "Punkt-Pfad ins Invoice-Objekt, z. B. \"seller.vatId\"."
},
"message": {
"type": "string",
"description": "Deutsche Fehlermeldung."
},
"severity": {
"type": "string",
"enum": [
"error",
"warning"
]
}
},
"required": [
"code",
"message",
"severity"
]
}
}
},
"required": [],
"additionalProperties": false
}🟡request_upload_link
Erzeugt einen kurzlebigen Upload-Link für eine PDF-Rechnung. Nötig für Chat-Clients (ChatGPT, Claude), die eine angehängte Datei nicht zuverlässig als pdf_base64 an ein Tool übergeben können. Zwei Wege: Der Nutzer lädt die PDF über upload_url im Browser hoch, ODER der Client mit Shell und Netzzugriff lädt sie selbst hoch, per POST als Multipart-Feld 'file' an upload_api_url (curl -F "[email protected]"). Für den direkten Weg muss die Domain finisma.de erreichbar sein; in Claude-Umgebungen mit Netz-Sandbox heißt das, finisma.de in der Domain-Allowlist einzutragen. Die zurückgegebene upload_id kann danach bei create_zugferd/verify_zugferd anstelle von pdf_base64 verwendet werden.
Esquema de entrada
{
"type": "object",
"properties": {},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"upload_id": {
"type": "string",
"description": "An create_zugferd/verify_zugferd als 'upload_id' übergeben."
},
"upload_url": {
"type": "string",
"description": "Dem Nutzer zum Öffnen im Browser geben, dort die PDF hochladen."
},
"upload_api_url": {
"type": "string",
"description": "Direkter Upload-Endpunkt für Clients mit Netzzugriff auf finisma.de: die PDF per POST als Multipart-Feld 'file' hierher senden, dann entfällt der Browser-Schritt."
},
"expires_at": {
"type": "string",
"description": "ISO-8601-Zeitpunkt, ab dem der Link verfällt."
}
},
"required": [
"upload_id",
"upload_url",
"upload_api_url",
"expires_at"
],
"additionalProperties": false
}🟡extract_invoice(pdf_base64, upload_id)
Extrahiert EN-16931-Rechnungsdaten aus einer hochgeladenen PDF (Formularfelder) plus Validierungs-Issues, als Korrekturschritt vor create_zugferd: Felder und Issues dem Nutzer zeigen, korrigieren lassen, danach create_zugferd mit dem korrigierten invoice und derselben upload_id aufrufen. Unsichere Felder stehen als Platzhalter 'KORRIGIEREN' (Text) bzw. '1900-01-01' (Datum) drin und werden als Issue mit Code EXTRACTION_UNCERTAIN gemeldet — diese Felder müssen vor create_zugferd korrigiert werden. Enthält die PDF bereits eine eingebettete E-Rechnung (ZUGFeRD/Factur-X), kommen die Felder deterministisch aus der XML (source='xml') statt aus einer Sprachmodell-Lesung des Druckbilds. Erfordert ein Konto mit aktivem Abo oder Guthaben.
Esquema de entrada
{
"type": "object",
"properties": {
"pdf_base64": {
"type": "string",
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die zu extrahierende PDF-Rechnung, Base64-kodiert (max. 25 MB). Alternativ 'upload_id' angeben. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf."
},
"upload_id": {
"type": "string",
"description": "Referenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Genau eines von beiden angeben. Wird im Ergebnis erneut zurückgegeben und kann anschließend bei create_zugferd als 'upload_id' verwendet werden, damit dieselbe Quell-PDF eingebettet wird."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"invoice": {
"description": "Extrahierte EN-16931-Rechnungsdaten (Formularfelder). Vor create_zugferd prüfen und korrigieren, insbesondere Felder mit dem Wert 'KORRIGIEREN' bzw. '1900-01-01'.",
"type": "object",
"properties": {
"invoiceNumber": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"profile": {
"type": "string",
"enum": [
"en16931",
"xrechnung"
],
"default": "en16931"
},
"documentTypeCode": {
"type": "string",
"default": "380"
},
"precedingInvoiceNumber": {
"type": "string",
"maxLength": 60
},
"precedingInvoiceDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"issueDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"dueDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"deliveryDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"deliveryCountryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"delivery": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"city": {
"type": "string",
"maxLength": 100
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"default": "EUR"
},
"buyerReference": {
"type": "string",
"maxLength": 80
},
"costCenter": {
"type": "string",
"maxLength": 60
},
"purchaseOrderReference": {
"type": "string",
"maxLength": 60
},
"contractReference": {
"type": "string",
"maxLength": 200
},
"invoicingPeriod": {
"type": "object",
"properties": {
"start": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"additionalProperties": false
},
"projectReference": {
"type": "string",
"maxLength": 200
},
"despatchAdviceRef": {
"type": "string",
"maxLength": 200
},
"receivingAdviceRef": {
"type": "string",
"maxLength": 200
},
"allowanceCharges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"charge": {
"type": "boolean",
"description": "true = Zuschlag (BG-21), false = Abzug/Nachlass (BG-20)."
},
"amount": {
"type": "number",
"minimum": 0,
"description": "BT-92/BT-99: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100)."
},
"basisAmount": {
"type": "number",
"description": "BT-93/BT-100: Grundbetrag des Prozentsatzes. Ohne Angabe die Summe der lineNetAmount aller Positionen mit ratePercent (bei gemischten Kategorien desselben Satzes nur die mit categoryCode)."
},
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "BT-94/BT-101: Prozentsatz, z. B. 2 für 2 % Nachlass."
},
"categoryCode": {
"type": "string",
"maxLength": 12,
"default": "S"
},
"ratePercent": {
"type": "number",
"description": "BT-96/BT-103: Steuersatz in Prozent. Darf beim Prozent-Eintrag ohne basisAmount fehlen, wenn alle Positionen denselben Satz haben."
},
"reason": {
"type": "string",
"maxLength": 200
},
"reasonCode": {
"type": "string",
"maxLength": 10
}
},
"required": [
"charge"
],
"additionalProperties": false
},
"maxItems": 50
},
"seller": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vatId": {
"type": "string",
"maxLength": 20
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60,
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht."
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"default": "DE"
}
},
"additionalProperties": false,
"default": {}
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 150
},
"email": {
"type": "string",
"maxLength": 150
},
"phone": {
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false
},
"electronicAddress": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scheme": {
"type": "string",
"maxLength": 10,
"default": "EM"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"name"
],
"additionalProperties": false
},
"buyer": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vatId": {
"type": "string",
"maxLength": 20
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60,
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht."
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"default": "DE"
}
},
"additionalProperties": false,
"default": {}
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 150
},
"email": {
"type": "string",
"maxLength": 150
},
"phone": {
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false
},
"electronicAddress": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scheme": {
"type": "string",
"maxLength": 10,
"default": "EM"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"name"
],
"additionalProperties": false
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"quantity": {
"type": "number"
},
"unitCode": {
"type": "string",
"maxLength": 12,
"default": "C62"
},
"sellerArticleId": {
"type": "string",
"maxLength": 200
},
"buyerArticleId": {
"type": "string",
"maxLength": 200
},
"globalArticleId": {
"type": "string",
"maxLength": 60
},
"globalArticleScheme": {
"type": "string",
"maxLength": 10,
"pattern": "^[0-9A-Za-z]+$"
},
"unitPriceNet": {
"type": "number"
},
"vatRatePercent": {
"type": "number"
},
"categoryCode": {
"type": "string",
"maxLength": 12
},
"allowanceCharges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"charge": {
"type": "boolean",
"description": "true = Zuschlag (BG-28), false = Abzug/Rabatt (BG-27)."
},
"amount": {
"type": "number",
"minimum": 0,
"description": "BT-136/BT-141: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100)."
},
"basisAmount": {
"type": "number",
"description": "BT-137/BT-142: Grundbetrag des Prozentsatzes. Ohne Angabe Menge × unitPriceNet der Position (je Eintrag, nicht gestaffelt)."
},
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "BT-138/BT-143: Prozentsatz, z. B. 10 für 10 % Rabatt."
},
"reason": {
"type": "string",
"maxLength": 200
},
"reasonCode": {
"type": "string",
"maxLength": 10
}
},
"required": [
"charge"
],
"additionalProperties": false
},
"maxItems": 10
},
"lineNetAmount": {
"type": "number"
}
},
"required": [
"name",
"quantity",
"unitPriceNet",
"vatRatePercent",
"lineNetAmount"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ratePercent": {
"type": "number"
},
"basisAmount": {
"type": "number"
},
"taxAmount": {
"type": "number"
},
"categoryCode": {
"type": "string",
"maxLength": 12,
"default": "S"
},
"exemptionReason": {
"type": "string",
"maxLength": 500
},
"exemptionReasonCode": {
"type": "string",
"maxLength": 30
}
},
"required": [
"ratePercent",
"basisAmount",
"taxAmount"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50
},
"totalNet": {
"type": "number"
},
"totalVat": {
"type": "number"
},
"totalGross": {
"type": "number"
},
"paidAmount": {
"type": "number",
"minimum": 0
},
"notes": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 1000
},
"subjectCode": {
"type": "string"
}
},
"required": [
"text"
],
"additionalProperties": false
}
]
},
"maxItems": 20
},
"taxCurrencyCode": {
"type": "string",
"minLength": 3,
"maxLength": 3
},
"totalVatInTaxCurrency": {
"type": "number"
},
"payee": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60
}
},
"required": [
"name"
],
"additionalProperties": false
},
"payment": {
"type": "object",
"properties": {
"terms": {
"type": "string",
"maxLength": 1000
},
"iban": {
"type": "string",
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$"
},
"bic": {
"type": "string",
"maxLength": 15,
"pattern": "^[A-Za-z0-9 ]*$"
},
"reference": {
"type": "string",
"maxLength": 140
},
"meansCode": {
"type": "string"
},
"mandateId": {
"type": "string",
"maxLength": 35
},
"creditorId": {
"type": "string",
"maxLength": 35
},
"debitedIban": {
"type": "string",
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$"
},
"accountName": {
"type": "string",
"maxLength": 200
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"discountDays": {
"type": "integer",
"minimum": 0,
"maximum": 999
}
},
"additionalProperties": false
}
},
"required": [
"invoiceNumber",
"issueDate",
"seller",
"buyer",
"lines",
"vatBreakdown",
"totalNet",
"totalVat",
"totalGross"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
},
"validation_issues": {
"type": "array",
"description": "Offene Probleme der extrahierten Daten. severity='error' blockiert create_zugferd (dort wird dieselbe Prüfung erneut ausgeführt), 'warning' nicht.",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Maschinencode, z. B. \"BR-CO-26\" oder \"EXTRACTION_UNCERTAIN\"."
},
"path": {
"type": "string",
"description": "Punkt-Pfad ins Invoice-Objekt, z. B. \"seller.vatId\"."
},
"message": {
"type": "string",
"description": "Deutsche Fehlermeldung."
},
"severity": {
"type": "string",
"enum": [
"error",
"warning"
]
}
},
"required": [
"code",
"message",
"severity"
]
}
},
"upload_id": {
"type": "string",
"description": "Bei create_zugferd als 'upload_id' übergeben, damit dieselbe Quell-PDF eingebettet wird."
},
"expires_at": {
"type": "string",
"description": "ISO-8601-Zeitpunkt, ab dem upload_id verfällt. Danach erneut request_upload_link und extract_invoice aufrufen."
},
"source": {
"type": "string",
"enum": [
"xml",
"llm"
],
"description": "Herkunft der Felder: 'xml' = deterministisch aus der in der PDF eingebetteten E-Rechnung übernommen, 'llm' = per Sprachmodell aus dem Druckbild extrahiert."
}
},
"required": [
"invoice",
"validation_issues",
"upload_id",
"expires_at",
"source"
],
"additionalProperties": false
}🟢check_vat_id(vat_id)
Prüft eine USt-IdNr. live gegen VIES (EU-Bestätigungsverfahren): Gültigkeit plus Firmenname, sofern der Mitgliedsstaat ihn herausgibt. Antwort-Status ist valid, invalid oder unavailable (VIES nicht erreichbar — keine Aussage). Kostenlos.
Esquema de entrada
{
"type": "object",
"properties": {
"vat_id": {
"type": "string",
"description": "Die zu prüfende USt-IdNr. mit Länderpräfix, z. B. \"DE325821677\" oder \"ATU12345675\". Leerzeichen, Punkte und Bindestriche werden toleriert."
}
},
"required": [
"vat_id"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"vatId": {
"type": "string",
"description": "normalisierte Nummer, wie geprüft wurde"
},
"countryCode": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"valid",
"invalid",
"unavailable"
]
},
"name": {
"type": [
"string",
"null"
],
"description": "Firmenname laut Mitgliedsstaat, oft nicht herausgegeben"
},
"checkedAt": {
"type": "string",
"description": "Zeitpunkt der echten Prüfung (ISO 8601)"
},
"cached": {
"type": "boolean"
}
},
"required": [
"vatId",
"countryCode",
"status",
"checkedAt",
"cached"
]
}🟢check_peppol_participant(participant)
Prüft per SML/SMP-Lookup, ob ein Geschäftspartner im Peppol-Netz erreichbar ist, und listet seine registrierten Dokumenttypen. Akzeptiert eine volle Kennung ("0088:4399901550926"), eine nackte GLN, eine deutsche USt-IdNr. oder eine Leitweg-ID. registered:false ist ein normales Ergebnis, kein Fehler. Kostenlos.
Esquema de entrada
{
"type": "object",
"properties": {
"participant": {
"type": "string",
"description": "Kennung des Partners: volle Peppol-Kennung (\"0088:4399901550926\"), nackte GLN, deutsche USt-IdNr. (\"DE123456789\") oder Leitweg-ID (\"991-33333TEST-33\")."
}
},
"required": [
"participant"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"input": {
"type": "string"
},
"participantId": {
"type": "string",
"description": "volle Kennung inkl. Meta-Schema, z. B. \"iso6523-actorid-upis::0088:4399901550926\""
},
"scheme": {
"type": "string"
},
"value": {
"type": "string"
},
"registered": {
"type": "boolean"
},
"documentTypes": {
"type": "array",
"items": {
"type": "string"
},
"description": "registrierte Dokumenttypen laut SMP (leer bei registered:false)"
},
"name": {
"type": [
"string",
"null"
],
"description": "Name laut Peppol Directory, falls gelistet"
},
"countryCode": {
"type": [
"string",
"null"
]
},
"checkedAt": {
"type": "string",
"description": "Zeitpunkt der echten Prüfung (ISO 8601)"
},
"cached": {
"type": "boolean"
}
},
"required": [
"input",
"participantId",
"scheme",
"value",
"registered",
"documentTypes",
"checkedAt",
"cached"
]
}Comunidad
Evidencia