DocumentService
Download Document
Returns a short-lived, presigned URL to download one of the document’s stored files (PDF by default). Access is gated by the same rules as GetDocument.
Required scope: documents:read
Error Codes:
- DEVELOPER.SCOPE_INSUFFICIENT: The key lacks the documents:read scope.
- DOCUMENT_NOT_FOUND: No document with that id is accessible to the key.
- DOCUMENT_FILE_NOT_FOUND: The document has no file of the requested type.
GET
Download Document
Authorizations
Path Parameters
Document id (UUID).
Query Parameters
Which stored file to download (defaults to FILE_TYPE_PDF): FILE_TYPE_PDF (signed PDF), FILE_TYPE_PREVIEW (print form, «Печатная форма»), FILE_TYPE_DDCARD («КЭД» card), FILE_TYPE_DOCX (editable source), FILE_TYPE_JSON (machine-readable).
Available options:
FILE_TYPE_UNSPECIFIED, FILE_TYPE_PDF, FILE_TYPE_DOCX, FILE_TYPE_DDCARD, FILE_TYPE_PREVIEW, FILE_TYPE_JSON