Skip to main content
A search finds documents by what they are rather than by their identifier — their metadata definition, category, creation time, transaction status or the values of their metadata fields. This guide narrows the collection down with query parameters, searches on a metadata value, and applies a view somebody saved in the web app. It takes four calls.

Before you begin

Step 1: List documents with filters

The documents collection is filtered with query parameters:
Request
Response
A few things to notice:
  • Every filter you add narrows the result further — a document is returned only if it matches all of them. Repeat one parameter to widen it instead: ?category=Contract&category=Lease returns documents in either category.
  • Documents come back newest first, or best match first when you search with query, each one the same representation GET /documents/{id} returns.
  • total counts every match, not just this page. pagination describes the page you got.
query searches the document’s title and its text content instead of a specific field, matching a document that holds any of its words — useful when your integration has a search box rather than a set of filters.
Long result sets are walked with limit and the opaque cursor rather than a growing offset — Page through collections covers both.

Step 2: Search on metadata values

The values of metadata-definition fields do not fit into query parameters, so the search endpoint takes the same filters in a request body and adds metadataFields:
Request
Response
Values are keyed by field identifier, exactly as when you store them. Selection, date and number fields are matched exactly; free-text fields are matched by full text.
Both endpoints search your active documents. Pass trashed to search what you have thrown away instead.

Step 3: List your saved views

A view is a set of filters saved in the Circularo web app. Your own are listed on your account:
Request
Response
Each entry is an identifier and the name the person gave it. The filters behind it stay private to the interface — your integration applies a view rather than reading it.

Step 4: Apply the saved view

Pass the identifier as viewId:
Request
Response
The view’s filters run on the server exactly as they do in the interface — here: contracts created this month whose transaction has not started yet. Because a view already carries a complete set of filters, it is used on its own: combining it with another filter is rejected with 400, while limit and offset work as usual.

Complete example

Pulling every match of one search, page by page, as a Node.js script. Error handling is minimal for brevity — in production, inspect the error envelope of non-2xx responses.

Next steps