admin-supplier-quotes

Accept Supplier Quote Won

Mark a SupplierQuote as the winning supplier for the RFQ.

Stamps SupplierQuote.accepted_at = utcnow() and writes an AgentAction(action_type="vendors_ranker_outcome") capturing which supplier won + which suppliers were considered at routing time. The outcome feeds the v2 ranker's history bonus with a precise per-supplier signal (replaces the approximate Quote.status == APPROVED join).

Idempotent (eng-review §accept-won-idempotency): a second call against the same quote does NOT duplicate the AgentAction row, but DOES re-stamp accepted_at. See :meth:SupplierQuoteService.accept_won for the full contract.

Distinct from :func:accept_supplier_quote (the PRO-113 HitL gate clear). Accept-won is a higher-level signal: "this is the supplier we're going with"; the legacy accept only clears the per-row review flags.

Plan reference: .claude/plans/active/vendors-agent-supplier-ranking-and-intelligent-routing.md (Phase 3 — Outcome capture + Calibration loop hook).

post/api/v1/admin/supplier-quotes/{quote_id}/accept-won

Path parameters

quote_idstring uuid required

Response

Successful Response

idstring uuid required
project_idstring uuid required
supplier_contact_idstring uuid required
supplier_contact_namestring required
supplier_contact_emailstring required
gmail_thread_idstring nullable
sourcestring
total_amount_centsinteger nullable required
currencystring required
lead_time_daysinteger nullable required
valid_untilstring date-time nullable required
line_itemsobject[] required
notesstring nullable required
source_email_bodystring nullable
attachment_r2_keysstring[]
attachment_kindsstring[]
document_kindstring nullable
extraction_confidencenumber nullable
needs_human_reviewboolean required
reviewed_atstring date-time nullable required
reviewed_bystring uuid nullable required
accepted_atstring date-time nullable
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this endpoint across all 1 revision of this API.