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
| Parameter | Type | Description |
|---|---|---|
docID | integer | Document ID. |
Response
200 OKCurrent file (current)
| Field | Type | Description |
|---|---|---|
own_id | integer | File version ID. |
image_name | string | Storage filename. |
orig_name | string | Original uploaded filename. |
image_size | integer | File size in bytes. |
last_modified | datetime | Last modification. |
file_hash | string | SHA-256 hash. |
Archive history (history)
| Field | Type | Description |
|---|---|---|
own_id | integer | Archive record ID. |
image_name | string | Archived filename. |
orig_name | string | Original filename. |
image_size | integer | File size in bytes. |
entry_date | datetime | When archived. |
type | string | Archive reason (e.g. "replaced in portal"). |
file_hash | string | SHA-256 hash. |
Errors
| Status | Reason |
|---|---|
| 400 | Invalid docID |
| 401 | Invalid or expired token |
| 404 | Document 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..."
}
]
}