Audit-trail export โ€” PDF, package & interactive HTML

A print-ready PDF of the EUDR audit trail for a DDS record, built from the same data as the JSON /report and /report.geojson. Because the document can take a few seconds to produce, getting it is a two-step flow:

  1. POST .../audit-trail โ†’ 202 + a dds_record_task envelope (operation: "generate_audit_trail_pdf"). Poll it via Get Audit Trail Task until status: "completed".
  2. GET .../audit-trail/pdf โ†’ returns a JSON info envelope with a short-lived signed download URL once stored; 425 Too Early while a render is in flight, 404 if none exists.

The export package (ZIP)

The same generate call also produces a full export package โ€” one ZIP bundling audit-trail.pdf + report.json + chunked geojson/ part files (with a geojson/manifest.json index) + every stored operator attachment (attachments/<file>). There is no separate generate call: POST .../audit-trail builds both, and you fetch the ZIP's download link from GET .../audit-trail/package (same envelope shape as the PDF).

The interactive HTML export

That same generate call also produces a self-contained interactive HTML version of the audit trail: one file, no external dependencies, with the section content identical to the PDF's plus a live verdict-coloured plot map and a GeoJSON download. Again there is no separate generate call โ€” fetch its download link from GET .../audit-trail/html (same envelope shape as the PDF). It is the format to use when you want to host and share the audit trail as a web page rather than hand over a printed document: download the bytes once and serve them from a URL you control.

Endpoints

MethodPathPurpose
POST/regulations/eudr/audit-trail/:recordId/audit-trailGenerate the PDF, package and HTML for the current version
POST/regulations/eudr/audit-trail/:recordId/versions/:versionId/audit-trailGenerate for a specific version
GET/regulations/eudr/audit-trail/:recordId/audit-trail/pdfDownload link for the current version's PDF
GET/regulations/eudr/audit-trail/:recordId/versions/:versionId/audit-trail/pdfDownload link for a specific version's PDF
GET/regulations/eudr/audit-trail/:recordId/audit-trail/packageDownload link for the current version's ZIP package
GET/regulations/eudr/audit-trail/:recordId/versions/:versionId/audit-trail/packageDownload link for a specific version's ZIP package
GET/regulations/eudr/audit-trail/:recordId/audit-trail/htmlDownload link for the current version's interactive HTML
GET/regulations/eudr/audit-trail/:recordId/versions/:versionId/audit-trail/htmlDownload link for a specific version's interactive HTML

Re-requesting an artefact

If you ask again and the underlying data hasn't changed, you get back the same document(s) without waiting for a re-build โ€” all three artefacts share one content hash, so an unchanged version is never re-rendered or re-zipped. If the data has changed, fresh artefacts are produced. You can only have one build in progress at a time per version โ€” asking to generate again while one is still running returns 409.

The HTML is written last, as an additive step that can never fail the render job, so just after a generate task reports completed its download endpoint answers 425 Too Early until the file lands โ€” retry, rather than reading it as absent. The PDF and package are unaffected.