Skip to content
Support

Read technicians' leave and time blocks

Owner, AdminLast checked 25 November 20263 min readArticle ID: developers-read-schedule-blocks
On this page

List the time blocks (leave included) and tasks on your technicians' schedule with GET /schedule-blocks, for one technician or a date range.

Read the time your technicians aren't on jobs: leave, training, lunch or admin that the office blocked out on the schedule, and the tasks the office gave them. For example, show who's away in your own system, or check a technician is free before you book a visit. The endpoint is read-only: you can't add or change blocks through the API.

Who can do this: Owners and Admins with the Manage Developer Tools permission.

Your app needs the read:schedule_blocks scope. To add it, select Edit on the app in Settings › API & Webhooks, tick the scope, then get a new token. See Scopes.

In the examples, $SKEDULER_API is your Skeduler API address. Contact Skeduler support if you don't have it.

1. List one technician's blocks for a week

Send the technician's id, and the window as from and to. You get the blocks that overlap it:

curl -s -G "$SKEDULER_API/api/v1/schedule-blocks" \
  --data-urlencode "technician_id=$TECHNICIAN_ID" \
  --data-urlencode "from=2026-12-01T00:00:00+10:00" \
  --data-urlencode "to=2026-12-08T00:00:00+10:00" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Find the technician's id with GET /technicians. Leave technician_id out to get every technician's blocks.

{
  "data": [
    {
      "id": "01JC7K3Q8N5ZT9X2V4W6Y8A0BC",
      "technician_id": "01JC7K3Q8N5ZT9X2V4W6Y8A0BD",
      "type": "time_block",
      "title": "Annual leave",
      "start_at": "2026-12-02T22:00:00+00:00",
      "end_at": "2026-12-04T07:00:00+00:00",
      "is_completed": false,
      "created_at": "2026-11-20T01:15:00+00:00",
      "updated_at": "2026-11-20T01:15:00+00:00"
    }
  ],
  "meta": { "page": 1, "per_page": 25, "total": 1 }
}

The blocks come newest first, with the usual page and per_page. See Offset paging for lists.

What each block has

FieldWhat it is
typetime_block for time away from jobs (leave, training, lunch, admin), or task for a task the office gave the technician, ticked off when it's done. Send type=time_block to get only time blocks.
titleThe name the office gave it, for example "Annual leave" or "Not Available". There's no separate leave type: the title says what it is. Leave brought over from Skeduler V1 is a time block titled Leave.
start_at, end_atWhen it starts and ends, with a UTC offset. The end is exclusive: a block from 09:00 to 11:00 doesn't overlap a visit that starts at 11:00.
is_completedtrue once a task is ticked off in the app. Always false for a time block.
notesThe block's notes, only if your app also has read:notes. Otherwise the key is left out.

from and to work like the schedule: you get the blocks that end after from and start before to. to must be after from.

2. Keep a copy up to date

To pick up only new and changed blocks, use sync mode: pass updated_since the first time, then each answer's meta.next_cursor as cursor. See Keep your system in sync with sync mode and cursors.

curl -s "$SKEDULER_API/api/v1/schedule-blocks?cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

A block the office removes stops appearing, so sync mode doesn't tell you about it. To drop removed blocks from your copy, read the window again now and then, and remove the ones that are no longer there. Getting a removed block by its id answers 404 not_found.

If reading the blocks fails

In this section