Skip to main content

Get Version History

GET/apiv3/pub/documents/{docID}/versionsdocuments_read

Returns the current active file and the complete archive history, newest first.

Request

Path parameters

ParameterTypeDescription
docIDintegerDocument ID.

Response

200 OK

Current file (current)

FieldTypeDescription
own_idintegerFile version ID.
image_namestringStorage filename.
orig_namestringOriginal uploaded filename.
image_sizeintegerFile size in bytes.
last_modifieddatetimeLast modification.
file_hashstringSHA-256 hash.

Archive history (history)

FieldTypeDescription
own_idintegerArchive record ID.
image_namestringArchived filename.
orig_namestringOriginal filename.
image_sizeintegerFile size in bytes.
entry_datedatetimeWhen archived.
typestringArchive reason (e.g. "replaced in portal").
file_hashstringSHA-256 hash.

Errors

StatusReason
400Invalid docID
401Invalid or expired token
404Document not found or access denied

cURL

curl -i -X GET "https://portal.docwize.com/apiv3/pub/documents/1542/versions" \
-H "Authorization: Bearer <ACCESS_TOKEN>"

{
"current": {
"own_id": 3802,
"image_name": "1542_b8e3d.pdf",
"orig_name": "invoice_v2.pdf",
"image_size": 250000,
"last_modified": "2025-01-16T14:30:00Z",
"file_hash": "e3b0c44298fc1c14..."
},
"history": [
{
"own_id": 101,
"image_name": "1542_a7f2c.pdf",
"orig_name": "invoice.pdf",
"image_size": 245000,
"entry_date": "2025-01-15T10:30:00Z",
"type": "replaced in portal",
"description": "",
"file_hash": "a1b2c3d4e5f6..."
}
]
}
{"detail": "Document not found or access denied"}