Skip to main content
REST One HTTPS request.
Added in Python SDK 0.9.0 and JavaScript and TypeScript SDK 0.9.0. In TypeScript, pass one options object; every option is accepted in snake_case or camelCase (customer_id or customerId). The result is returned as the server sends it, with snake_case fields, typed as Record<string, unknown>.
Find a document by the document_id you gave it when you created it. Your own ids are unique only within a scope, so pass the same user_id, customer_id or scope the document was created with. You rarely need this call: every other documents method accepts a document_id with those arguments and looks the key up for you.

Parameters

string
required
The id you gave the document in memories.create.
string
The user the document was filed under, if any.
string
The customer the document was filed under, if any. Not accepted on B2C.
dict[str, str]
The deeper scope level the document was filed at, as level name to id.

Returns

One document, the same fields as an item of documents.list, including its document_key.

Example

Raises

  • ContextNotFoundError: when no live document has that id in that scope.
  • AmbiguousDocumentError: when the id names more than one document, for example the same id at two customers. Its matches lists them (the same property in TypeScript); pass the scope that names one, or use the document_key.
  • CustomerIdNotAcceptedError: when customer_id is passed on a B2C instance.

See also