# German DATEV EXTF v700 Validator & Auto-Fixer (`agos/de-datev-extf-validator`) Actor

Validate & deterministically auto-fix German DATEV EXTF v700 Buchungsstapel CSV files by AGOS. Checks 22+ header fields, 125 columns, comma-decimals, DDMM dates, SKR03/SKR04 Automatikkonto REW92277 BU-Schluessel conflicts & outputs fixedCsv.

- **URL**: https://apify.com/agos/de-datev-extf-validator.md
- **Developed by:** [Applied General Operations & Systems](https://apify.com/agos) (community)
- **Categories:** Business, AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $250.00 / 1,000 datev extf files validated

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## German DATEV EXTF v700 Validator & Auto-Fixer

Validate and deterministically auto-repair German **DATEV EXTF v700 (Formatversion 12 / 13) Buchungsstapel** CSV exports before importing into *DATEV Kanzlei-Rechnungswesen* or *DATEV Unternehmen online* — in a single deterministic **Pay-Per-Event Apify Actor** built by **AGOS**.

Built for German *Steuerberater*, ERP/SaaS accounting exporters (Lexoffice, sevDesk, Odoo, Stripe-to-DATEV pipelines, SAP, NetSuite), and AI agents (**Apify MCP-ready**).

***

### What This Actor Checks & Auto-Repairs

- **DATEV EXTF v700 Header Validation (22+ Fields)**: Verifies `EXTF` identifier, Formatversion `700`, Data Category `21` (`Buchungsstapel`), version `12`/`13`, `Beraternummer`, `Mandantennummer`, `WJ-Beginn`, `Sachkontenlänge` (4–8), `Datum von` / `Datum bis`, currency, and `Sachkontenrahmen` (`03` / `04`).
- **125-Column Buchungsstapel Framing**: Validates semicolon separation, quoting, required fields (`Umsatz`, `Soll/Haben-Kz`, `Konto`, `Gegenkonto`, `Belegdatum`), and field length constraints (`Belegfeld 1/2`, `Buchungstext`).
- **`REW92277` SKR03 / SKR04 Automatikkonto Conflict Detection**: Flags illegal `BU-Schlüssel` combinations on built-in `SKR03` and `SKR04` *Automatikkonten* (e.g. passing BU `9` on SKR03 account `8400` instead of omitting BU or explicitly overriding with BU `40`).
- **German Decimal & `DDMM` Date Rules**: Detects dot-decimals (`1190.00` instead of `1190,00`), leap-year errors, and *abweichendes Wirtschaftsjahr* fiscal-year date resolution.
- **Deterministic Auto-Fix (`autoFix: true`)**: Returns a clean, import-ready `fixedCsv` alongside an itemized `fixesApplied` log (normalizing decimal commas, ISO dates to `DDMM`, CRLF line endings, and header quoting).
- **Provenance & `regulatoryAssessment`**: Every Dataset item includes `rulesetVersion: "datev-extf-700-2026.1"`, `jurisdiction: "DE"`, `rew92277Conflicts`, and standardized `regulatoryAssessment`.

***

### Pay-Per-Event Pricing

Pay strictly per validated DATEV EXTF file — zero subscription, runs on **256 MB RAM**, with batch support up to **20 files per run**.

| Billing Event | Unit Price (USD) | Description |
|---|---|---|
| `actor-start` | **$0.01** / run | Flat one-time fee charged once per Actor run |
| `datev-file-validated` | **$0.25** / file | Charged per validated (and optionally auto-fixed) DATEV EXTF file (primary event) |

> Malformed batch items missing `csvContent` are **never charged**.

***

### Example Input (Single File with Auto-Fix)

```json
{
  "fileName": "EXTF_Buchungsstapel_202503.csv",
  "chartOfAccounts": "SKR03",
  "autoFix": true,
  "csvContent": "\"EXTF\";700;21;\"Buchungsstapel\";13;20250331142500000;;\"AG\";\"AGOS\";;29098;55003;20250101;4;20250301;20250331;\"Maerz 2025 FiBu\";\"AG\";1;0;0;\"EUR\";;;;\"\";\"03\";;;;\"AGOS-EXTF\"\r\nUmsatz (ohne Soll/Haben-Kz);Soll/Haben-Kz;WKZ Umsatz;Kurs;Basis-Umsatz;WKZ Basis-Umsatz;Konto;Gegenkonto (ohne BU-Schlüssel);BU-Schlüssel;Belegdatum;Belegfeld 1;Belegfeld 2;Skonto;Buchungstext\r\n1190,00;S;;;;;10001;8400;;1503;\"RE-2025-001\";\"300325\";;\"Software-Lizenz Maerz 2025\"\r\n"
}
```

### Example Input (Batch Mode — Up to 20 Files)

```json
{
  "chartOfAccounts": "auto",
  "autoFix": true,
  "continueOnError": true,
  "files": [
    {
      "id": "mandant-55003-q1",
      "fileName": "EXTF_Q1_2025.csv",
      "csvContent": "\"EXTF\";700;21;..."
    },
    {
      "id": "mandant-55003-q2",
      "fileName": "EXTF_Q2_2025.csv",
      "chartOfAccounts": "SKR04",
      "csvContent": "\"EXTF\";700;21;..."
    }
  ]
}
```

### Example Output Record

```json
{
  "itemIndex": 0,
  "itemId": "EXTF_Buchungsstapel_202503.csv",
  "fileName": "EXTF_Buchungsstapel_202503.csv",
  "charged": true,
  "ok": true,
  "engine": "de_datev_extf",
  "rulesetVersion": "datev-extf-700-2026.1",
  "jurisdiction": "DE",
  "datevImportReady": true,
  "chartOfAccounts": "SKR03",
  "rowCount": 1,
  "errorCount": 0,
  "warningCount": 0,
  "rew92277ConflictCount": 0,
  "rew92277Conflicts": [],
  "fixesAppliedCount": 0,
  "fixedCsv": "\"EXTF\";700;21;...",
  "assessment": "passed_implemented_checks",
  "requiresManualReview": false,
  "regulatoryAssessment": {
    "assessment": "passed_implemented_checks",
    "coverageScope": "offline_deterministic_rules",
    "rulesetVersion": "datev-extf-700-2026.1"
  },
  "result": { "...": "Full DATEV header metadata, stats, findings & fixesApplied" }
}
```

Every run also writes a `SUMMARY` record to the default Key-Value Store containing import-readiness counts, total `REW92277` conflicts, auto-fixes applied, and Pay-Per-Event billing totals.

***

### Privacy & Scope

> **Privacy & Data Retention:** When run on the Apify platform, Actor inputs (Key-Value Store) and outputs (Dataset) are stored in Apify run storage subject to Apify's platform retention policies. For stateless, zero-payload-retention processing directly at the edge, call the AGOS Direct API / Remote MCP server at `https://api.agos.tools`.

- **Deterministic pre-import check**: Complements client-specific *DATEV Kanzlei-Rechnungswesen* custom account overrides and GoBD procedural documentation.

Built and maintained by **AGOS (Applied General Operations & Systems)**.

# Actor input Schema

## `csvContent` (type: `string`):

Raw German DATEV EXTF v700 Buchungsstapel CSV text (semicolon-delimited: EXTF header row + column header row + posting rows). Used when files\[] is empty.

## `fileName` (type: `string`):

Optional DATEV EXTF filename label (e.g. EXTF_Buchungsstapel_202503.csv) included in the output record.

## `chartOfAccounts` (type: `string`):

Chart of accounts used for SKR03/SKR04 Automatikkonto & REW92277 BU-Schluessel conflict detection.

## `autoFix` (type: `boolean`):

When true, deterministically repairs eligible formatting issues (e.g. dot-decimals, ISO dates, CRLF line endings, header quoting) and returns fixedCsv + fixesApplied.

## `files` (type: `array`):

Optional array of up to 20 DATEV EXTF file objects to validate in a single Actor run. Each item requires { csvContent, fileName?, id?, chartOfAccounts?, autoFix? }. When non-empty, files\[] takes precedence over single-file mode.

## `continueOnError` (type: `boolean`):

In batch mode, continue validating remaining files if one entry is malformed (malformed entries are not charged).

## Actor input object example

```json
{
  "csvContent": "\"EXTF\";700;21;\"Buchungsstapel\";13;20250331142500000;;\"AG\";\"AGOS\";;29098;55003;20250101;4;20250301;20250331;\"Maerz 2025 FiBu\";\"AG\";1;0;0;\"EUR\";;;;\"\";\"03\";;;;\"AGOS-EXTF\"\r\nUmsatz (ohne Soll/Haben-Kz);Soll/Haben-Kz;WKZ Umsatz;Kurs;Basis-Umsatz;WKZ Basis-Umsatz;Konto;Gegenkonto (ohne BU-Schlüssel);BU-Schlüssel;Belegdatum;Belegfeld 1;Belegfeld 2;Skonto;Buchungstext\r\n1190,00;S;;;;;10001;8400;;1503;\"RE-2025-001\";\"300325\";;\"Software-Lizenz Maerz 2025\"\r\n",
  "fileName": "EXTF_Buchungsstapel_202503.csv",
  "chartOfAccounts": "auto",
  "autoFix": true,
  "continueOnError": true
}
```

# Actor output Schema

## `results` (type: `string`):

Direct API link to all structured DATEV EXTF validation records in JSON format.

## `resultsCsv` (type: `string`):

Direct API link to download flattened DATEV audit results in CSV format.

## `summary` (type: `string`):

Aggregate import-readiness counts, REW92277 conflict totals, auto-fixes applied, and Pay-Per-Event billing.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "csvContent": `"EXTF";700;21;"Buchungsstapel";13;20250331142500000;;"AG";"AGOS";;29098;55003;20250101;4;20250301;20250331;"Maerz 2025 FiBu";"AG";1;0;0;"EUR";;;;"";"03";;;;"AGOS-EXTF"
Umsatz (ohne Soll/Haben-Kz);Soll/Haben-Kz;WKZ Umsatz;Kurs;Basis-Umsatz;WKZ Basis-Umsatz;Konto;Gegenkonto (ohne BU-Schlüssel);BU-Schlüssel;Belegdatum;Belegfeld 1;Belegfeld 2;Skonto;Buchungstext
1190,00;S;;;;;10001;8400;;1503;"RE-2025-001";"300325";;"Software-Lizenz Maerz 2025"`,
    "fileName": "EXTF_Buchungsstapel_202503.csv",
    "chartOfAccounts": "auto",
    "autoFix": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("agos/de-datev-extf-validator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "csvContent": """\"EXTF\";700;21;\"Buchungsstapel\";13;20250331142500000;;\"AG\";\"AGOS\";;29098;55003;20250101;4;20250301;20250331;\"Maerz 2025 FiBu\";\"AG\";1;0;0;\"EUR\";;;;\"\";\"03\";;;;\"AGOS-EXTF\"\r
Umsatz (ohne Soll/Haben-Kz);Soll/Haben-Kz;WKZ Umsatz;Kurs;Basis-Umsatz;WKZ Basis-Umsatz;Konto;Gegenkonto (ohne BU-Schlüssel);BU-Schlüssel;Belegdatum;Belegfeld 1;Belegfeld 2;Skonto;Buchungstext\r
1190,00;S;;;;;10001;8400;;1503;\"RE-2025-001\";\"300325\";;\"Software-Lizenz Maerz 2025\"\r
""",
    "fileName": "EXTF_Buchungsstapel_202503.csv",
    "chartOfAccounts": "auto",
    "autoFix": True,
}

# Run the Actor and wait for it to finish
run = client.actor("agos/de-datev-extf-validator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "csvContent": "\\"EXTF\\";700;21;\\"Buchungsstapel\\";13;20250331142500000;;\\"AG\\";\\"AGOS\\";;29098;55003;20250101;4;20250301;20250331;\\"Maerz 2025 FiBu\\";\\"AG\\";1;0;0;\\"EUR\\";;;;\\"\\";\\"03\\";;;;\\"AGOS-EXTF\\"\\r\\nUmsatz (ohne Soll/Haben-Kz);Soll/Haben-Kz;WKZ Umsatz;Kurs;Basis-Umsatz;WKZ Basis-Umsatz;Konto;Gegenkonto (ohne BU-Schlüssel);BU-Schlüssel;Belegdatum;Belegfeld 1;Belegfeld 2;Skonto;Buchungstext\\r\\n1190,00;S;;;;;10001;8400;;1503;\\"RE-2025-001\\";\\"300325\\";;\\"Software-Lizenz Maerz 2025\\"\\r\\n",
  "fileName": "EXTF_Buchungsstapel_202503.csv",
  "chartOfAccounts": "auto",
  "autoFix": true
}' |
apify call agos/de-datev-extf-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agos/de-datev-extf-validator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bsIhRrAPajkgqWeMy/builds/JehSp3b1yOjntSozh/openapi.json
