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>.
A document keeps a version each time you send changed content under the same document_id. This call lists them all, oldest first, so you can see what changed and pick a version for documents.original or documents.document_index.
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, as in documents.get.
string
The document’s address. Do not combine it with user_id, customer_id or scope.
string
The id you gave the document at creation, with the scope it was created in.
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

string
The document’s address.
list[dict]
One entry per version, with the same fields as an item of documents.list. is_current marks the version that reads and searches use.

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.

See also