DATEV Integration
DATEV can automatically import ZUGFeRD invoices (PDF/A-3 with embedded CII XML) and post them to accounting. thelawin.dev generates exactly this format.
Why ZUGFeRD for DATEV?
DATEV Unternehmen online reads ZUGFeRD PDFs and pulls in the invoice data, so nobody has to type in numbers manually. Invoice number, amounts, VAT IDs, line items -- all imported. The PDF itself doubles as the visual receipt. Your Steuerberater (tax advisor) can process them in DATEV without any extra steps.
Recommended Format
For maximum DATEV compatibility:
json
{
"format": "zugferd",
"profile": "en16931",
"template": "classic",
"locale": "de",
"invoice": {
"number": "RE-2026-001",
"date": "2026-01-15",
"due_date": "2026-02-14",
"currency": "EUR",
"seller": {
"name": "Mustermann GmbH",
"street": "Musterstrasse 1",
"city": "Berlin",
"postal_code": "10115",
"country": "DE",
"vat_id": "DE123456789",
"email": "info@mustermann.de"
},
"buyer": {
"name": "Beispiel AG",
"street": "Beispielweg 42",
"city": "Muenchen",
"postal_code": "80331",
"country": "DE",
"vat_id": "DE987654321"
},
"items": [
{
"description": "Beratungsleistung IT-Infrastruktur",
"quantity": 8,
"unit": "HUR",
"unit_price": 150.00,
"vat_rate": 19
},
{
"description": "Software-Lizenz (jaehrlich)",
"quantity": 1,
"unit": "C62",
"unit_price": 499.00,
"vat_rate": 19
}
],
"payment": {
"iban": "DE89370400440532013000",
"bic": "COBADEFFXXX",
"terms": "Zahlbar innerhalb 30 Tagen netto"
}
}
}Important for DATEV
- Use profile
en16931(notminimumorbasic) - Include VAT IDs for both seller and buyer (when available)
- Fill in payment details (IBAN, payment terms) completely
- Use correct unit codes (HUR = hour, C62 = piece, DAY = day)
Profiles and DATEV Compatibility
| Profile | DATEV Import | Data Included |
|---|---|---|
minimum | Limited | Basic totals and dates only |
basic | Good | Line items without full detail |
en16931 | Recommended | Full line items, VAT, payment info |
extended | Complete | All fields including extras |
Workflow: ERP → thelawin.dev → DATEV
Your ERP/CRM → Invoice data as JSON
→ POST api.thelawin.dev/v1/generate
→ ZUGFeRD PDF (PDF/A-3 + CII XML)
→ Upload to DATEV Unternehmen online
→ Tax advisor posts entries automaticallycurl Example
bash
curl -s -X POST https://api.thelawin.dev/v1/generate \
-H "Content-Type: application/json" \
-H "X-API-Key: env_sandbox_demo" \
-d @rechnung.json \
| jq -r '.pdf_base64' | base64 -d > RE-2026-001.pdfValidate Before DATEV Import
Use /v1/validate to check that the invoice is DATEV-compatible:
bash
curl -s -X POST https://api.thelawin.dev/v1/validate \
-H "Content-Type: application/json" \
-H "X-API-Key: env_sandbox_demo" \
-d @rechnung.json | jq '.valid, .errors'Next Steps
- lexoffice Guide | Cloud accounting
- Invoice Formats | ZUGFeRD profiles in detail
- n8n Guide | Automate invoice generation