visits.brief

One page brief before a visit: the visit and customer, the address, the request it came from, recent texts with the customer (customer words come wrapped as untrusted text) and calls (owner or office only), emails, notes with their full text and channel, recordings and private truck notes (marked internal), photos and videos with who provided each file (shop or customer) and the channel it arrived on, this job's quotes and invoices, other jobs at the same property, equipment, daily logs, open tasks, and similar past quotes. Notes and media are paged (notes_cursor, media_cursor). Read only. Prices show only to people who can see prices. next_actions suggests what to do at or after the visit.

WhoAgents can call this
RESTGET /v1/visits/brief
MCP toolvisits_brief
Writesno
AreaScheduling and visits

When to use it

One page brief before a visit: the visit and customer, the address, the request it came from, recent texts with the customer (customer words come wrapped as untrusted text) and calls (owner or office only), emails, notes with their full text and channel, recordings and private truck notes (marked internal), photos and videos with who provided each file (shop or customer) and the channel it arrived on, this job's quotes and invoices, other jobs at the same property, equipment, daily logs, open tasks, and similar past quotes. Notes and media are paged (notes_cursor, media_cursor).

What to tell the owner

Tell them what you found in plain words. Don't read back raw fields.

Input

FieldTypeRequired
visit_idstring (uuid)yes
notes_cursorstringno
media_cursorstringno

Example

