Update a document (JSON Merge Patch).
PATCH/api/v1/documents/{document_id}documents:write
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Accepts the document's representation: the writable members are description, document_type, document_sub_type, document_status, post_review_status, project, from_organisation, to_organisation, from_contact, to_contact, reference_number, revision_number, document_date, actual_submission_date, response_date, response_due_date, additional_fields, responded_with, duplicate_of, page_start, page_end, relevance and is_privileged. Other members are read-only. A project you can see moves the document and its client. Needs an edit grant on the unlocked document.
| スコープ | documents:write |
| 非同期 | いいえ |
| MCP ツール | update_document |
| Portal の権限 | edit_document_details |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
document_id | path | string | 必須 | |
Docwize-Version | header | string (date) | 任意 | |
If-Match | header | string | 任意 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | DocumentPatchInput |
application/merge-patch+json | DocumentPatchInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
200 | Success. | application/json Document または object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | conflict, locked | application/problem+json Problem |
412 | precondition_failed | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
AdditionalField
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
label | string または null | 必須 | |
value | string または null | 必須 |
AdditionalFieldInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
label | string または null | 任意 | |
value | string または null | 任意 |
AdditionalFields
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
additional_field_3 | AdditionalField | 必須 | |
additional_field_4 | AdditionalField | 必須 | |
additional_field_5 | AdditionalField | 必須 | |
additional_field_6 | AdditionalField | 必須 |
AdditionalFieldsInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
additional_field_3 | AdditionalFieldInput | 任意 | |
additional_field_4 | AdditionalFieldInput | 任意 | |
additional_field_5 | AdditionalFieldInput | 任意 | |
additional_field_6 | AdditionalFieldInput | 任意 |
Document
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
actual_submission_date | string または null | 必須 | |
additional_fields | AdditionalFields | 必須 | |
created_at | string (date-time) または null | 必須 | |
created_by | UserRef または null | 必須 | |
custom_field_rows | DocumentCustomFieldRow の配列 | 必須 | The register rows the document is linked to that the caller may read, one entry per row in link order. |
description | string または null | 必須 | |
document_date | string または null | 必須 | |
document_id | string | 必須 | |
document_number | string または null | 必須 | |
document_status | object または null | 必須 | The status shown as Status in the Portal (lookup_actionstatus). |
document_sub_type | object または null | 必須 | |
document_type | object または null | 必須 | |
duplicate_of | string または null | 必須 | The number of the document this one duplicates (the Portal's Duplicate Of). |
file | DocumentFile または null | 必須 | The current file; null when the document has none. |
folders | DocumentFolder の配列 | 必須 | The folders the document is filed in that the caller can see. |
from_contact | object または null | 必須 | |
from_organisation | object または null | 必須 | |
is_latest_revision | boolean | 必須 | |
is_locked | boolean | 必須 | |
is_privileged | boolean | 必須 | |
main_document_date | string または null | 必須 | |
owner | UserRef または null | 必須 | |
page_end | number または null | 必須 | Last page of the range this document covers in its file. |
page_start | number または null | 必須 | First page of the range this document covers in its file. |
post_review_status | object または null | 必須 | |
project | object または null | 必須 | The stored project number text, with the project's ID when one matches. |
project_organisation | object または null | 必須 | |
reference_number | string または null | 必須 | |
relevance | number または null | 必須 | 1 is relevant (the default), 0 is irrelevant (the Portal's Irrelevant switch). |
responded_with | string または null | 必須 | The reference of the document that responded to this one (the Portal's Responded With). |
response_date | string または null | 必須 | |
response_due_date | string または null | 必須 | |
revision_number | string または null | 必須 | |
to_contact | object または null | 必須 | |
to_organisation | object または null | 必須 |
DocumentCustomFieldRow
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
custom_field_template_id | string | 必須 | The register the row belongs to. |
row_id | string | 必須 | |
values | object | 必須 | The row's field values, keyed by field name. |
DocumentFile
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
content_type | string または null | 必須 | |
file_hash | string または null | 必須 | The hash the Portal stored for the file's content; null when none was recorded. |
file_name | string | 必須 | |
has_pdf | boolean | 必須 | Whether a PDF rendition of the file is ready (an Office file converts on demand, so false only means not yet). |
is_indexed | boolean | 必須 | Whether the file's text has been indexed for search. |
page_count | integer または null | 必須 | The pages the file has, once the Portal has counted them; null before. |
size_bytes | string または null | 必須 | |
version_id | string | 必須 |
DocumentFolder
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
folder_id | string | 必須 | |
path | string または null | 必須 |
DocumentPatchInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
actual_submission_date | string または null | 任意 | |
additional_fields | AdditionalFieldsInput または null | 任意 | |
created_at | string (date-time) または null | 任意 | |
created_by | UserRefInput または null | 任意 | |
custom_field_rows | object の配列 または null | 任意 | |
description | string または null | 任意 | |
document_date | string または null | 任意 | |
document_id | string または null | 任意 | |
document_number | string または null | 任意 | |
document_status | object または null | 任意 | |
document_sub_type | object または null | 任意 | A sub type of the document's type; changing the type without naming one clears the old type's sub type. |
document_type | object または null | 任意 | |
duplicate_of | string または null | 任意 | |
file | object または null | 任意 | |
folders | object の配列 または null | 任意 | |
from_contact | object または null | 任意 | A contact; its organisation becomes from_organisation. Null clears the person and keeps the organisation. |
from_organisation | object または null | 任意 | |
is_latest_revision | boolean または null | 任意 | |
is_locked | boolean または null | 任意 | |
is_privileged | boolean または null | 任意 | |
main_document_date | string または null | 任意 | |
owner | UserRefInput または null | 任意 | |
page_end | number または null | 任意 | |
page_start | number または null | 任意 | |
post_review_status | object または null | 任意 | |
project | object または null | 任意 | A project you can see; the document moves to it and takes its client as project organisation. Null takes the document out of its project. |
project_organisation | object または null | 任意 | |
reference_number | string または null | 任意 | |
relevance | number または null | 任意 | 0 to 1: 1 is relevant (the default), 0 is irrelevant. |
responded_with | string または null | 任意 | |
response_date | string または null | 任意 | |
response_due_date | string または null | 任意 | |
revision_number | string または null | 任意 | |
to_contact | object または null | 任意 | A contact; its organisation becomes to_organisation. Null clears the person and keeps the organisation. |
to_organisation | object または null | 任意 |
UserRef
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
display_name | string | 必須 | |
kind | string: user, system, integration または string | 必須 | |
user_id | string または null | 必須 |
UserRefInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
display_name | string | 任意 | |
kind | string: user, system, integration | 任意 | |
user_id | string または null | 任意 |