Access to Staff Leave/Availability

Hey,

I see some questions asked in the past that have no answers, assuming they have been lost since the update.

I see that " https://api.servicem8.com/api_1.0/staffavailability.json " is returning “Availability is not a publicly documented object type” instead of the normal “is not an authorised object type”.

Any chance of getting access to this data to pull leave dates to use in addons to block out staff schedules in a custom add-on?

1 Like

I second this! I managed to get the “availability.json” endpoint firing a few months ago - which returned the correct and expected json payload, e.g.,

[
{
“uuid”: “75cc2145-[redacted]”,
“edit_date”: “2026-03-26 01:10:06”,
“active”: 0,
“regarding_object”: “staff”,
“regarding_object_uuid”: “09d156eb-[redacted]”,
“name”: “Annual leave 26 March to 1 April”,
“availability_type”: “staff-annual-leave”,
“start_timestamp”: “2026-03-26 00:00:00”,
“end_timestamp”: “2026-04-01 23:59:59”
}
]

But shortly thereafter, subsequent attempts were blocked and returned the “not a publicly documented object type” message.

I have two private add-ons that would benefit enormously from having access to this endpoint.

yes this would be great. we currently have to put a job in to the techs day for holidays etc. as it will allow bookings due to not being able to read the leave.

Hi Nicholas,

Staff Leave entries (the blocks shown on Staff Schedules via the Staff Leave add-on) aren’t currently exposed via the public ServiceM8 REST API, so there isn’t a “leave” or “availability” JSON endpoint you can query to pull those leave records into an add-on.

If the goal is to keep staff time blocked out automatically, the supported options today are:

  • Use the Calendar Import add-on to import a staff member’s free/busy time from an external calendar into the Dispatch Board (this also marks them as “Busy” and is taken into account by Booking Suggestions).
  • Create a “blocking job” to reserve the time in the schedule, using the normal scheduling endpoints (for example JobActivity).

For reference, a Scheduled Booking in the UI maps to a JobActivity record in the API (activity_was_scheduled == 1), and Job Activities can be created via POST /jobactivity.json (requires the manage_schedule scope).

Staff Leave add-on: How to add Staff Leave - ServiceM8 Help Center
Calendar Import add-on: How to use the Calendar Import Add-on - ServiceM8 Help Center

Email support@servicem8.com with your use case if you’d like our team to review options for your add-on.

Thanks,
Cody

Hi Nicholas, Jason, and @developer_account,

If you’re looking to block out holidays (without creating a dummy job booking), the supported way is the Staff Leave add-on, which blocks out that time in Staff Schedules:

For API-driven scheduling data, the documented schedule endpoints are JobActivity and JobAllocation (scopes read_schedule / manage_schedule). In the REST API, a “Scheduled Booking” maps to a JobActivity where activity_was_scheduled == 1.

If your leave data lives in an external calendar, the Calendar Import add-on can import staff busy time, show it on the Dispatch Board as “Busy”, and have it taken into account by Booking Suggestions:

If having Staff Leave/availability available via the REST API would unlock your add-ons, send the use case through to support@servicem8.com as a feature request.

Thanks,
Cody