-
-
Notifications
You must be signed in to change notification settings - Fork 0
User Schedules
Retrieve per-day working schedules for one or more users in Teamleader Focus.
The User Schedules resource wraps the userSchedules.list endpoint. It returns the working schedule of one or more users, expanded per day over a date range of at most 7 days. Non-working days are omitted from each user's schedule.
This is the successor to users.getWeekSchedule (still available on the Users resource, but deprecated by Teamleader in favour of this endpoint).
Access via Teamleader::userSchedules().
Only available with the Weekly working schedule feature enabled on the Teamleader account.
Read-only.
info(),create(),update()anddelete()throwBadMethodCallException.Date range max 7 days.
untilmust be on or afterfrom, and the inclusive range may span at most 7 days β otherwiseInvalidArgumentExceptionis thrown before the request.
userSchedules
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β
Supported (required: user_ids, from, until) |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Not supported |
| Update | β Not supported |
| Deletion | β Not supported |
Returns the per-day working schedules of the requested users. All three filter keys are required and validated before the request.
Filters:
| Filter | Type | Description |
|---|---|---|
user_ids |
array | Required. Non-empty array of user UUIDs |
from |
string |
Required. Start date (inclusive), YYYY-MM-DD
|
until |
string |
Required. End date (inclusive), YYYY-MM-DD. On or after from; range may span at most 7 days |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$schedules = Teamleader::userSchedules()->list([
'user_ids' => ['user-uuid-1', 'user-uuid-2'],
'from' => '2026-06-01',
'until' => '2026-06-07',
]);
// With pagination
$schedules = Teamleader::userSchedules()->list(
['user_ids' => ['user-uuid'], 'from' => '2026-06-01', 'until' => '2026-06-07'],
['page_size' => 50, 'page_number' => 1]
);| Method | Equivalent |
|---|---|
forUser(string $userId, string $from, string $until, array $options = []) |
list(['user_ids' => [$userId], ...]) |
forUsers(array $userIds, string $from, string $until, array $options = []) |
list(['user_ids' => $userIds, ...]) |
$schedule = Teamleader::userSchedules()->forUser('user-uuid', '2026-06-01', '2026-06-07');
$schedules = Teamleader::userSchedules()->forUsers(['u1', 'u2'], '2026-06-01', '2026-06-07');[
'data' => [
[
'user' => ['type' => 'user', 'id' => 'user-uuid'],
'schedule' => [
[
'date' => '2026-06-01',
'periods' => [
[
'type' => 'working_hours', // or 'lunch_break'
'start' => ['time' => '09:00'],
'end' => ['time' => '17:00'],
],
],
],
// ... one entry per working day in range (non-working days omitted)
],
],
],
]Times are reported in the user's own time zone.
use InvalidArgumentException;
// Missing required filter
try {
Teamleader::userSchedules()->list(['from' => '2026-06-01', 'until' => '2026-06-07']);
} catch (InvalidArgumentException $e) {
// 'userSchedules.list requires a non-empty "user_ids" array.'
}
// Range too long
try {
Teamleader::userSchedules()->forUser('user-uuid', '2026-06-01', '2026-06-30');
} catch (InvalidArgumentException $e) {
// 'The date range may span at most 7 days.'
}-
Users β
getWeekSchedule()(deprecated) and general user data - User-Availability β planning capacity per user
- Reservations β planning reservations that consume availability
Last Updated: August 2026 β’ SDK Version: 2.2.2 β’ Made with β€οΈ by MCore Services
- Departments
- Users
- Teams
- Custom Fields
- Work Types
- Document Templates
- Currencies
- Notes
- Email Tracking
- Closing Days
- Day Off Types
- Days Off
- User Schedules
- Invoices
- Credit Notes
- Subscriptions
- Payment Methods
- Payment Terms
- Tax Rates
- Withholding Tax Rates
- Commercial Discounts
Next Gen Projects
Legacy Projects