schedule.route

One day's visits as a route: stops in time order with the customer's name, phone and address, a map link per stop and one multi-stop driving directions link (first 10 stops). Pick a worker with person_id or mine; the day is in the shop's time zone and defaults to today. Cancelled visits are left out.

WhoAgents can call this
RESTGET /v1/schedule/route
MCP toolschedule_route
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
datestring (date)no
person_idstring (uuid)no
minebooleanno

Example

GET https://doingwork.work/v1/schedule/route?shop_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
datestring (date)yes
time_zonestringyes
person_id['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')']yes
stopsarrayyes
stops[].stopintegeryes
stops[].visit_idstring (uuid)yes
stops[].job_idstring (uuid)yes
stops[].starts_atstring (date-time)yes
stops[].ends_atstring (date-time)yes
stops[].arrive_bystring (date-time)yes
stops[].prioritystringyes
stops[].statusstringyes
stops[].title['string', 'null']yes
stops[].job_summary['string', 'null']yes
stops[].customer_name['string', 'null']yes
stops[].customer_phone['string', 'null']yes
stops[].address['string', 'null']yes
stops[].maps_url['string', 'null']yes
stops[].assignee_idsarrayyes
directions_url['string', 'null']yes
unaddressedintegeryes
{
  "date": "...",
  "time_zone": "...",
  "person_id": "00000000-0000-4000-8000-000000000000",
  "stops": [
    {
      "stop": 1,
      "visit_id": "00000000-0000-4000-8000-000000000000",
      "job_id": "00000000-0000-4000-8000-000000000000",
      "starts_at": "...",
      "ends_at": "...",
      "arrive_by": "...",
      "priority": "...",
      "status": "...",
      "title": "...",
      "job_summary": "...",
      "customer_name": "...",
      "customer_phone": "...",
      "address": "...",
      "maps_url": "...",
      "assignee_ids": [
        "00000000-0000-4000-8000-000000000000"
      ]
    }
  ],
  "directions_url": "...",
  "unaddressed": 1
}

Errors

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