Capabilities

documents.search

Changed on

Search, filter, and retrieve user's documents. Supports text search, filtering by document type, export status, date ranges, sorting, and semantic similarity. In filter-only mode, use offset for stable pagination and reviewStatus for canonical review selection. totalCount is the returned page size, not the full matching population. Linked pairs are separate documents. Use documents.count for counts or grouped summaries across all matching documents.

post/capabilities/documents.search

Request

  • Base URL: https://developer.api.receiptor.ai/v1
  • URL: https://developer.api.receiptor.ai/v1/capabilities/documents.search
  • Auth: one of:
    • API key in header x-receiptor-api-key
    • HTTP bearer

Request body

querystring

Text query (used only when useSearch=true). Omit in filter-only mode.

limitinteger

Maximum documents to return (1-100)

offsetinteger

Documents to skip; requires useSearch=false.

reviewStatus'needs-review' | 'ready'

Canonical review filter; requires useSearch=false. Includes both sides of linked pairs.

sortBy'receivedAt' | 'docDate' | 'amount' | 'merchant' | 'createdAt' | 'updatedAt'

Sort field (receivedAt, docDate, amount, merchant, createdAt, updatedAt)

sortOrdernumber

Sort order: 1 asc, -1 desc

useSearchboolean

Enable semantic/text search

searchType'similarity' | 'mmr'

Search mode when useSearch=true: similarity (exact-ish) or mmr (broader)

exportStatus'all' | 'exported' | 'not-exported'

Export status filter

archived'exclude' | 'only' | 'include'

Archive filter: exclude (default, active docs), only (archived docs), include (both).

outputMode'compact' | 'complete'

Response shape: compact (default) or complete

requiredFieldsstring[]

Always include these extra fields (in addition to outputMode defaults). Allowed fields: id, merchant, amount, currency, preferredCurrency, conversionRate, date, docDate, dueDate, receivedAt, category, docType, summary, expenseLocation, invoiceId, receiptId, paymentStatus, entityId, entityName, exportStatus, linkedTo, review, link.

Response

Successful response

successboolean
codeinteger

Example response

{
  "success": true,
  "code": 200
}

Changes

    • info

      added the new dueDate enum value to the request property /

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new linkedTo enum value to the request property /

    • info

      added the new review enum value to the request property /