CSV import and export
Create or change many passports at once, and keep all passports as a file.
Produktpass helps you with the battery passport and the battery QR code under Regulation (EU) 2023/1542. The plugin's texts, templates and notes are not legal advice. You remain responsible for your duties and for the accuracy of your data. For a binding answer on your own case, ask a lawyer.
The template
A file is for one template: "T-BAT-INFO" (battery information page) or "T-BAT-PASS" (battery passport). Under "Import" you download the template of each as a CSV file; its header row names all columns. Fill in one row per product and, for passports of individual batteries, one row per battery with its serial number.
The columns
artnrorgtin: with them the import finds your shop's product. If a GTIN has several products, give the product number.level:model,batchoritem(individual battery).serial,batch,manufacture_date,item_status: the details of an individual battery (only at the levelitem);item_statusisoriginal,repurposed,reused,remanufacturedorwaste.- For every field of the template, a column with the field's key, for example
capacity_ah; texts have one column per language,.deand.en, for examplewaste_prevention.de. After a field's value columns comes its state column, for examplecapacity_ah.state. - You give a document with the ID that the export names; you upload new documents in the passport editor.
- The columns
identifier,url,statusandpublished_versionare only in the export; the import skips them.
A column the template does not have, a duplicate column, or a value in a column without a name is refused, with the column and the row.
Values, states and empty cells
- Write numbers with a decimal comma or a decimal point, without thousands separators:
3,4or3.4. - Write months as
2026-07or07/2026. - Write a choice with its value, its label or its short form, as the template names them.
- State:
provided,pending(open) ornot_applicablewith the reason after a colon, for examplenot_applicable:category_not_covered. If the state column stays empty, a value makes the field "provided". - An empty cell leaves the stored value as it is;
#LEERdeletes it.
Working with Excel
Never open the CSV file with a double-click: Excel then turns long numbers such as GTINs into "9.52E+12" and months into dates. Import it instead with "Data > From Text/CSV", give every column the type "Text" and save it as "CSV UTF-8 (comma delimited)". The import recognises UTF-8 with or without a byte order mark and Windows-1252, semicolon, comma or tab as the separator, and it refuses cells that Excel has changed. It does not take an Excel workbook (.xlsx).
Dry run and import
- Upload the file under "Import" and start the dry run. It changes nothing.
- The report shows every row with its result: to be created, to be changed, unchanged or with errors, every error with its row and column. You can download it as a CSV file.
- The "Import" button takes exactly the checked file. The import creates drafts or changes working values; it publishes nothing. Publish the passports afterwards in the passport editor or in the overview.
Dry runs and imports stay with their reports for 90 days; the file of a dry run that was not imported is deleted after one day. Until then, uploaded files are in mediafiles/ab_produktpass/imports/ (on nginx you block this folder yourself, see web server).
Large files
A file may have up to 20 MB and 50,000 rows. Up to 500 rows it runs at once; the shop's cron works through larger files in parts, and the page shows the progress. If the cron is not running, "Do the next step now" runs the next part. If a part breaks off several times, the import makes it smaller; if it still fails, the job ends with the rows that did not go through.
Export and backup
- "Export all (CSV)" writes, per template, all passports with their batteries into the template's columns; the file can be imported again.
- "Published versions (JSON)" writes the newest published version of every passport with its checksum.
- Exports work also when the licence has expired.
- A complete export of every template after the last change counts as the backup that uninstalling with deleting the data asks for (see Uninstalling).
- If an export is larger than 20 MB or 50,000 rows, split it by rows before importing it again.