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

ファイルの更新 (Update File)

PATCH/apiv3/pub/documents/{docID}documents_write

部分更新です — 指定したフィールドのみが変更されます。省略したフィールドは変更されません。ファイル自体は変更されません。

リクエスト​

Content-Type: application/json

パスパラメータ​

パラメータ型説明
docIDintegerドキュメント ID です。

ボディフィールド(すべて任意)​

フィールド型説明
descriptionstringドキュメントのタイトルです。空にはできません。
doc_typestringドキュメントの種類です。
doc_statusstringドキュメントのステータスです。
from_entitystring送信元組織です。
to_entitystring受信先組織です。
rev_numberstring改訂識別子です。
reference_numberstring参照番号です。
datedatetimeISO 8601 形式の日時です。
privilegedbooleanメタデータフラグです。情報提供のみを目的としています。

レスポンス​

200 OK — 更新後のドキュメントの完全なメタデータです。


エラー​

ステータス理由
400フィールドが指定されていないか、description が空です
401トークンが無効または期限切れです
404ドキュメントが見つからないか、アクセスが拒否されました
423ドキュメントがロックされています

cURL​

curl -i -X PATCH "https://portal.docwize.com/apiv3/pub/documents/1542" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"doc_status":"Final","rev_number":"B"}'

{
"id": 1542,
"description": "January Invoice",
"doc_type": "Invoice",
"doc_status": "Final",
"from_entity": "Acme Corp",
"to_entity": "Widget Inc",
"rev_number": "B",
"reference_number": "INV-2025-001",
"date": "2025-01-15T00:00:00Z",
"privileged": false,
"islocked": false
}
{"detail": "No fields to update"}
{"detail": "Document is locked"}