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
| Parameter | Type | Description |
|---|---|---|
docID | integer | Document ID. |
Body fields (all optional)
| Field | Type | Description |
|---|---|---|
description | string | Document title. Cannot be empty. |
doc_type | string | Document type. |
doc_status | string | Document status. |
from_entity | string | Sending organisation. |
to_entity | string | Receiving organisation. |
rev_number | string | Revision identifier. |
reference_number | string | Reference number. |
date | datetime | ISO 8601 datetime. |
privileged | boolean | Metadata flag. Purely informational. |
Response
200 OK — Full document metadata after update.
Errors
| Status | Reason |
|---|---|
| 400 | No fields provided or description is empty |
| 401 | Invalid or expired token |
| 404 | Document not found or access denied |
| 423 | Document 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
}