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

Update File

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

Partial update — only fields you include are changed. Omitted fields are untouched. Does not modify files.

Request

Content-Type: application/json

Path parameters

ParameterTypeDescription
docIDintegerDocument ID.

Body fields (all optional)

FieldTypeDescription
descriptionstringDocument title. Cannot be empty.
doc_typestringDocument type.
doc_statusstringDocument status.
from_entitystringSending organisation.
to_entitystringReceiving organisation.
rev_numberstringRevision identifier.
reference_numberstringReference number.
datedatetimeISO 8601 datetime.
privilegedbooleanMetadata flag. Purely informational.

Response

200 OK — Full document metadata after update.


Errors

StatusReason
400No fields provided or description is empty
401Invalid or expired token
404Document not found or access denied
423Document is locked

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"}