05 Create Audit Record
โถStep 5: Create the audit record (with a projection)
POST /regulations/eudr/audit-trail resolves the filter to the
upload's plots and snapshots them into a new audit record. The body
carries the two threads this workflow demonstrates:
- Selection โ
filter: { "assets.task_id": { "in": ["{{ddsdf_task_id}}"] } }binds the record to the upload from step 1. - Projection โ
report_data_fields: [{ key: "client_id", paths: ["clientId", "client_id"], label: "Client ID" }]declares that the report's per-plotdata_fieldsshould surfaceclient_idfrom the uploadedclientIdcolumn (first non-null path wins).
commodity is shown here but is optional at create (required only
at submit). The create auto-splits into one record per
(country, commodity); this upload is single-country/single-commodity,
so exactly one record is produced.
โถResponse (202)
Returns the create-task envelope. Capture data.id into
{{ddsdf_create_task_id}} โ the record id isn't known until the task
completes (step 06).
โ Step 6: Poll Create Task.