Skip to main content

Get one document.

GET/api/v1/documents/{document_id}documents:read

Needs read access to the document (403 naming the ID otherwise). Folder paths the caller cannot see are not shown. Custom field values are not built in this release.

Scopedocuments:read
AsynchronousNo
MCP toolget_document
Portal permissionsview_document_metadata

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json Document
304Not modified (If-None-Match matched the ETag).
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

AdditionalField​

FieldTypeRequiredDescription
labelstring or nullRequired
valuestring or nullRequired

AdditionalFields​

FieldTypeRequiredDescription
additional_field_3AdditionalFieldRequired
additional_field_4AdditionalFieldRequired
additional_field_5AdditionalFieldRequired
additional_field_6AdditionalFieldRequired

Document​

FieldTypeRequiredDescription
actual_submission_datestring or nullRequired
additional_fieldsAdditionalFieldsRequired
created_atstring (date-time) or nullRequired
created_byUserRef or nullRequired
custom_field_rowsarray of DocumentCustomFieldRowRequiredThe register rows the document is linked to that the caller may read, one entry per row in link order.
descriptionstring or nullRequired
document_datestring or nullRequired
document_idstringRequired
document_numberstring or nullRequired
document_statusobject or nullRequiredThe status shown as Status in the Portal (lookup_actionstatus).
document_sub_typeobject or nullRequired
document_typeobject or nullRequired
duplicate_ofstring or nullRequiredThe number of the document this one duplicates (the Portal's Duplicate Of).
fileDocumentFile or nullRequiredThe current file; null when the document has none.
foldersarray of DocumentFolderRequiredThe folders the document is filed in that the caller can see.
from_contactobject or nullRequired
from_organisationobject or nullRequired
is_latest_revisionbooleanRequired
is_lockedbooleanRequired
is_privilegedbooleanRequired
main_document_datestring or nullRequired
ownerUserRef or nullRequired
page_endnumber or nullRequiredLast page of the range this document covers in its file.
page_startnumber or nullRequiredFirst page of the range this document covers in its file.
post_review_statusobject or nullRequired
projectobject or nullRequiredThe stored project number text, with the project's ID when one matches.
project_organisationobject or nullRequired
reference_numberstring or nullRequired
relevancenumber or nullRequired1 is relevant (the default), 0 is irrelevant (the Portal's Irrelevant switch).
responded_withstring or nullRequiredThe reference of the document that responded to this one (the Portal's Responded With).
response_datestring or nullRequired
response_due_datestring or nullRequired
revision_numberstring or nullRequired
to_contactobject or nullRequired
to_organisationobject or nullRequired

DocumentCustomFieldRow​

FieldTypeRequiredDescription
custom_field_template_idstringRequiredThe register the row belongs to.
row_idstringRequired
valuesobjectRequiredThe row's field values, keyed by field name.

DocumentFile​

FieldTypeRequiredDescription
content_typestring or nullRequired
file_hashstring or nullRequiredThe hash the Portal stored for the file's content; null when none was recorded.
file_namestringRequired
has_pdfbooleanRequiredWhether a PDF rendition of the file is ready (an Office file converts on demand, so false only means not yet).
is_indexedbooleanRequiredWhether the file's text has been indexed for search.
page_countinteger or nullRequiredThe pages the file has, once the Portal has counted them; null before.
size_bytesstring or nullRequired
version_idstringRequired

DocumentFolder​

FieldTypeRequiredDescription
folder_idstringRequired
pathstring or nullRequired

UserRef​

FieldTypeRequiredDescription
display_namestringRequired
kindstring: user, system, integration or stringRequired
user_idstring or nullRequired