admin-supplier-quotes
Upload Supplier Quote Attachment
Append an admin-uploaded attachment to a SupplierQuote (Phase 4).
The inbound agent persists supplier attachments automatically (see prepare_quote_attachment MCP tool), but two failure modes call for a manual admin upload:
- The Anthropic Files API was down AND the local PDF fallback returned empty text (the agent escalated rather than persisted).
- The supplier sent a follow-up document (an invoice) on a thread that was already closed at the quoted state.
Behavior:
- Streams the file to R2 under the SAME prefix the inbound agent uses (vendors/inbound-attachments/<gmail_message_id>/<filename>) so the existing source-preview-url endpoint serves admin and agent uploads uniformly.
- Appends the R2 key to SupplierQuote.attachment_r2_keys AND the kind tag to SupplierQuote.attachment_kinds (parallel-array invariant). When the quote was created by the inbound agent BEFORE Phase 3 shipped, attachment_kinds may be empty; the handler synthesizes ["quote"] * len(attachment_r2_keys) to backfill before appending the new tag.
- Returns the updated :class:SupplierQuoteRead so the FE can immediately re-render the attachment list without a second GET.
Enforces a 25MB cap matching the inbound agent's ceiling.
post/api/v1/admin/supplier-quotes/{quote_id}/attachments
Path parameters
quote_idstring uuid required
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.