Skip to main content

List a document's attachments.

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

The documents attached under the document's main document number that the caller can read, the main document itself included, each with its place in the attachment tree: main_document_number, parent_document_id (null for the root or an unreadable parent), is_root and depth (0 for the main document, 1 for MAIN.001, 2 for MAIN.001.001).

Scopedocuments:read
AsynchronousNo
MCP toollist_document_attachments
Portal permissionsview_document_attachments
Pagingkeyset
Default orderattached_document_id
Sort fieldsattached_document_id

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
limitqueryintegerOptionalDefault: 50; ≥ 1
cursorquerystringOptional
sortquerystringOptionalComma-separated sort fields, - for descending.
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json object
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
410cursor_expiredapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422invalid_cursor, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

200 body​

FieldTypeRequiredDescription
itemsarray of AttachmentRequired
next_cursorstring or nullRequired
warningsarray of objectRequired

Errors​

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

Schemas​

Attachment​

FieldTypeRequiredDescription
attached_document_idstringRequired
depthintegerRequiredHow many attachment levels below the main document: 0 for the main document, 1 for MAIN.001, 2 for MAIN.001.001. ≥ -2147483648; ≤ 2147483647
document_numberstring or nullRequired
is_rootbooleanRequiredTrue when the document has no parent you can read: the main document the tree hangs from, as the Explorer's lineage view marks it.
main_document_numberstring or nullRequiredThe number of the document this one hangs from (the Portal's Main Doc Number); the document's own number, or null, for the root of the tree.
parent_document_idstring or nullRequiredThe document this one is attached to; null for the root of the tree and when the parent is not readable by you.