quotes.draft
A quote draft with each line's state (draft, approved, rejected), its source, the shop's lessons and the next line to read to the worker.
| |
|---|
| Who | Agents can call this |
| REST | GET /v1/quotes/drafts/get |
| MCP tool | quotes_draft |
| Writes | no |
| Area | Shop |
When to use it
Turn what the worker said and what you saw into quote lines without ever setting a price on your own. Call quotes.draftFromVisit with lines in the worker's words.
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 |
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 |
open_lines | integer | yes |
lessons | array | yes |
next_actions | array | yes |
next_actions[].say | string | yes |
next_actions[].op | ['string', 'null'] | yes |
{
"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",
"lines": [
{
"line_id": "00000000-0000-4000-8000-000000000000",
"position": 1,
"description": "40 gallon gas heater, installed",
"quantity": "...",
"unit_price_minor": "...",
"source": "...",
"source_note": "...",
"state": "..."
}
],
"open_lines": 1,
"lessons": [
"..."
],
"next_actions": [
{
"say": "...",
"op": "..."
}
]
}
Errors
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |