Skip to main content

Read the cached result of a saved search.

GET/api/v1/saved-searches/{saved_search_id}/hitsdocuments:search

Needs View Saved Document Search Results and View Document Metadata. The documents the saved search matched when it last ran, in the order it found them, each read again through the caller's live access: a document the caller can no longer read is left out, and the score is the one of the run. Highlights are not kept. 409 conflict while the saved search is pending or failed.

Scopedocuments:search
AsynchronousNo
MCP toollist_saved_search_hits
Portal permissionsview_saved_document_search_results, view_document_metadata
Company capabilitysearch
Pagingsnapshot
Default orderposition
Sort fieldsposition

Parameters​

NameInTypeRequiredDescription
saved_search_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
409conflictapplication/problem+json Problem
410cursor_expiredapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422invalid_cursor, unsupported_for_tenant, 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 DocumentSearchHitRequired
next_cursorstring or nullRequired
warningsarray of objectRequired

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

CarbonCopy​

FieldTypeRequiredDescription
cc_idstringRequired
contactobject or nullRequiredThe contact of the organisation the copy names; null for the organisation on its own.
organisationobject or nullRequired

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

DocumentSearchHit​

FieldTypeRequiredDescription
actual_submission_datestring or nullRequired
additional_fieldsAdditionalFieldsRequired
attachment_statestring or nullRequirednone, has_attachments or is_attachment (the document is an attachment of another); null unless include names attachment_state.
carbon_copiesarray of CarbonCopyRequiredThe organisations and contacts the document is copied to; empty unless include names carbon_copies.
created_atstring (date-time) or nullRequired
created_byUserRef or nullRequired
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 (name, type, size), as GET /documents/{document_id} shows it; null when the document has none or include leaves file out.
foldersarray of DocumentFolderRequiredThe folders the document is filed in that the caller can see, as GET /documents/{document_id} lists them; empty unless include names folders.
from_contactobject or nullRequired
from_organisationobject or nullRequired
highlightsarray of SearchHighlightRequiredPassages that matched the query, with their pages; empty unless the search asked for highlight, and for the precise engine (filter, meaning).
is_latest_revisionbooleanRequired
is_lockedbooleanRequired
is_privilegedbooleanRequired
locationsarray of SearchHitLocationRequiredThe locations the document is filed in; empty unless include names locations.
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
scorenumberRequiredHow well the document matches the query, higher first. 0 when the search has no query.
tagsarray of SearchHitTagRequiredThe document's tags that are open to the caller; empty unless include names tags.
to_contactobject or nullRequired
to_organisationobject or nullRequired

SearchHighlight​

FieldTypeRequiredDescription
fieldstringRequiredThe field the passage comes from: content, document_number, description, reference_number, from, to, ccs, other_number or folders.
htmlstringRequiredThe passage with the matched words in <b>; everything else is HTML-escaped.
pageinteger or nullRequiredThe 1-based page of the document the passage is on; null when the text has no pages.

SearchHitLocation​

FieldTypeRequiredDescription
location_idstringRequired
pathstring or nullRequired

SearchHitTag​

FieldTypeRequiredDescription
namestringRequired
tag_idstringRequired

UserRef​

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