Skip to main content

Inject Metadata

Upload a CSV of customer-provided metadata and attach those values to matching documents by document_id or a custom reference column.

Attach your own metadata to documents in bulk by uploading a CSV. Each row identifies a document and carries one or more metadata fields to write onto it. This is how you bring system-of-record identifiers and status flags — contract IDs, account numbers, lifecycle states — alongside the fields Talonic extracted, so downstream filtering, matching, and delivery can use them.

By default the endpoint expects a comma-delimited UTF-8 CSV with a document_id column; every other non-empty column is written as injected metadata on the matching document. Point at a different layout with reference_column (the column used to identify the document), field_columns (an explicit comma-separated subset of columns to inject), delimiter (for example \t for tab-separated), and encoding.

The response summarizes the run: a batch_id for the injection, rows_processed, how many documents were documents_matched versus documents_pending (rows whose reference did not yet match a document), and the total fields_written. Rows that do not match are reported as pending rather than failing the whole upload.

Identification is exact: document_id matches the document UUID. Use reference_column to match on a different column present in your CSV, paired with a reference the documents already carry. The upload accepts files up to 200 MB.
POST/v1/inject-customer-metadata

Response

Response fields

batch_idstringUUID identifying this injection run.
rows_processedintegerNumber of CSV rows read.
documents_matchedintegerRows whose reference matched a document.
documents_pendingintegerRows whose reference did not match a document yet.
fields_writtenintegerTotal metadata fields written across matched documents.

curl

Response

{
  "batch_id": "b0c1d2e3-f4a5-6789-abcd-ef0123456789",
  "rows_processed": 30,
  "documents_matched": 30,
  "documents_pending": 0,
  "fields_written": 30
}