Update quote
update_quoteUpdate a quote: change its status (exactly draft → sent → accepted / lost), link an opportunity, or replace its line items. When you pass lines, the SERVER re-prices from the catalog and replaces the whole line set, recomputing the total — you never pass a price (catalog products price from unit_price_cents (integer cents) and pricing_mode on the product object; per_unit multiplies by quantity, flat charges once, a missing or unknown pricing_mode resolves to flat, a flat line with quantity > 1 is flagged). Discounts are percent only (per-line discount_pct and/or a quote-level discount_pct) and apply when you re-price, so pass lines to change a discount. Status- or opportunity-only edits don't re-price. A quote is a pre-commit artifact (invoicing and contracts happen elsewhere). Returns the updated quote, its priced lines and flags.
When to use: The user wants to change a quote that already exists.
Example: Mark Acme's quote as sent, and add 5 more units.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | A uuid. | |
| name | No | New display name for the quote; replaces the stored header name. | |
| lines | No | At least one item. | |
| notes | No | New free-text notes for the quote header; replaces the stored notes and never affects pricing. | |
| status | No | One of: draft | sent | accepted | lost. | |
| valid_until | No | Must match /^\d{4}-\d{2}-\d{2}$/. | |
| discount_pct | No | A number from 0 to 100. | |
| opportunity_id | No | Opportunity to link the quote to (must exist in this workspace); null clears the link, omitting leaves it unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| quote | No | ||
| updated | No | ||
| guidance | No | ||
| repriced | No | ||
| line_items | No | ||
| mixed_cadence | No | ||
| missing_objects | No | ||
| tier_validations | No | ||
| annualized_total_cents | No | ||
| pricing_mode_validations | No |