quotes.draft
Read one AI line draft from quotes.draftFromVisit, not a customer quote. Each line's state (draft, approved or rejected), where the price came from, the basis in source_note, comparables, the shop's pricing rules, the written scope_of_work, the shop's lessons, and the next line to read to the worker. For a customer quote, use quotes.get.
| |
|---|
| Who | Agents can call this |
| REST | GET /v1/quotes/drafts/get |
| MCP tool | quotes_draft |
| Writes | no |
| Area | Shop |
When to use it
Read one AI line draft from quotes.draftFromVisit, not a customer quote. Each line's state (draft, approved or rejected), where the price came from, the basis in source_note, comparables, the shop's pricing rules, the written scope_of_work, the shop's lessons, and the next line to read to the worker.
What to tell the owner
Tell them what you found in plain words. Don't read back raw fields.
| Field | Type | Required |
|---|
draft_id | string (uuid) | yes |
Example
GET https://doingwork.work/v1/quotes/drafts/get?draft_id=00000000-0000-4000-8000-000000000000
Output
| Field | Type | Always there |
|---|
draft_id | string (uuid) | yes |
job_id | string (uuid) | yes |
visit_id | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes |
status | string | yes |
quote_id | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes |
scope_of_work | ['string', 'null'] | yes |
pricing_rules | ['string', 'null'] | yes |
instruction | string | yes |
lines | array | yes |
lines[].line_id | string (uuid) | yes |
lines[].position | integer | yes |
lines[].description | string | yes |
lines[].quantity | number | yes |
lines[].unit_price_minor | ['integer', 'null'] | yes |
lines[].source | string | yes |
lines[].source_note | ['string', 'null'] | yes |
lines[].state | string | yes |
lines[].comparables | array | yes |
lines[].comparables[].quote_id | string (uuid) | yes |
lines[].comparables[].status | string | yes |
lines[].comparables[].historical | boolean | yes |
lines[].comparables[].quoted_at | string (date-time) | yes |
lines[].comparables[].customer_id | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes |
lines[].comparables[].customer_name | ['string', 'null'] | yes |
lines[].comparables[].repeat_customer | boolean | yes |
lines[].comparables[].description | string | yes |
lines[].comparables[].quantity | number | yes |
lines[].comparables[].unit_price_minor | integer | yes |
lines[].comparables[].line_total_minor | integer | yes |
lines[].comparables[].size_quantity | ['number', 'null'] | yes |
lines[].comparables[].size_unit | ['string', 'null'] | yes |
lines[].comparables[].unit_rate_minor | ['integer', 'null'] | yes |
lines[].comparables[].notes | ['string', 'null'] | yes |
lines[].comparables[].discounts | array | yes |
lines[].comparables[].discounts[].description | string | yes |
lines[].comparables[].discounts[].quantity | number | yes |
lines[].comparables[].discounts[].unit_price_minor | integer | yes |
lines[].comparables[].discounts[].line_total_minor | integer | yes |
lines[].comparables[].match_reason | string | yes |
lines[].comparables_cursor | ['string', 'null'] | yes |
lines[].price_book | array | yes |
lines[].price_book[].item_id | string (uuid) | yes |
lines[].price_book[].name | string | yes |
lines[].price_book[].unit | ['string', 'null'] | yes |
lines[].price_book[].unit_price_minor | integer | yes |
open_lines | integer | yes |
lessons | array | yes |
next_actions | array | yes |
next_actions[].say | string | yes |
next_actions[].op | ['string', 'null'] | yes |
next_actions[].when | string (one of now, later, check, tell_human) | yes |
next_actions[].due_at | ['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')'] | no |
next_actions[].args_hint | string | no |
{
"draft_id": "00000000-0000-4000-8000-000000000000",
"job_id": "00000000-0000-4000-8000-000000000000",
"visit_id": "00000000-0000-4000-8000-000000000000",
"status": "...",
"quote_id": "00000000-0000-4000-8000-000000000000",
"scope_of_work": "...",
"pricing_rules": "...",
"instruction": "...",
"lines": [
{
"line_id": "00000000-0000-4000-8000-000000000000",
"position": 1,
"description": "40 gallon gas heater, installed",
"quantity": "...",
"unit_price_minor": "...",
"source": "...",
"source_note": "...",
"state": "...",
"comparables": [
{
"quote_id": "00000000-0000-4000-8000-000000000000",
"status": "...",
"historical": true,
"quoted_at": "...",
"customer_id": "00000000-0000-4000-8000-000000000000",
"customer_name": "...",
"repeat_customer": true,
"description": "40 gallon gas heater, installed",
"quantity": "...",
"unit_price_minor": 50000,
"line_total_minor": 50000,
"size_quantity": "...",
"size_unit": "...",
"unit_rate_minor": "...",
"notes": "...",
"discounts": [
{
"description": "40 gallon gas heater, installed",
"quantity": "...",
"unit_price_minor": 50000,
"line_total_minor": 50000
}
],
"match_reason": "..."
}
],
"comparables_cursor": "...",
"price_book": [
{
"item_id": "00000000-0000-4000-8000-000000000000",
"name": "Ruiz Plumbing",
"unit": "...",
"unit_price_minor": 50000
}
]
}
],
"open_lines": 1,
"lessons": [
"..."
],
"next_actions": [
{
"say": "...",
"op": "...",
"when": "now"
}
]
}
Errors
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |