--- title: quotes.draftFromVisit | Doing Work API description: Draft quote lines from a visit, in the worker's words and what you saw and heard. You set the price: read comparables and pricing_rules on the result (or. url: https://doingwork.work/docs/reference/quotes-draftfromvisit/ --- # quotes.draftFromVisit Draft quote lines from a visit, in the worker's words and what you saw and heard. You set the price: read comparables and pricing_rules on the result (or call quotes.comparables), apply the shop's rules, and pass unit_price_minor or total_minor plus basis, a short note of how you got the price. That note is stored and read to the owner. Leave the price out and Doing Work fills a default from the closest signed quote, then the price book, then a past quote. The note says it is a default suggestion, not a scaled estimate. Comparables list every matching line (signed, sent, draft, declined, including imported history) with size, unit rate, total, customer, discounts and notes. Every line stays a draft until the worker approves, changes or rejects it (quotes.decideDraftLine). Optional scope_of_work (notes is the same field) is the written scope of work. It stays on the draft and quotes.finishDraft copies it onto the quote so the customer page and PDF show it. Do not put private worker notes in it. Nothing is sent. Read the returned lessons first and follow them. | | | |---|---| | Who | Agents can call this | | REST | `POST /v1/quotes/drafts` | | MCP tool | `quotes_draftFromVisit` | | Writes | yes, send an Idempotency-Key | | Area | [Shop](https://doingwork.work/docs/reference/#shop) | ## When to use it Draft quote lines from a visit, in the worker's words and what you saw and heard. You set the price: read comparables and pricing_rules on the result (or call quotes.comparables), apply the shop's rules, and pass unit_price_minor or total_minor plus basis, a short note of how you got the price. ## What to tell the owner Say what you did in plain words and what happens next. ## Input | Field | Type | Required | |---|---|---| | `visit_id` | string (uuid) | no | | `job_id` | string (uuid) | no | | `scope_of_work` | ['string', 'null'] | no | | `notes` | ['string', 'null'] | no | | `lines` | array | yes | | `lines[].description` | string | yes | | `lines[].quantity` | number | no | | `lines[].unit` | string | no | | `lines[].unit_price_minor` | integer | no | | `lines[].total_minor` | integer | no | | `lines[].basis` | string | no | ## Example ```http POST https://doingwork.work/v1/quotes/drafts content-type: application/json Idempotency-Key: 3f1c... { "lines": [ { "description": "40 gallon gas heater, installed" } ] } ``` ## Output JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are `{code, message, status}`. ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |