Download Audit Trail Package
Get a download link for the full audit-trail export package โ a single ZIP bundling everything that backs the DDS for a record's current version. The package is built by the same job as the PDF: call Generate Audit Trail Export once and both the PDF and the package are produced together. This endpoint hands you a link to the finished ZIP; it doesn't build it.
โถWhat's in the ZIP
| Entry | Contents |
|---|---|
audit-trail.pdf | The rendered audit-trail PDF (same document as the PDF endpoint) |
audit-trail.html | The self-contained interactive audit trail (same document as the HTML endpoint) โ open it in a browser to explore the plot map and tables offline |
report.json | The full report envelope (same body as GET .../report) |
geojson/manifest.json | Index of the GeoJSON part files: feature_count, part_count, parts (ordered filenames), the report metadata (model, record_id, version_id, dds_hash, include), omitted_attachments (any stored attachment that was skipped as missing/unavailable, with a reason), and html_included (whether audit-trail.html is present) |
geojson/part-NNNNN.geojson | Full-scope GeoJSON FeatureCollection chunks โ every plot (compliant + non-compliant), matching the PDF's plot table. One or more parts (each bounded so no single file is unwieldy); concatenate their features arrays for the complete collection |
attachments/<filename> | One entry per stored operator attachment on the version. Duplicate filenames are suffixed (evidence.txt, evidence-1.txt, โฆ) |
The GeoJSON is chunked into bounded part files (rather than a single
report.geojson) so very large versions stay within serialisation limits;
geojson/manifest.json lists the parts in order. A version with no plots
still yields a valid geojson/manifest.json (part_count: 0).
audit-trail.html and the PDF are two views of the same dds_hash, so the
ZIP is a self-contained snapshot: the print-ready document, the explorable
one, the machine-readable envelope, the geometry, and the evidence files.
โถWhen the HTML entry appears
The interactive export is rendered after the render job reports
completed, so the very first package built for a version is sealed before
that file exists and ships without it (html_included: false in the
manifest). This endpoint detects that, reports stale: true /
rebuilding: true, and starts a rebuild automatically โ exactly as it
does for any other outdated package. Poll until both flags are false and
the ZIP will carry audit-trail.html.
In practice this means a freshly generated version needs one rebuild cycle
before its package is complete; use the
HTML endpoint if you want the file
immediately. Packages assembled before the interactive export existed at all
converge the same way. If the interactive export genuinely cannot be produced
for a version, the entry stays absent and html_included stays false; the
rest of the package is unaffected.
Only stored attachments are included; pending (bytes not yet finalised)
and soft-deleted ones are excluded. A version with no attachments still
produces a valid package (PDF + report.json + the geojson manifest). If a
single stored attachment's object is missing/unreadable it is skipped and
listed under omitted_attachments in the manifest (the package still
generates); a storage permission error, by contrast, fails the whole
render rather than quietly shipping a bundle missing every attachment.
โถResponse
On success you get 200 with a data.type: "audit_trail_package" resource.
The ZIP is always exactly one file, so files carries a single entry:
| Field | Description |
|---|---|
file_count | Number of files this package is made of โ always 1 |
total_size_bytes | Sum of size_bytes across files |
expires_at | When the link(s) stop working โ the earliest expiry if there were more than one |
files[].part | 1-based ordinal within the artefact โ always 1 for a package |
files[].filename | Name the signed URL serves the file under |
files[].download_url | A direct, short-lived link to the ZIP โ GET it to download. No API key needed |
files[].content_type | Always application/zip |
files[].size_bytes | Size of the ZIP |
dds_hash | The report this package was rendered from. Artefacts of one record with the same value come from the same report state; while stale it names the stored report, not the current one |
stale | true when the audit trail changed since the package was assembled โ the URL in files points at an outdated ZIP |
rebuilding | true when a fresh build is currently in progress |
Fetching files[0].download_url returns the ZIP as an attachment. Treat the
link as temporary: request a fresh one when you need to download again.
โถOutdated packages rebuild automatically
Like the PDF, the package is tied to the exact state of the audit trail โ
including its attachments. Adding or removing an attachment, excluding a
plot, or editing a justification makes the stored package stale. This
endpoint still returns 200 with the current (outdated) ZIP so you can keep
using it, but flags stale: true / rebuilding: true and starts a fresh
build automatically; poll until both are false, then fetch the new
files[0].download_url. Once a version is submitted to TRACES its
package is frozen and never rebuilt.
โถLink lifetime
Default 3600 seconds (1 hour). Pass ?ttl=<seconds> for a different lifetime, up to
604800 (7 days โ the longest a signed URL can carry).
โถStatus codes
| Code | When |
|---|---|
200 | The package is ready โ download link returned |
425 Too Early | Still being assembled โ retry shortly |
404 | No package for this version yet โ generate one first, or the record/version isn't visible to this caller |
503 | Temporarily unable to produce a link โ try again shortly |
โถA specific version
GET /regulations/eudr/audit-trail/:recordId/versions/:versionId/audit-trail/package
returns a download link for a specific historical version's package.
Required scope:
eudr:read