Skip to main content
REST One HTTPS request, or two when you address the document by document_id.
Added in Python SDK 0.9.0 and JavaScript and TypeScript SDK 0.9.0. In TypeScript, pass the document_key as a string, or an options object; every option is accepted in snake_case or camelCase (documentId or document_id). The result is returned as the server sends it, with snake_case fields, typed as Record<string, unknown>.
Get a document’s current version with its status. Use it to check whether a document you sent has finished processing, or to read its title, size and source.
This call checks that the document belongs to your account and is visible to your instance. It does not check the user or customer the document was filed under: anyone holding the document_key with a key to your instance can read it. user_id, customer_id and scope only help find the key from a document_id. To read a document under a user or customer scope, use documents.index and documents.read.

Parameters

Address the document one way: pass either document_key or document_id.
string
The document’s address, returned by memories.create and carried in every citation. It already names one document, so do not combine it with user_id, customer_id or scope.
string
The id you gave the document at creation. Pass it with the user_id, customer_id or scope the document was created with, because your ids are unique only within a scope.
string
With document_id: the user the document was filed under.
string
With document_id: the customer the document was filed under. Not accepted on B2C.
dict[str, str]
With document_id: the deeper scope level the document was filed at.

Returns

One document, with the same fields as an item of documents.list.
string
accepted, searchable, processed or failed. When it is failed, failure_reason says why.
string
How this version relates to earlier ones: created, unchanged, new_version, stale or pending.
boolean
Whether the original file is stored, so documents.original can return it.

Example

Raises

  • ContextNotFoundError: when the document does not exist, is deleted, or is not visible to your instance.
  • AmbiguousDocumentError: when a document_id names more than one document in the scope you gave.
  • InvalidInputError: when you pass both or neither of document_key and document_id, or a scope argument with a document_key.

See also