RFQ product suggestions

GET /v1/suggest is advisory typeahead over the same current published in-memory snapshot used by Resolve. Call it from your backend, using an mtk_ key with taxonomy:read; never expose that key to the browser. No new client enablement or rate-profile migration is required.

This page describes the current endpoint. The canonical-model decision requires ordinary suggestions to use MeatBorsa meaning, with external standards available as references. During consolidation, Suggest only offers concepts belonging to meatborsa or a versioned UNECE-* scheme. UNECE suggestions provide transitional coverage as products are migrated.

Request

GET /v1/suggest?q=10+tons+frozen+beef+hind&limit=8&locale=en
Authorization: Bearer <server-side-service-key>

An input with fewer than two normalized characters returns 200 with an empty suggestions array. Invalid/missing parameters return 400. No matches is a normal empty result, not an error. There is no historical-release selector or selected-concept binding. Draft resolution is a separate REST mode documented in Interactive RFQ resolution. The API's HTTP header/request-line limit is 32 KiB to accommodate percent-encoded Unicode RFQs; any caller-side proxy must also allow the resulting URI size (up to about 24 KiB for q alone).

Response and ranking

The response contains taxonomyRelease: { id, version, contentChecksum } and suggestions. Each suggestion has:

Token-boundary prefixes can occur anywhere in the RFQ. Only the final token of a partial match may be incomplete. Punctuation, quantities, and reviewed attribute/commercial terms delimit product phrases (including canonical attribute values available through indexed aliases); newer product wording and compatible species context receive ranking preference. Exact completed terms may still match before trailing prose. Matching does not join separate list items. If any useful prefix matches exist, only prefix results are returned; fuzzy matches do not pad the list. A shorter suffix match does not add unrelated products beside a stronger multi-word prefix; an earlier species-only fragment also cannot pad more specific product wording. Pure reviewed attribute/commercial wording alone does not expand into product prefixes (a complete reviewed product term can still match). Otherwise bounded query windows use the existing term trigrams with a conservative similarity threshold. Pure recognized context, quantities, or commercial wording cannot trigger fuzzy products.

One best term wins per concept. The current implementation returns different species/scheme concepts as separate choices. This is existing behavior, not a requirement to preserve duplicate canonical products under the target model. Eligible concepts are active cuts, carcasses, offal, fat, by-products, processed products, product families, and resolver-recognized live-animal roots; standalone anatomy, species, and commodity context are not product suggestions. Existing reviewed replacement mappings apply. This searches the terms available in every locale, not a promise of complete multilingual product coverage.

Scheme eligibility uses the concept's own membership, not the matched term's scheme or source. At least one membership must have code meatborsa or begin with UNECE-; concepts with only other schemes, no membership, or unknown scheme IDs are excluded. This includes legacy MeatBorsa family schemes until their concepts are migrated. The filter applies before prefix/fuzzy matching and result limits. Reviewed aliases remain searchable for eligible concepts, regardless of their source scheme. This policy applies only to Suggest; Resolve, concept lookup, and published data are unchanged.

Families, partial product descriptions, and external-standard records are not interchangeable meanings. Until migration, consumers must not collapse their IDs or aggregate listing counts by similar labels. Canonical reconciliation and reviewed tag migration must address equivalent products split across those IDs; merely hiding standard badges does not fix that fragmentation.

Selecting a suggestion should improve the buyer-visible text; it does not force Resolve to select that concept. Resolve remains authoritative and may be unresolved or ambiguous. Both operations use their own current snapshot: if the returned release IDs differ, accept the newer Resolve result and refresh visible suggestions. An individual Suggest response never mixes releases.

Limits, privacy, and failure behavior

The dedicated Suggest budget is per client, per replica, shared by that client's credentials: 6,000 requests in any rolling 60 seconds, plus 200 requests in any rolling second. A 200 rps burst lasting 10 seconds fits when at least 2,000 requests of minute-budget headroom are available. This does not reserve capacity or certify production throughput. Existing operations keep their limits. Counters are in-process and reset on process replacement; two replicas do not provide one exact global quota. No Redis/Valkey is required for the current internal-client scope.

Successful responses expose minute-budget RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset (seconds until the oldest request expires). A 429 reports the blocking minute or second window and Retry-After; wait at least that long. Debounce requests (about 250 ms), cancel superseded requests, and discard stale responses. Keep the manual RFQ form usable on errors.

Responses, including errors, use Cache-Control: no-store. Remove personal/contact details before calling; do not log the query string in Raptor or intermediary access logs. Meat Ontology's application logs/traces/metrics exclude RFQ text and credentials. Suggest does not call Resolve or write events, resolution cases, rechecks, or unknown-vocabulary aggregates. Normal authentication verification and best-effort client last-used accounting still apply; this is not a promise of zero database activity across authentication and background snapshot refresh.

The shared Caddy routes redact the q parameter in access logs without changing the forwarded request, using Caddy's query filter. Deploy that routing change together with the endpoint; other intermediaries need equivalent hygiene.

A loaded snapshot remains usable during failed refreshes; without an initial snapshot the endpoint returns 503 TAXONOMY_SNAPSHOT_UNAVAILABLE with Retry-After: 1. Authentication cache misses and expiry still require PostgreSQL (currently a 30-second cache). Longer database-outage authentication support is deferred. Existing endpoint metrics automatically cover Suggest; new production dashboards, alert policies and production capacity/network certification are separate later work. Suggest was deployed to both production API hosts on 2026-08-30.

TypeScript client

const controller = new AbortController();
const result = await client.suggestMeatProducts(
  { q: "10 tons frozen beef hind", limit: 8, locale: "en" },
  { signal: controller.signal },
);
// Display matchedTerm.displayText with species/scheme context. Do not automatically tag the RFQ.

Interactive Resolve is a separate delivery; see Interactive RFQ resolution. Structured clarification answers remain deferred. Ordinary POST /v1/resolve remains ledgered. Existing Resolve behavior and all MCP tools are unchanged.

Local verification — 30 August 2026

Deploy API changes and Caddy access-log redaction together. The production workflow pins the current Caddy image, reloads routing on both hosts while drained, and verifies authenticated Suggest through the API and load balancer. Raptor UI acceptance and production capacity/network certification remain separate work; interactive Resolve is not part of this slice.