pub struct DocumentOperationsCreateRequest {
pub document_id: Option<String>,
pub version_id: Option<String>,
pub tool_id: DocumentOperationsCreateRequestToolId,
pub parameters: Option<Object>,
pub inputs: Option<Vec<DocumentOperationsCreateRequestInputsItem>>,
pub assets: Option<BTreeMap<String, DocumentOperationsCreateRequestAssetsValue>>,
pub source: Option<DocumentOperationsCreateRequestSource>,
pub extra: Object,
}Expand description
The DocumentOperationsCreateRequest object.
Fields§
§document_id: Option<String>The document to process (its current version unless versionId is set). Required unless source names an earlier operation.
version_id: Option<String>The versionId field.
tool_id: DocumentOperationsCreateRequestToolIdThe tool to run; /docs/developer-api/tools lists every tool and its options. A completed operation reports outputDocumentId and outputVersionId. ocr-pdf runs OCR as an ordinary operation (a searchable PDF, or the recognised text as text, Markdown, JSON or DOCX), billed in credits from the plan’s pool plus one request unit. Deprecated ids of merged tools (html-to-pdf, url-to-pdf, html-to-image, pdfa-validation, pdfua-validation, pdf-signature-validation, linearize-pdf) are still accepted and run as the tool they now are.
parameters: Option<Object>Each value is checked against the catalog before queueing: its type, its choices, its range, and options required by the selected mode. Unknown parameters, AI mode and invalid values are refused with 400 OPERATION_INPUT_INVALID; an input version of a type the tool does not read is refused with 422 OPERATION_INPUT_UNSUPPORTED. Passwords and passphrases are encrypted before queueing and never reported back. For pdf-edit: {“edit”: {“operation”: “REPLACE_TEXT”, …}} and an optional outputName. File content inside an edit command (replacement_image, mutation.import_pdf) and an inline certificate are base64; the request body may be up to 12 MB.
inputs: Option<Vec<DocumentOperationsCreateRequestInputsItem>>Further input versions after documentId/versionId, in processing order, for tools that read several files: merge-pdf (2 to 30 PDFs in all) and image-to-pdf (1 to 50 images in all). Each must be a version of this workspace of a type and size the tool reads; any other tool refuses inputs with 400 OPERATION_INPUT_INVALID.
assets: Option<BTreeMap<String, DocumentOperationsCreateRequestAssetsValue>>Named asset files a tool reads: add-watermark watermarkImage (type image), watermark-image watermarkImage (mode image), sign-pdf signatureImage (signatureType image), stampImage (stamp fields) and certificateFile (signatureType digital).
source: Option<DocumentOperationsCreateRequestSource>Instead of documentId/versionId: the output of an earlier operation (chaining without a re-upload). There is no limit on how many operations follow one another this way.
extra: ObjectFields this SDK version does not model.