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), notes, photo and video summaries with any measurements, open tasks, and similar past quotes. Read only. Prices show only to people who can see prices. next_actions suggests what to do at or after the visit.
When to use it
Use these when a worker is heading to, standing at, or just leaving a visit. Everything happens in conversation with the worker: there are no buttons for them to tap and no app to open.
What to tell the owner
Tell them what you found in plain words. Don't read back raw fields.
| Field | Type | Required |
|---|
visit_id | string (uuid) | yes |
Example
GET https://doingwork.work/v1/visits/brief?visit_id=00000000-0000-4000-8000-000000000000
Output
| Field | Type | Always there |
|---|
visit | object | yes |
visit.visit_id | string (uuid) | yes |
visit.job_id | string (uuid) | yes |
visit.starts_at | string (date-time) | yes |
visit.ends_at | string (date-time) | yes |
visit.status | string | yes |
visit.title | ['string', 'null'] | yes |
visit.job_summary | ['string', 'null'] | yes |
customer | object | yes |
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 |
messages | array | yes |
messages[].at | string (date-time) | yes |
messages[].direction | string | yes |
messages[].channel | string | yes |
messages[].customer_text | ['object', 'null'] | yes |
messages[].shop_text | ['string', 'null'] | yes |
calls | array | yes |
calls[].at | string (date-time) | yes |
calls[].direction | string | yes |
calls[].duration_s | ['integer', 'null'] | yes |
calls[].summary | ['string', 'null'] | yes |
notes | array | yes |
notes[].note_id | string (uuid) | yes |
notes[].at | string (date-time) | yes |
notes[].source | string | yes |
notes[].pinned | boolean | yes |
notes[].body | string | yes |
media | array | yes |
media[].kind | string | yes |
media[].summary | ['string', 'null'] | yes |
media[].measurements | ['array', 'object', 'null'] | yes |
open_tasks | array | yes |
open_tasks[].task_id | string (uuid) | yes |
open_tasks[].title | string | yes |
open_tasks[].due_at | ['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')'] | yes |
similar_quotes | array | yes |
similar_quotes[].quote_id | string (uuid) | yes |
similar_quotes[].job_id | string (uuid) | yes |
similar_quotes[].status | string | yes |
similar_quotes[].created_at | string (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[].matched | array | yes |
similar_quotes[].lines | array | yes |
similar_quotes[].lines[].description | string | yes |
similar_quotes[].lines[].quantity | number | yes |
similar_quotes[].lines[].unit_price_minor | ['integer', 'null'] | yes |
has_quote | boolean | yes |
next_actions | array | yes |
next_actions[].say | string | yes |
next_actions[].op | ['string', 'null'] | yes |
{
"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": "...",
"pinned": true,
"body": "..."
}
],
"media": [
{
"kind": "...",
"summary": "...",
"measurements": "..."
}
],
"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": "..."
}
]
}
Errors
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |