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.
| |
|---|
| Who | Agents can call this |
| REST | GET /v1/schedule/capacity |
| MCP tool | schedule_capacity |
| Writes | no |
| Area | Scheduling 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.
| Field | Type | Required |
|---|
shop_id | string (uuid) | yes |
from | string (date) | no |
days | integer | no |
visit_minutes | integer | no |
person_ids | array | no |
Example
GET https://doingwork.work/v1/schedule/capacity?shop_id=00000000-0000-4000-8000-000000000000
Output
| Field | Type | Always there |
|---|
time_zone | string | yes |
hours_source | string | yes |
visit_minutes | integer | yes |
days | array | yes |
days[].date | string | yes |
days[].weekday | string | yes |
days[].open_minutes | integer | yes |
days[].booked_minutes | integer | yes |
days[].free_minutes | integer | yes |
days[].percent_booked | integer | yes |
days[].fits | integer | yes |
days[].workers | integer | yes |
next_actions | array | yes |
next_actions[].say | string | yes |
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
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |