document_id.
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 a Uint8Array.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 eitherdocument_key or document_id, as in documents.get.
The version to download, from 1. Required. Passed by keyword in Python, and in the options object in TypeScript. List the versions with
documents.versions; a citation also names the version it came from.Returns
bytes in Python, Uint8Array in TypeScript: the original file of that version.
Example
Raises
ContextNotFoundError: when the document or that version does not exist, is deleted, is not visible to your instance, or has no stored original (has_originalis false).InvalidInputError: whenversionis not a positive integer, or you pass both or neither ofdocument_keyanddocument_id.AmbiguousDocumentError: when adocument_idnames more than one document in the scope you gave.