schedule.capacity

How booked the next working days are: for each day, open worker minutes inside shop hours (and each worker's own hours) minus time off, booked minutes, percent booked, and how many visits of visit_minutes (default 120) still fit, counted the way schedule.findTime offers times. Give person_ids to check some workers. A field worker sees only themselves. Read only.

WhoAgents can call this
RESTGET /v1/schedule/capacity
MCP toolschedule_capacity
Writesno
AreaScheduling and visits

When to use it

Lead rules (requests.setLeadSettings, owner or office) decide what happens to a new request. With auto_reply on, Doing Work sends one first reply within a minute: a text only where the customer already agreed to texts or texted the shop, and the shop's own number is approved for business texting; otherwise an email; otherwise nothing.

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)no
daysintegerno
visit_minutesintegerno
person_idsarrayno

Example

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

Output

FieldTypeAlways there
time_zonestringyes
hours_sourcestringyes
visit_minutesintegeryes
daysarrayyes
days[].datestringyes
days[].weekdaystringyes
days[].open_minutesintegeryes
days[].booked_minutesintegeryes
days[].free_minutesintegeryes
days[].percent_bookedintegeryes
days[].fitsintegeryes
days[].workersintegeryes
next_actionsarrayyes
next_actions[].saystringyes
next_actions[].op['string', 'null']yes
{
  "time_zone": "...",
  "hours_source": "...",
  "visit_minutes": 1,
  "days": [
    {
      "date": "...",
      "weekday": "...",
      "open_minutes": 1,
      "booked_minutes": 1,
      "free_minutes": 1,
      "percent_booked": 1,
      "fits": 1,
      "workers": 1
    }
  ],
  "next_actions": [
    {
      "say": "...",
      "op": "..."
    }
  ]
}

Errors

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