GET https://doingwork.work/v1/visits/brief?visit_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
visitobjectyes
visit.visit_idstring (uuid)yes
visit.job_idstring (uuid)yes
visit.starts_atstring (date-time)yes
visit.ends_atstring (date-time)yes
visit.statusstringyes
visit.title['string', 'null']yes
visit.job_summary['string', 'null']yes
customerobjectyes
customer.customer_id['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')']yes
customer.name['string', 'null']yes
customer.phone['string', 'null']yes
customer.email['string', 'null']yes
customer.address['string', 'null']yes
request['object', 'null']yes
messagesarrayyes
messages[].atstring (date-time)yes
messages[].directionstringyes
messages[].channelstringyes
messages[].customer_text['object', 'null']yes
messages[].shop_text['string', 'null']yes
callsarrayyes
calls[].atstring (date-time)yes
calls[].directionstringyes
calls[].duration_s['integer', 'null']yes
calls[].summary['string', 'null']yes
notesarrayyes
notes[].note_idstring (uuid)yes
notes[].atstring (date-time)yes
notes[].sourcestringyes
notes[].channel['string', 'null']yes
notes[].pinnedbooleanyes
notes[].bodystringyes
notes_cursor['string', 'null']yes
mediaarrayyes
media[].media_idstring (uuid)yes
media[].kindstringyes
media[].stagestringyes
media[].provided_bystringyes
media[].channelstringyes
media[].summary['string', 'null']yes
media[].measurements['array', 'object', 'null']yes
media_cursor['string', 'null']yes
recordingsarrayyes
recordings[].recording_idstring (uuid)yes
recordings[].visit_idstring (uuid)yes
recordings[].described_as['string', 'null']yes
recordings[].clip_ref['string', 'null']yes
recordings[].transcript['string', 'null']yes
recordings[].worker_notes['object', 'null']yes
quotesarrayyes
quotes[].quote_idstring (uuid)yes
quotes[].statusstringyes
quotes[].historicalbooleanyes
quotes[].total_minor['integer', 'null']yes
invoicesarrayyes
invoices[].invoice_idstring (uuid)yes
invoices[].statusstringyes
invoices[].total_minor['integer', 'null']yes
other_jobsarrayyes
other_jobs[].job_idstring (uuid)yes
other_jobs[].summary['string', 'null']yes
other_jobs[].statusstringyes
equipmentarrayyes
equipment[].equipment_idstring (uuid)yes
equipment[].kindstringyes
equipment[].make['string', 'null']yes
equipment[].model['string', 'null']yes
equipment[].serial['string', 'null']yes
daily_logsarrayyes
daily_logs[].log_idstring (uuid)yes
daily_logs[].log_datestringyes
daily_logs[].bodystringyes
emailsarrayyes
emails[].atstring (date-time)yes
emails[].channelstringyes
emails[].kindstringyes
emails[].subjectstringyes
emails[].bodystringyes
open_tasksarrayyes
open_tasks[].task_idstring (uuid)yes
open_tasks[].titlestringyes
open_tasks[].due_at['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')']yes
similar_quotesarrayyes
similar_quotes[].quote_idstring (uuid)yes
similar_quotes[].job_idstring (uuid)yes
similar_quotes[].statusstringyes
similar_quotes[].created_atstring (date-time)yes
similar_quotes[].job_summary['string', 'null']yes
similar_quotes[].customer_name['string', 'null']yes
similar_quotes[].total_minor['integer', 'null']yes
similar_quotes[].matchedarrayyes
similar_quotes[].linesarrayyes
similar_quotes[].lines[].descriptionstringyes
similar_quotes[].lines[].quantitynumberyes
similar_quotes[].lines[].unit_price_minor['integer', 'null']yes
has_quotebooleanyes
next_actionsarrayyes
next_actions[].saystringyes
next_actions[].op['string', 'null']yes
next_actions[].whenstring (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_hintstringno
{
  "visit": {
    "visit_id": "00000000-0000-4000-8000-000000000000",
    "job_id": "00000000-0000-4000-8000-000000000000",
    "starts_at": "...",
    "ends_at": "...",
    "status": "...",
    "title": "...",
    "job_summary": "..."
  },
  "customer": {
    "customer_id": "00000000-0000-4000-8000-000000000000",
    "name": "Ruiz Plumbing",
    "phone": "...",
    "email": "owner@example.com",
    "address": "..."
  },
  "request": "...",
  "messages": [
    {
      "at": "...",
      "direction": "...",
      "channel": "...",
      "customer_text": "...",
      "shop_text": "..."
    }
  ],
  "calls": [
    {
      "at": "...",
      "direction": "...",
      "duration_s": "...",
      "summary": "..."
    }
  ],
  "notes": [
    {
      "note_id": "00000000-0000-4000-8000-000000000000",
      "at": "...",
      "source": "...",
      "channel": "...",
      "pinned": true,
      "body": "..."
    }
  ],
  "notes_cursor": "...",
  "media": [
    {
      "media_id": "00000000-0000-4000-8000-000000000000",
      "kind": "...",
      "stage": "...",
      "provided_by": "...",
      "channel": "...",
      "summary": "...",
      "measurements": "..."
    }
  ],
  "media_cursor": "...",
  "recordings": [
    {
      "recording_id": "00000000-0000-4000-8000-000000000000",
      "visit_id": "00000000-0000-4000-8000-000000000000",
      "described_as": "...",
      "clip_ref": "...",
      "transcript": "...",
      "worker_notes": "..."
    }
  ],
  "quotes": [
    {
      "quote_id": "00000000-0000-4000-8000-000000000000",
      "status": "...",
      "historical": true,
      "total_minor": "..."
    }
  ],
  "invoices": [
    {
      "invoice_id": "00000000-0000-4000-8000-000000000000",
      "status": "...",
      "total_minor": "..."
    }
  ],
  "other_jobs": [
    {
      "job_id": "00000000-0000-4000-8000-000000000000",
      "summary": "...",
      "status": "..."
    }
  ],
  "equipment": [
    {
      "equipment_id": "00000000-0000-4000-8000-000000000000",
      "kind": "...",
      "make": "...",
      "model": "...",
      "serial": "..."
    }
  ],
  "daily_logs": [
    {
      "log_id": "00000000-0000-4000-8000-000000000000",
      "log_date": "...",
      "body": "..."
    }
  ],
  "emails": [
    {
      "at": "...",
      "channel": "...",
      "kind": "...",
      "subject": "...",
      "body": "..."
    }
  ],
  "open_tasks": [
    {
      "task_id": "00000000-0000-4000-8000-000000000000",
      "title": "...",
      "due_at": "..."
    }
  ],
  "similar_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": "..."
        }
      ]
    }
  ],
  "has_quote": true,
  "next_actions": [
    {
      "say": "...",
      "op": "...",
      "when": "now"
    }
  ]
}

Errors

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