Skip to main content

Processing Queue & Duplicates

See how many documents are queued, processing, done or failed, review the identical files Talonic caught, and process a skipped duplicate upload anyway.

GET /v1/extract/queue-status counts the workspace's documents per processing state, so a dashboard or a script can tell whether uploads are still being worked on. The counts are workspace totals, as in the web app.

Talonic recognises a file it already has and does not process it twice. GET /v1/extract/dedup/stats shows the groups of identical files, and GET /v1/extract/dedup/audit-log lists the uploads that were skipped as duplicates of an existing document, newest first, up to 1000. Both name documents, so they list only what the key's person can see.

When you do want a separate document for a skipped upload, for example because it belongs to another case, POST /v1/extract/dedup/process-anyway creates one. The new document reuses the existing document's content and values, so the file is not read again. You may give it its own filename, source and tags; otherwise it takes the existing document's.

The reads need the read scope (or documents:read), and any member may call them. Processing a duplicate anyway needs documents:write, and the key's person must be a Member or above with the ingest permission, as in the web app; a Viewer gets 403 insufficient_role. The existing document must be visible to the key's person.

GET/v1/extract/queue-status

Response fields

queued / pending / batch_queuedintegerDocuments waiting to be processed.
extractingintegerDocuments being processed now.
completedintegerDocuments done.
errorintegerDocuments that failed.
partial_errorsintegerDocuments done with some parts failed.
totalintegerAll documents.
GET/v1/extract/dedup/stats

Response fields

total_documentsintegerDocuments in the workspace.
documents_with_hash / documents_without_hashintegerDocuments that can and cannot yet be compared for duplicates.
duplicate_groupsintegerGroups of identical files.
total_duplicate_filesintegerCopies beyond the first in each group.
groups[]arrayfile_hash, count, first_seen, document_ids[], filenames[] (oldest first).
GET/v1/extract/dedup/audit-log
POST/v1/extract/dedup/process-anyway

Body parameters

existing_document_id*uuidThe document the upload was a duplicate of (existing_document_id in the audit log).
filenamestringFilename for the new document, up to 500 characters. Defaults to the existing document's.
source_connection_iduuidSource to file the new document under. Defaults to the existing document's.
tagsstring[]Tags for the new document, at most 50. Defaults to the existing document's.

Process a skipped duplicate anyway

curl -X POST https://api.talonic.com/v1/extract/dedup/process-anyway \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"existing_document_id": "0b6c1f9e-2d4a-4e8b-9c1d-3f5a7b9c2e10", "filename": "invoice-copy-case-118.pdf", "tags": ["case-118"]}'
Not available over the API: retrying every failed document of the workspace, resuming stuck documents and recovering partly failed ones; Talonic does these for now. To retry one failed document, call POST /v1/documents/{id}/re-extract. Uploading an archive (a ZIP of documents) over the API is coming.

Frequently asked questions

How does Talonic decide two files are duplicates?+
Two files are duplicates when their content is identical, whatever their names. A renamed copy is caught; a new scan of the same paper is a different file.
Is the file read again when I process a duplicate anyway?+
No. The new document reuses the existing document's content and values. Only its filename, source and tags can differ.
How do I retry one failed document?+
Call POST /v1/documents/{id}/re-extract. Workspace-wide retry, resume and recovery are done by Talonic for now.