schedule.events

Visits between two dates as calendar events (uid, title, start, end, location, status confirmed, tentative or cancelled), ready to copy into an outside calendar; save the uid to update the same event later. Dates are in the shop's time zone, to is inclusive, at most 62 days. Filter by worker or mine.

WhoAgents can call this
RESTGET /v1/schedule/events
MCP toolschedule_events
Writesno
AreaScheduling and visits

When to use it

Read schedule.settings first: it has the shop's time zone, working hours, arrival window and buffer. Use schedule.findTime to get open times that fit the shop's hours, each worker's hours and time off, and visits already booked with the buffer around them, then book with visits.create.

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
fromstring (date)yes
tostring (date)yes
person_idstring (uuid)no
minebooleanno
include_cancelledbooleanno
updated_sincestring (date-time)no

Example

GET https://doingwork.work/v1/schedule/events?shop_id=00000000-0000-4000-8000-000000000000&from=...&to=...

Output

FieldTypeAlways there
time_zonestringyes
eventsarrayyes
events[].uidstringyes
events[].visit_idstring (uuid)yes
events[].job_idstring (uuid)yes
events[].titlestringyes
events[].startstring (date-time)yes
events[].endstring (date-time)yes
events[].time_zonestringyes
events[].location['string', 'null']yes
events[].description['string', 'null']yes
events[].statusstringyes
events[].prioritystringyes
events[].assignee_idsarrayyes
events[].updated_atstring (date-time)yes
truncatedbooleanyes
{
  "time_zone": "...",
  "events": [
    {
      "uid": "...",
      "visit_id": "00000000-0000-4000-8000-000000000000",
      "job_id": "00000000-0000-4000-8000-000000000000",
      "title": "...",
      "start": "...",
      "end": "...",
      "time_zone": "...",
      "location": "...",
      "description": "40 gallon gas heater, installed",
      "status": "...",
      "priority": "...",
      "assignee_ids": [
        "00000000-0000-4000-8000-000000000000"
      ],
      "updated_at": "..."
    }
  ],
  "truncated": true
}

Errors

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