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.

WhoAgents can call this
RESTGET /v1/quotes/comparables
MCP toolquotes_comparables
Writesno
AreaShop

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.

Input

FieldTypeRequired
shop_idstring (uuid)yes
descriptionstringyes
quantitynumberno
unitstringno
limitintegerno
cursorstringno

Example

GET https://doingwork.work/v1/quotes/comparables?shop_id=00000000-0000-4000-8000-000000000000&description=40 gallon gas heater, installed

Output

FieldTypeAlways there
shop_idstring (uuid)yes
descriptionstringyes
asked_quantity['number', 'null']yes
asked_unit['string', 'null']yes
pricing_rules['string', 'null']yes
lessonsarrayyes
instructionstringyes
comparablesarrayyes
comparables[].quote_idstring (uuid)yes
comparables[].statusstringyes
comparables[].historicalbooleanyes
comparables[].quoted_atstring (date-time)yes
comparables[].customer_id['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')']yes
comparables[].customer_name['string', 'null']yes
comparables[].repeat_customerbooleanyes
comparables[].descriptionstringyes
comparables[].quantitynumberyes
comparables[].unit_price_minorintegeryes
comparables[].line_total_minorintegeryes
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[].discountsarrayyes
comparables[].discounts[].descriptionstringyes
comparables[].discounts[].quantitynumberyes
comparables[].discounts[].unit_price_minorintegeryes
comparables[].discounts[].line_total_minorintegeryes
comparables[].match_reasonstringyes
price_bookarrayyes
price_book[].item_idstring (uuid)yes
price_book[].namestringyes
price_book[].unit['string', 'null']yes
price_book[].unit_price_minorintegeryes
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

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