メインコンテンツまでスキップ

Create a document, from an upload or without a file.

POST/api/v1/documentsdocuments:write
注記

このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。

upload_id is a completed upload session with purpose document; without it the document is made with its details only and gets its file later (create_document_version). The document is numbered under document_prefix_id (default: your user name), granted to you and the company's default users and groups, filed in folder_ids, and processed as a Portal upload: PDF conversion, text, OCR, embeddings and indexing follow. Needs Create Documents, and sight of every folder and the project.

スコープdocuments:write
非同期いいえ
MCP ツールcreate_document
Portal の権限create_documents

パラメーター​

名前場所型必須説明
Docwize-Versionheaderstring (date)任意
Idempotency-Keyheaderstring任意max 255

リクエスト本文​

Content-Type型
application/jsonDocumentCreateInput

応答​

ステータス説明本文
201Success.application/json Document または object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflict, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

エラー​

この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。

スキーマ​

AdditionalField​

フィールド型必須説明
labelstring または null必須
valuestring または null必須

AdditionalFieldInput​

フィールド型必須説明
labelstring または null任意
valuestring または null任意

AdditionalFields​

フィールド型必須説明
additional_field_3AdditionalField必須
additional_field_4AdditionalField必須
additional_field_5AdditionalField必須
additional_field_6AdditionalField必須

AdditionalFieldsInput​

フィールド型必須説明
additional_field_3AdditionalFieldInput任意
additional_field_4AdditionalFieldInput任意
additional_field_5AdditionalFieldInput任意
additional_field_6AdditionalFieldInput任意

BlankFileInput​

フィールド型必須説明
extensionstring必須The Office type of the empty file: docx, xlsx or pptx.
file_namestring または null任意The file's name, ending with the extension. Default: the document's description (or Document) and the extension.

CarbonCopyInputInput​

フィールド型必須説明
contactobject または null任意A contact; its organisation comes with it.
organisationobject または null任意An organisation, for a copy that names no person. Leave out when contact is given.

Document​

フィールド型必須説明
actual_submission_datestring または null必須
additional_fieldsAdditionalFields必須
created_atstring (date-time) または null必須
created_byUserRef または null必須
custom_field_rowsDocumentCustomFieldRow の配列必須The register rows the document is linked to that the caller may read, one entry per row in link order.
descriptionstring または null必須
document_datestring または null必須
document_idstring必須
document_numberstring または null必須
document_statusobject または null必須The status shown as Status in the Portal (lookup_actionstatus).
document_sub_typeobject または null必須
document_typeobject または null必須
duplicate_ofstring または null必須The number of the document this one duplicates (the Portal's Duplicate Of).
fileDocumentFile または null必須The current file; null when the document has none.
foldersDocumentFolder の配列必須The folders the document is filed in that the caller can see.
from_contactobject または null必須
from_organisationobject または null必須
is_latest_revisionboolean必須
is_lockedboolean必須
is_privilegedboolean必須
main_document_datestring または null必須
ownerUserRef または null必須
page_endnumber または null必須Last page of the range this document covers in its file.
page_startnumber または null必須First page of the range this document covers in its file.
post_review_statusobject または null必須
projectobject または null必須The stored project number text, with the project's ID when one matches.
project_organisationobject または null必須
reference_numberstring または null必須
relevancenumber または null必須1 is relevant (the default), 0 is irrelevant (the Portal's Irrelevant switch).
responded_withstring または null必須The reference of the document that responded to this one (the Portal's Responded With).
response_datestring または null必須
response_due_datestring または null必須
revision_numberstring または null必須
to_contactobject または null必須
to_organisationobject または null必須

DocumentCreateInput​

フィールド型必須説明
actual_submission_datestring または null任意The Portal's Received/Delivered date.
additional_fieldsAdditionalFieldsInput または null任意Additional fields 3 to 6, each as {value}.
blank_fileBlankFileInput または null任意An empty .docx, .xlsx or .pptx for the document to hold, to open in Office Online. Not with upload_id.
ccsCarbonCopyInputInput の配列任意The people to copy the document to, in order; each a contact or an organisation.
descriptionstring または null任意Default: the file name without its extension; empty for a document without a file.
document_datestring または null任意Default: now.
document_prefix_idstring または null任意The prefix the document number is made under (PREFIX/00001). Default: your user name.
document_statusobject または null任意
document_sub_typeobject または null任意A sub type of document_type; needs document_type.
document_typeobject または null任意
duplicate_ofstring または null任意
extract_archiveboolean または null任意true expands an uploaded .zip, .pst or .ost into documents once it is stored (the Portal's Extract archive on upload). Needs a file of that kind. Default false.
folder_idsstring の配列任意The folders to file the document in; you must see each one.
from_contactobject または null任意A contact; its organisation becomes from_organisation.
from_organisationobject または null任意
immediate_processingboolean または null任意true runs the text extraction and AI processing at once instead of in the background queue's turn (the Portal's Immediate processing). Default false.
is_privilegedboolean または null任意
location_idsstring の配列任意The locations to file the document in (needs View Locations).
page_endnumber または null任意
page_startnumber または null任意
post_review_statusobject または null任意
projectobject または null任意A project you can see; its client becomes the project organisation.
reference_numberstring または null任意A reference number and revision another document already has is a warning, not a refusal.
relevancenumber または null任意0 to 1: 1 is relevant (the default), 0 is irrelevant.
responded_withstring または null任意
response_datestring または null任意
response_due_datestring または null任意
revision_numberstring または null任意
to_contactobject または null任意A contact; its organisation becomes to_organisation.
to_organisationobject または null任意
upload_idstring任意A completed upload session with purpose document. Absent (and no blank_file) creates the document without a file (metadata first, file later): give it one with create_document_version.

DocumentCustomFieldRow​

フィールド型必須説明
custom_field_template_idstring必須The register the row belongs to.
row_idstring必須
valuesobject必須The row's field values, keyed by field name.

DocumentFile​

フィールド型必須説明
content_typestring または null必須
file_hashstring または null必須The hash the Portal stored for the file's content; null when none was recorded.
file_namestring必須
has_pdfboolean必須Whether a PDF rendition of the file is ready (an Office file converts on demand, so false only means not yet).
is_indexedboolean必須Whether the file's text has been indexed for search.
page_countinteger または null必須The pages the file has, once the Portal has counted them; null before.
size_bytesstring または null必須
version_idstring必須

DocumentFolder​

フィールド型必須説明
folder_idstring必須
pathstring または null必須

UserRef​

フィールド型必須説明
display_namestring必須
kindstring: user, system, integration または string必須
user_idstring または null必須