--- title: quotes.search | Doing Work API description: Search a shop's past quotes by scope words (for example "water heater 50 gallon garage"); AI can draft lines from a match and a person who can send quotes. url: https://doingwork.work/docs/reference/quotes-search/ --- # quotes.search Search a shop's past quotes by scope words (for example "water heater 50 gallon garage"); AI can draft lines from a match and a person who can send quotes approves agent-drafted lines before the quote is sent. Matches the job summary and line items, most words matched first, signed quotes first at a tie, then newest. Read only. Prices show only to people who can see prices. | | | |---|---| | Who | Agents can call this | | REST | `GET /v1/quotes/search` | | MCP tool | `quotes_search` | | Writes | no | | Area | [Shop](https://doingwork.work/docs/reference/#shop) | ## When to use it Search a shop's past quotes by scope words (for example "water heater 50 gallon garage"); AI can draft lines from a match and a person who can send quotes approves agent-drafted lines before the quote is sent. Matches the job summary and line items, most words matched first, signed quotes first at a tie, then newest. ## What to tell the owner Tell them what you found in plain words. Don't read back raw fields. ## Input | Field | Type | Required | |---|---|---| | `shop_id` | string (uuid) | yes | | `q` | string | yes | | `status` | string (one of draft, sent, signed, declined, superseded, withdrawn) | no | | `exclude_job_id` | string (uuid) | no | | `limit` | integer | no | ## Example ```http GET https://doingwork.work/v1/quotes/search?shop_id=00000000-0000-4000-8000-000000000000&q=... ``` ## Output | Field | Type | Always there | |---|---|---| | `words` | array | yes | | `quotes` | array | yes | | `quotes[].quote_id` | string (uuid) | yes | | `quotes[].job_id` | string (uuid) | yes | | `quotes[].status` | string | yes | | `quotes[].created_at` | string (date-time) | yes | | `quotes[].job_summary` | ['string', 'null'] | yes | | `quotes[].customer_name` | ['string', 'null'] | yes | | `quotes[].total_minor` | ['integer', 'null'] | yes | | `quotes[].matched` | array | yes | | `quotes[].lines` | array | yes | | `quotes[].lines[].description` | string | yes | | `quotes[].lines[].quantity` | number | yes | | `quotes[].lines[].unit_price_minor` | ['integer', 'null'] | 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 | ```json { "words": [ "..." ], "quotes": [ { "quote_id": "00000000-0000-4000-8000-000000000000", "job_id": "00000000-0000-4000-8000-000000000000", "status": "...", "created_at": "...", "job_summary": "...", "customer_name": "...", "total_minor": "...", "matched": [ "..." ], "lines": [ { "description": "40 gallon gas heater, installed", "quantity": "...", "unit_price_minor": "..." } ] } ], "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](https://doingwork.work/docs/errors/). |