-
-
Notifications
You must be signed in to change notification settings - Fork 0
Plannable Items
Retrieve plannable items from Teamleader Focus.
A plannable item is Teamleader's planning abstraction over an underlying source entity β typically a project task or group. Each item exposes duration metrics (total, planned, unplanned) that Reservations consume, and three orthogonal status dimensions you can filter on independently.
Access via Teamleader::plannableItems().
Read-only. Plannable items are created automatically when tasks or groups are created; they cannot be created, updated, or deleted through this resource.
info()throws if$idis empty. If you have a task UUID but not a plannable item UUID, useinfoBySource()instead.Three separate status filters β
status,completion_statuses, andplanned_time_statusesare each independently validated. They can be combined freely.
plannableItems
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β Supported |
| Sorting | β
Supported (id, end_date, total_duration) |
| Sideloading | β Not supported |
| Creation | β Not supported |
| Update | β Not supported |
| Deletion | β Not supported |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$items = Teamleader::plannableItems()->list();
// Filter active unplanned items, sorted by end date
$items = Teamleader::plannableItems()->list(
[
'status' => ['active'],
'planned_time_statuses'=> ['unplanned'],
],
['sort' => [['field' => 'end_date', 'order' => 'asc']], 'page_size' => 50]
);
// Filter by project and assignee
$items = Teamleader::plannableItems()->list([
'project_ids' => ['project-uuid'],
'assignees' => [['type' => 'user', 'id' => 'user-uuid']],
]);Throws InvalidArgumentException if $id is empty.
$item = Teamleader::plannableItems()->info('plannable-item-uuid');Look up a plannable item by the type and UUID of its underlying source entity. Both arguments are validated as non-empty.
// Look up the plannable item from a task UUID
$item = Teamleader::plannableItems()->infoBySource('task', 'task-uuid');
$plannableItemId = $item['data']['id'];
// Use the plannable item ID to create a reservation
Teamleader::reservations()->create([
'plannable_item_id' => $plannableItemId,
'date' => '2025-05-12',
'duration' => ['value' => 240, 'unit' => 'minutes'],
'assignee' => ['type' => 'user', 'id' => 'user-uuid'],
]);| Method | Filter applied |
|---|---|
active() |
status: ['active'] |
unplanned() |
planned_time_statuses: ['unplanned'] |
overbooked() |
planned_time_statuses: ['overbooked'] |
forProject(string $projectId) |
project_ids: [$projectId] |
forUser(string $userId) |
assignees: [{type: user, id: $userId}] |
All helpers accept optional $filters and $options to merge additional constraints:
$items = Teamleader::plannableItems()->active();
$items = Teamleader::plannableItems()->unplanned(['project_ids' => ['uuid']]);
$items = Teamleader::plannableItems()->overbooked();
$items = Teamleader::plannableItems()->forProject('project-uuid');
$items = Teamleader::plannableItems()->forUser('user-uuid');| Filter | Type | Description |
|---|---|---|
ids |
array | Filter by plannable item UUIDs |
status |
array |
Validated: active, deactivated
|
term |
string | Search by title/name |
start_date |
string | YYYY-MM-DD β validated |
end_date |
string | YYYY-MM-DD β validated |
project_ids |
array | Filter by project UUIDs |
assignees |
array | [{type: user|team, id: uuid}] |
work_type_ids |
array | Filter by work type UUIDs |
completion_statuses |
array |
Validated: to_do, done
|
planned_time_statuses |
array |
Validated: unplanned, partially_planned, fully_planned, overbooked
|
The three validated filter groups (status, completion_statuses, planned_time_statuses) throw InvalidArgumentException for unrecognised values.
Sort field passed as options['sort'] β array of {field, order} objects.
| Field | Description |
|---|---|
id |
Plannable item UUID (default order) |
end_date |
End date |
total_duration |
Total estimated duration |
$items = Teamleader::plannableItems()->list([], [
'sort' => [['field' => 'end_date', 'order' => 'asc']],
]);use InvalidArgumentException;
// Empty ID on info()
try {
Teamleader::plannableItems()->info('');
} catch (InvalidArgumentException $e) {
// 'Plannable item ID is required. To look up by source, use infoBySource() instead.'
}
// Invalid status value
try {
Teamleader::plannableItems()->list(['status' => ['archived']]);
} catch (InvalidArgumentException $e) {
// 'Invalid status: archived. Must be one of: active, deactivated'
}
// Invalid planned_time_status
try {
Teamleader::plannableItems()->list(['planned_time_statuses' => ['overdue']]);
} catch (InvalidArgumentException $e) {
// 'Invalid planned_time_status: overdue. Must be one of: unplanned, ...'
}- Reservations β Create reservations for plannable items
- User Availability β Check capacity before planning
- Project Tasks β Source entities that generate plannable items
- Groups β Project groups that can also be plannable
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