notes.search
Find notes you may see by their words, across every record in a shop. Optional target_kind narrows it. Newest first among the best matches. Search here before you ask the worker something the team may already have written down.
When to use it
Find notes you may see by their words, across every record in a shop. Optional target_kind narrows it.
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 |
q | string | yes |
target_kind | string (one of job, visit, media, customer, property, equipment, quote, invoice, request, worker, payment, pricebook_item, maintenance_plan, shop) | no |
limit | integer | no |
Example
GET https://doingwork.work/v1/notes/search?shop_id=00000000-0000-4000-8000-000000000000&q=...
Output
| Field | Type | Always there |
|---|
items | array | yes |
items[].note_id | string (uuid) | yes |
items[].shop_id | string (uuid) | yes |
items[].target_kind | string | yes |
items[].target_id | string (uuid) | yes |
items[].job_id | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes |
items[].visit_id | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes |
items[].mentions | array | yes |
items[].agent_name | ['string', 'null'] | yes |
items[].source | string | yes |
items[].channel | ['string', 'null'] | yes |
items[].body | string | yes |
items[].audience | string | yes |
items[].pinned | boolean | yes |
items[].media_ids | array | yes |
items[].recorded_at | ['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')'] | yes |
items[].duration_seconds | ['integer', 'null'] | yes |
items[].transcribed_with | ['string', 'null'] | yes |
items[].language | ['string', 'null'] | yes |
items[].revisions | integer | yes |
items[].written_by | string (uuid) | yes |
items[].written_by_name | ['string', 'null'] | yes |
items[].created_at | string (date-time) | yes |
items[].edited_at | ['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')'] | yes |
items[].removed_at | ['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')'] | yes |
items[].removed_by | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes |
items[].remove_reason | ['string', 'null'] | yes |
items[].rank | number | yes |
{
"items": [
{
"note_id": "00000000-0000-4000-8000-000000000000",
"shop_id": "00000000-0000-4000-8000-000000000000",
"target_kind": "...",
"target_id": "00000000-0000-4000-8000-000000000000",
"job_id": "00000000-0000-4000-8000-000000000000",
"visit_id": "00000000-0000-4000-8000-000000000000",
"mentions": [
"00000000-0000-4000-8000-000000000000"
],
"agent_name": "...",
"source": "...",
"channel": "...",
"body": "...",
"audience": "...",
"pinned": true,
"media_ids": [
"00000000-0000-4000-8000-000000000000"
],
"recorded_at": "...",
"duration_seconds": "...",
"transcribed_with": "...",
"language": "...",
"revisions": 1,
"written_by": "00000000-0000-4000-8000-000000000000",
"written_by_name": "...",
"created_at": "...",
"edited_at": "...",
"removed_at": "...",
"removed_by": "00000000-0000-4000-8000-000000000000",
"remove_reason": "...",
"rank": "..."
}
]
}
Errors
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |