Download Audit Trail HTML

Get a download link for the interactive HTML export of the audit trail โ€” the same audit trail as the PDF, rendered as a single self-contained web page you can host and share instead of (or alongside) the printed document. It is built by the same job as the PDF: call Generate Audit Trail Export once and the PDF, the package and the HTML are all produced together. This endpoint hands you a link to the finished file; it doesn't build it.

The same file is also bundled into the export package as audit-trail.html โ€” use this endpoint when you want the page on its own, and Download Audit Trail Package when you want it alongside the PDF, report envelope, geometry and attachments.

What the file is

One .html file, typically a few MB, with no external dependencies to install or serve: the map library, fonts, styling and plot geometry are all embedded. Open it from disk, drop it on a static host, or serve it from your own application โ€” it renders the same everywhere. The only thing it fetches at view time is the public basemap raster tiles behind the map, which carry no data of yours.

It presents the audit trail as a tabbed document โ€” Overview, Location, Article 9, Deforestation, Legality, Article 29, Article 10, Article 11, Attachments, Appendix โ€” with the section content identical to the PDF's, plus an interactive layer the printed page can't carry:

  • a live plot map, coloured by compliance verdict (compliant / non-compliant / excluded-exempt), with per-plot popups;
  • a Download GeoJSON control for the plot geometry on screen;
  • the deforestation imagery and maps, as in the PDF.

Where the record has many plots, the geometry ships as a compact embedded columnar payload decoded in the browser, so plot boundaries stay exact at any plot count. If a record's plot polygons can't be embedded at all, the map falls back to one point per plot and says so on the map card.

Response

On success you get 200 with a data.type: "audit_trail_html" resource. The HTML export is always exactly one file, so files carries a single entry:

FieldDescription
file_countNumber of files this HTML export is made of โ€” always 1
total_size_bytesSum of size_bytes across files
expires_atWhen the link(s) stop working โ€” the earliest expiry if there were more than one
files[].part1-based ordinal within the artefact โ€” always 1 for an HTML export
files[].filenameName the signed URL serves the file under
files[].download_urlA direct, short-lived link to the HTML file โ€” GET it to download. No API key needed
files[].content_typeAlways text/html; charset=utf-8
files[].size_bytesSize of the file
dds_hashThe report this file 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
staletrue when the audit trail has changed (e.g. a plot was excluded/included, or a justification or compliance override edited) since this file was rendered โ€” so the URL in files points at an outdated document
rebuildingtrue when a fresh render is currently in progress for this version

Fetching files[0].download_url returns the file as an attachment โ€” it downloads rather than rendering in the browser at the storage origin. To display it to your users, save the bytes and serve them from your own domain.

Hosting it yourself

files[0].download_url is a transfer link, not a publishing link โ€” and not only because it expires. The signature pins Content-Disposition: attachment, so following it always downloads the file; it never renders as a page in the browser, however long its ttl. That is deliberate: it stops operator-authored HTML from executing on the storage origin.

So a viewable, shareable page is always served by you, not by us:

  1. generate the audit trail (or let the ingestion fast path generate it);
  2. GET .../audit-trail/html and follow files[0].download_url once;
  3. store the returned bytes and serve them from a URL you control, for as long as your retention policy requires.

Because the file is self-contained, the copy you store keeps working indefinitely without calling back to the API. Re-run the same three steps when stale turns true (see below) to refresh your hosted copy.

Outdated exports rebuild automatically

Like the PDF, the HTML is tied to the exact state of the audit trail. Excluding or including a plot, editing a justification, overriding a compliance verdict or refreshing a metric makes the stored file stale.

This endpoint still returns 200 with the current (now-outdated) file so you can keep using it, but flags it:

  • stale: true โ€” the URL in files[0].download_url no longer reflects the latest audit trail;
  • rebuilding: true โ€” a fresh render has been started automatically; poll this endpoint until both flags are false, then fetch the new files[0].download_url.

Once a version has been submitted to TRACES its export is frozen (the filed record of what was declared) and is never marked stale or rebuilt.

Availability after a render

The HTML is produced immediately after the PDF and the package, as the last step of the same job. It is additive, so it never blocks or fails that job โ€” which means there is a window where the generate task already reports completed and this endpoint has no HTML to hand you yet.

That window answers 425 Too Early, so poll it rather than treating the first non-200 as final. 425 here means "the job ran, this format hasn't landed"; a 404 means no export exists for this version at all.

A 425 that never clears means the HTML render itself failed. It cannot fail the task, so the PDF and the package are still valid โ€” re-run the render with ?force=true to retry the HTML.

By default the link is valid for 3600 seconds (1 hour). Pass ?ttl=<seconds> to request a different lifetime, up to a maximum of 604800 โ€” 7 days, the longest lifetime a signed URL can carry. For a consumer that fetches the file once and then serves it themselves, a long ttl buys a comfortable window to retry a failed transfer in; it does not make the link itself a publishing URL (see below).

Status codes

CodeWhen
200The HTML is ready โ€” download link returned
425 Too EarlyThe render ran but the HTML hasn't been written yet โ€” retry, this is the normal post-completed window
404No export exists for this version โ€” generate one first, or the record/version isn't visible to this caller
503Temporarily unable to produce a link โ€” try again shortly

A specific version

GET /regulations/eudr/audit-trail/:recordId/versions/:versionId/audit-trail/html returns a download link for a specific historical version's HTML export. Same behaviour.

Required scope: eudr:read