Download Audit Trail PDF
Get a download link for the audit-trail PDF of a DDS record's current version. The PDF must have been generated first via Generate Audit Trail Export β this endpoint hands you a link to the finished document, it doesn't build it.
On success you get 200 with a data.type: "audit_trail_pdf" resource. A
PDF is always exactly one file, so files carries a single entry:
| Field | Description |
|---|---|
file_count | Number of files this PDF 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 PDF |
files[].filename | Name the signed URL serves the file under |
files[].download_url | A direct, short-lived link to the PDF β GET it to download the file. No API key needed |
files[].content_type | Always application/pdf |
files[].size_bytes | Size of the PDF |
dds_hash | The report this PDF 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 has changed (e.g. a plot was excluded/included, or a justification or compliance override edited) since this PDF was rendered β so the URLs in files point at an outdated document |
rebuilding | true when a fresh render is currently in progress for this version |
Fetching files[0].download_url returns the PDF as an attachment. Treat the
link as temporary: request a fresh one whenever you need to download again
rather than storing it.
βΆOutdated PDFs rebuild automatically
The PDF is tied to the exact state of the audit trail. Whenever you change that state β exclude or include a plot, edit a justification, override a compliance verdict, or refresh a metric β the stored PDF becomes stale.
This endpoint still returns 200 with the current (now-outdated) PDF so you
can keep viewing it, but flags it:
stale: trueβ the URL infiles[0].download_urlno longer reflects the latest audit trail.rebuilding: trueβ a fresh render has been started automatically; poll this endpoint until both flags arefalse, then fetch the newfiles[0].download_url.
You don't need to trigger anything: simply requesting the PDF while it's stale
kicks off the rebuild. A surface showing the PDF should render an
"outdated β regeneratingβ¦" state while stale/rebuilding are true.
Once a version has been submitted to TRACES its PDF is frozen (the filed record of what was declared) and is never marked stale or rebuilt.
βΆLink lifetime
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 a signed URL can carry).
βΆStatus codes
| Code | When |
|---|---|
200 | The PDF is ready β download link returned |
425 Too Early | The PDF is still being prepared β retry shortly |
404 | No PDF for this version yet β generate one first, or the record/version doesn't exist for 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/pdf
returns a download link for a specific historical version's PDF. Same
behaviour.
Required scope:
eudr:read