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.

WhoAgents can call this
RESTPOST /v1/quotes/drafts
MCP toolquotes_draftFromVisit
Writesyes, send an Idempotency-Key
AreaShop

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

FieldTypeRequired
visit_idstring (uuid)no
job_idstring (uuid)no
scope_of_work['string', 'null']no
notes['string', 'null']no
linesarrayyes
lines[].descriptionstringyes
lines[].quantitynumberno
lines[].unitstringno
lines[].unit_price_minorintegerno
lines[].total_minorintegerno
lines[].basisstringno

Example

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

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.