Bulk-import penalty notices from CSV
Bulk CSV import lets you create many penalty notices (Strafmandate) at once from a single spreadsheet. This article covers the full import flow: preview with a dry run, then commit the batch safely with duplicate detection and replay protection.
Before you start
You need the Strafmandate module permission (strafmandate:view), which the SystemAdmin and FleetManager roles have by default. Prepare a CSV with the required columns — see Prepare your CSV file for import for the exact header and formatting rules.
Step 1: Preview with a dry run
Always run a dry run first. It validates every row and reports what would happen, without writing anything to your data.
- Open the bulk import area of the Strafmandate module and provide your CSV content.
- Run the dry run.
- Read the summary: total rows, importable rows, validation failures, and skipped duplicates.
- Review the per-row preview to see, for each row, its Aktenzeichen and vehicle, whether it is valid, whether it is a duplicate, whether it will import, and any error messages.
Tip: Fix the rows flagged as validation failures in your source file and re-run the dry run until the importable count matches what you expect.
Step 2: Commit the import
When the preview looks right, commit the same CSV. The commit imports only the rows the dry run marked as importable — valid rows that are not duplicates. Invalid rows and duplicates are skipped, not failed.
- Submit the CSV to the import (commit) action.
- Supply an Idempotency-Key with the request. This is required; without it the import is rejected with "Idempotency-Key header is required."
- Read the result summary.
The commit summary
| Field | Meaning |
|---|---|
| Total rows | Every data row in the file. |
| Created | Notices actually created. |
| Matched | Created notices for which automatic driver matching suggested a driver. |
| Unmatched | Created notices with no suggested driver. |
| Skipped duplicates | Rows skipped because the notice already exists or repeats within the file. |
| Validation failures | Rows skipped because they failed validation. |
Each imported notice is created in open status, given a unique internal ID, run through automatic driver matching, and recorded in the audit trail.
Duplicate detection and replay safety
A notice is treated as a duplicate when its Aktenzeichen and vehicle combination already exists in your data, or when it repeats within the same file. Duplicates are skipped so a re-upload does not create doubles.
The Idempotency-Key also makes the commit safe to retry. If you submit the same key again — for example after a network timeout — the system returns the original result marked as replayed, instead of importing the batch a second time.
Note: Use a fresh Idempotency-Key for each genuinely new import. Reusing a previous key returns that earlier import's cached result rather than importing your new file.
Related
- Prepare your CSV file for import
- Preview a CSV import with a dry run
- Correct an imported or captured penalty notice
- Required fields on a penalty notice