v1

latestOpenAPI 3.1.02026-08-04253331435.1 KB
Purchase Orders

Search Purchase Orders

Search purchase orders for an institution.

The query field accepts a Postgres tsquery expression — see the PurchaseOrderSearchFilters docstring for syntax and examples. Malformed tsquery returns 400 with the Postgres syntax error.

All filters compose with AND: matching POs must satisfy every supplied filter (institution_ids, query, amount range, date range).

At least one of institution_ids or query must be supplied — unbounded scans of the 235M-row PO table are rejected.

post/api/internal/purchase-orders/search

Request body

institution_idsstring[] nullable
querystring nullable
statesstring[] nullable
source_tablesstring[] nullable
min_amountnumber nullable
max_amountnumber nullable
start_datestring date nullable
end_datestring date nullable
sort'po_date_desc' | 'amount_desc'
offsetinteger
limitinteger

Response

Successful Response

totalinteger required
offsetinteger required
limitinteger required