Export & Audit Packages
The two forms of tax-authority data access beyond direct read access (Z1): a CSV export of the filtered archive (Z2), and a downloadable ZIP audit package of a period (Z3).
CSV export (Z2)
Stream the rows matched by the archive filter as a single CSV file — the same filter used by Archive listing.
Endpoint
| Property | Value |
|---|---|
| URL | GET /germany/archive/{companyId}/export.csv |
| Method | GET |
| Auth | R-Auth: <company-jwt> |
| Base URL | Stage Environment https://api-stage.docnova.ai/ Production Environment https://api.docnova.ai/ |
Example Request
curl --location '{{baseUrl}}/germany/archive/{{companyId}}/export.csv?periodFrom=2026-01-01&periodTo=2026-06-30' \
--header 'R-Auth: {{companyJwt}}' \
--output gobd-archiv.csv
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | UUID | Yes | Company UUID |
Query parameters
Same filter as List archive rows: periodFrom, periodTo, direction, kind, status, copyQualifier, invoiceNumber, expired. No page / size — every matching row is streamed.
Response
200 OK
Content-Type: text/csv; charset=UTF-8
Content-Disposition: attachment; filename="gobd-archiv-<companyId>.csv"
A CSV file: header row, ; as column separator, , as decimal symbol, CRLF line endings, every text field double-quoted, UTF-8 encoded, dates as DD.MM.YYYY.
CSV columns
| Column | Description |
|---|---|
ArchivId | Archive row ID |
Rechnungsnummer | Invoice number |
Rechnungsdatum | Invoice issue date |
Richtung | INCOMING or OUTGOING |
Dokumentart | Archived document kind — see Document kind values |
Kopiequalifikation | ORIGINAL, GENERATED_AT_INTAKE, or NON_ORIGINAL_COPY |
VerkaeuferName | Seller name |
VerkaeuferUStId | Seller VAT ID |
KaeuferName | Buyer name |
KaeuferUStId | Buyer VAT ID |
Waehrung | Invoice currency (ISO 4217) |
Nettobetrag | Net amount |
Steuerbetrag | Tax amount |
Bruttobetrag | Gross amount |
Zahlbetrag | Payable amount |
Dateiname | File name of the archived document |
SHA256 | SHA-256 checksum of the archived document |
ArchiviertAm | When the document was archived |
AufbewahrungBis | End of the retention period |
Statushinweis | Notes — unprocessable, not yet archived, unreadable amounts, legal hold |
The amount, seller and buyer columns are read from each archived document's own XML and verified against its checksum at export time; a row whose archived document cannot be read keeps its line with empty amount columns and a note in Statushinweis.
Error responses
| HTTP | errorType | Meaning |
|---|---|---|
400 | INVALID_ARGUMENT | periodTo is before periodFrom |
400 | GERMANY_ARCHIVE_NOT_AVAILABLE | The company is not archived under the German GoBD rules |
403 | AUTHORIZATION_FAILED | Caller has no view rights for either direction, or requested a direction it may not view |
403 | GERMANY_AUDITOR_ACCESS_EXPIRED | Caller's time-limited auditor access (Z1) has ended |
Request audit package (Z3)
Queue a downloadable ZIP package for a period. Building happens asynchronously — poll List audit packages for status.
Endpoint
| Property | Value |
|---|---|
| URL | POST /germany/archive/{companyId}/audit-packages |
| Method | POST |
| Auth | R-Auth: <company-jwt> |
| Content-Type | application/json |
| Base URL | Stage Environment https://api-stage.docnova.ai/ Production Environment https://api.docnova.ai/ |
Example Request
curl --location '{{baseUrl}}/germany/archive/{{companyId}}/audit-packages' \
--header 'Content-Type: application/json' \
--header 'R-Auth: {{companyJwt}}' \
--data-raw '{
"periodFrom": "2026-01-01",
"periodTo": "2026-06-30",
"direction": null
}'
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | UUID | Yes | Company UUID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
periodFrom | date | Yes | Start of the period (yyyy-MM-dd) |
periodTo | date | Yes | End of the period (yyyy-MM-dd) |
direction | string | No | INCOMING or OUTGOING. Omit or null for both — requires view rights for both directions |
Response
{
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"requestedBy": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"periodFrom": "2026-01-01",
"periodTo": "2026-06-30",
"direction": null,
"status": "QUEUED",
"invoiceCount": 0,
"fileCount": 0,
"sizeBytes": null,
"createdAt": "2026-07-01T09:00:00",
"readyAt": null,
"expiresAt": null,
"failureReason": null
}
Response fields
| Field | Description |
|---|---|
id | Audit package UUID |
requestedBy | User ID who requested the package |
periodFrom / periodTo | Requested period |
direction | INCOMING, OUTGOING, or null for both |
status | See Package status values |
invoiceCount | Number of invoices included, once built |
fileCount | Number of files in the package, once built |
sizeBytes | Package size in bytes, once built |
createdAt | When the package was requested |
readyAt | When the package became downloadable |
expiresAt | When the package will be deleted — 7 days after readyAt |
failureReason | Why building failed, if status is FAILED |
Error responses
| HTTP | errorType | Meaning |
|---|---|---|
400 | GERMANY_AUDIT_PACKAGE_PERIOD_INVALID | periodFrom/periodTo missing, or periodTo before periodFrom |
400 | GERMANY_AUDIT_PACKAGE_EMPTY_PERIOD | No invoices match the requested period/direction |
400 | GERMANY_ARCHIVE_NOT_AVAILABLE | The company is not archived under the German GoBD rules |
403 | AUTHORIZATION_FAILED | Caller requested a direction (or both, when omitted) it may not fully view |
403 | GERMANY_AUDITOR_ACCESS_EXPIRED | Caller's time-limited auditor access (Z1) has ended |
409 | GERMANY_AUDIT_PACKAGE_IN_PROGRESS | An identical request (same company, period and direction) is already queued or building |
List audit packages
Endpoint
| Property | Value |
|---|---|
| URL | GET /germany/archive/{companyId}/audit-packages |
| Method | GET |
| Auth | R-Auth: <company-jwt> |
| Base URL | Stage Environment https://api-stage.docnova.ai/ Production Environment https://api.docnova.ai/ |
Example Request
curl --location '{{baseUrl}}/germany/archive/{{companyId}}/audit-packages' \
--header 'R-Auth: {{companyJwt}}'
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | UUID | Yes | Company UUID |
Response
[
{
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"requestedBy": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"periodFrom": "2026-01-01",
"periodTo": "2026-06-30",
"direction": null,
"status": "READY",
"invoiceCount": 128,
"fileCount": 260,
"sizeBytes": 18874368,
"createdAt": "2026-07-01T09:00:00",
"readyAt": "2026-07-01T09:04:12",
"expiresAt": "2026-07-08T09:04:12",
"failureReason": null
}
]
Response fields are the same as Request audit package. Only packages whose direction the caller may view are returned.
Error responses
| HTTP | errorType | Meaning |
|---|---|---|
400 | GERMANY_ARCHIVE_NOT_AVAILABLE | The company is not archived under the German GoBD rules |
403 | AUTHORIZATION_FAILED | Caller has no view rights for either direction |
403 | GERMANY_AUDITOR_ACCESS_EXPIRED | Caller's time-limited auditor access (Z1) has ended |
Package status values
| Value | Description |
|---|---|
QUEUED | Accepted, waiting to be built |
BUILDING | Currently being assembled |
READY | Built and downloadable |
FAILED | Building failed — see failureReason |
EXPIRED | Deleted 7 days after it became ready; request a new one |
Download audit package
Stream the package ZIP through this authenticated endpoint — there is no presigned or public link.
Endpoint
| Property | Value |
|---|---|
| URL | GET /germany/archive/{companyId}/audit-packages/{packageId}/download |
| Method | GET |
| Auth | R-Auth: <company-jwt> |
| Base URL | Stage Environment https://api-stage.docnova.ai/ Production Environment https://api.docnova.ai/ |
Example Request
curl --location '{{baseUrl}}/germany/archive/{{companyId}}/audit-packages/{{packageId}}/download' \
--header 'R-Auth: {{companyJwt}}' \
--output audit-package.zip
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | UUID | Yes | Company UUID |
packageId | UUID | Yes | Audit package UUID, from Request or List audit packages |
Response
200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="<package file name>.zip"
The ZIP contains:
| File | Content |
|---|---|
invoices.csv | Same format as the CSV export |
index.xml | Column descriptions per the GDPdU data description standard |
gdpdu-01-09-2004.dtd | The DTD index.xml validates against |
originals/<archiveId>.<extension> | The archived document of each included row |
sha256.txt | Checksums of every file in the package |
package-info.txt | Package metadata |
Error responses
| HTTP | errorType | Meaning |
|---|---|---|
400 | GERMANY_ARCHIVE_NOT_AVAILABLE | The company is not archived under the German GoBD rules |
400 | GERMANY_AUDIT_PACKAGE_NOT_READY | Package status is still QUEUED or BUILDING |
400 | GERMANY_AUDIT_PACKAGE_EXPIRED | Package expiresAt has passed — request a new one |
403 | AUTHORIZATION_FAILED | Caller has no view rights at all, or may not view the package's direction |
403 | GERMANY_AUDITOR_ACCESS_EXPIRED | Caller's time-limited auditor access (Z1) has ended |
404 | GERMANY_AUDIT_PACKAGE_NOT_FOUND | No audit package with this packageId for this company |