quotes.comparables
Past prices related to one new line, for you to price it. Every matching quote line is included: signed, sent, draft, and declined, including quotes imported as history. Signed first, then newest. Each row has the description, the size and unit (from the import when the file had a size column, otherwise from the description: sq ft, lf, each, hour, and the same spellings), the unit rate when that size is there, the line total, status, date, customer, whether that customer has another quote here, discount lines, notes, and why it matched. Pass cursor for the next page. Also returns the owner's pricing rules and recent quote lessons. You do the math, apply the shop's rules, and explain the price to the owner. Nothing is priced or sent here.
| |
|---|
| Who | Agents can call this |
| REST | GET /v1/quotes/comparables |
| MCP tool | quotes_comparables |
| Writes | no |
| Area | Shop |
When to use it
Past prices related to one new line, for you to price it. Every matching quote line is included: signed, sent, draft, and declined, including quotes imported as history.
What to tell the owner
Tell them what you found in plain words. Don't read back raw fields.
| Field | Type | Required |
|---|
shop_id | string (uuid) | yes |
description | string | yes |
quantity | number | no |
unit | string | no |
limit | integer | no |
cursor | string | no |
Example
GET https://doingwork.work/v1/quotes/comparables?shop_id=00000000-0000-4000-8000-000000000000&description=40 gallon gas heater, installed
Output
| Field | Type | Always there |
|---|
shop_id | string (uuid) | yes |
description | string | yes |
asked_quantity | ['number', 'null'] | yes |
asked_unit | ['string', 'null'] | yes |
pricing_rules | ['string', 'null'] | yes |
lessons | array | yes |
instruction | string | yes |
comparables | array | yes |
comparables[].quote_id | string (uuid) | yes |
comparables[].status | string | yes |
comparables[].historical | boolean | yes |
comparables[].quoted_at | string (date-time) | yes |
comparables[].customer_id | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes |
comparables[].customer_name | ['string', 'null'] | yes |
comparables[].repeat_customer | boolean | yes |
comparables[].description | string | yes |
comparables[].quantity | number | yes |
comparables[].unit_price_minor | integer | yes |
comparables[].line_total_minor | integer | yes |
comparables[].size_quantity | ['number', 'null'] | yes |
comparables[].size_unit | ['string', 'null'] | yes |
comparables[].unit_rate_minor | ['integer', 'null'] | yes |
comparables[].notes | ['string', 'null'] | yes |
comparables[].discounts | array | yes |
comparables[].discounts[].description | string | yes |
comparables[].discounts[].quantity | number | yes |
comparables[].discounts[].unit_price_minor | integer | yes |
comparables[].discounts[].line_total_minor | integer | yes |
comparables[].match_reason | string | yes |
price_book | array | yes |
price_book[].item_id | string (uuid) | yes |
price_book[].name | string | yes |
price_book[].unit | ['string', 'null'] | yes |
price_book[].unit_price_minor | integer | yes |
next_cursor | ['string', 'null'] | yes |
{
"shop_id": "00000000-0000-4000-8000-000000000000",
"description": "40 gallon gas heater, installed",
"asked_quantity": "...",
"asked_unit": "...",
"pricing_rules": "...",
"lessons": [
"..."
],
"instruction": "...",
"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": "..."
}
],
"price_book": [
{
"item_id": "00000000-0000-4000-8000-000000000000",
"name": "Ruiz Plumbing",
"unit": "...",
"unit_price_minor": 50000
}
],
"next_cursor": "..."
}
Errors
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |