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-plot data_fields should surface client_id from the uploaded clientId column (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.