Documents

Process a skipped duplicate anyway

Changed on

Creates a new document that reuses an existing document's content and values, without reading the file again. The existing document must be visible to the key's person. Send an Idempotency-Key header to make retries safe: the same request with the same key from the same API key within 24 hours returns the first copy with its original status and Idempotent-Replayed: true instead of creating another; the same key with a different body, or from another API key, answers 422 idempotency_key_reused; a retry while the first call still runs answers 409 idempotency_request_in_progress. Requires the documents:write scope. The key's person needs the ingest permission (Contract Management and above by default), as in the web app.

post/v1/extract/dedup/process-anyway

Request

  • Base URL
    https://api.talonic.com
  • Auth
    HTTP bearer

Headers

Idempotency-Key, string

Unique key for idempotent requests, at most 64 characters (a longer key is refused with 400 invalid_idempotency_key before any work). A retry with the same key, request and API key within 24 hours returns the first response with Idempotent-Replayed: true; the same key on a different request or from another API key answers 422 idempotency_key_reused. On POST /v1/extract the key caches the extraction result for the workspace instead: any key of the workspace sending it gets that result with cached: true.

Request body

object required
existing_document_id, string uuid required
filename, string
source_connection_id, string uuid
tags, string[]

Response

The new document. On a retry with the same Idempotency-Key, the first copy with Idempotent-Replayed: true.

object required
document, object

Changes

    • breaking

      for the header request parameter Idempotency-Key, the maxLength was decreased from 255 to 64

    • breaking

      removed the success response with the status

    • info

      added the non-success response with the status

    1 more change in this revision