v1

latestOpenAPI 3.1.02026-08-04253331435.1 KB
Contracts

Search Contracts

Search contracts (retool.contract_data).

Three orthogonal text inputs, AND'd together:

  • vendors: array of vendor terms (weight A in text_search_strict)
  • products: array of product terms (weight B in text_search_strict)
  • query: free-text over raw_text (text_search_prose, english config)

See ContractSearchFilters docstring for the full syntax. All filters are optional — the table is small enough (~7K rows) to allow unbounded scans.

post/api/internal/contracts/search

Request body

querystring nullable

Free-text search over the contract body (raw_text, english config, stemming on). Supports websearch syntax: quoted phrases, OR, leading '-' to exclude.

contract_start_afterstring date nullable
contract_start_beforestring date nullable
contract_end_afterstring date nullable
contract_end_beforestring date nullable
min_total_acvnumber nullable
max_total_acvnumber nullable
min_annual_acvnumber nullable
max_annual_acvnumber nullable
institution_idsstring[] nullable
statesstring[] nullable
source_tablesstring[] nullable
sort'relevance' | 'contract_start_date_desc' | 'contract_start_date_asc' | 'contract_end_date_asc' | 'contract_end_date_desc' | 'total_acv_desc' | 'annual_acv_desc' | 'created_at_desc'
offsetinteger
limitinteger

Response

Successful Response

totalinteger required
offsetinteger required
limitinteger required