-
-
Notifications
You must be signed in to change notification settings - Fork 0
Project Tasks
Manage tasks in Teamleader Focus projects (v2).
Project tasks are the primary work items within a project. They support billing, time estimates, assignees, and a full status lifecycle.
Access via Teamleader::projectTasks().
billing_method: work_type_rateadditionally requireswork_type_id.
delete()requires a strategy β defaults tounlink_time_tracking.
duplicate()usesorigin_idparameter name.No sorting.
projects-v2/tasks
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β
Supported (ids only) |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Supported |
| Update | β Supported |
| Deletion | β Supported |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$tasks = Teamleader::projectTasks()->list();
$tasks = Teamleader::projectTasks()->list(
['ids' => ['task-uuid-1', 'task-uuid-2']],
['page_size' => 50, 'page_number' => 1]
);$task = Teamleader::projectTasks()->info('task-uuid');Three fields are required and validated:
| Required | Notes |
|---|---|
project_id |
Project UUID |
title |
Task title |
billing_method |
See billing methods below |
Billing methods (validated):
| Method | Notes |
|---|---|
user_rate |
Bills at the assigned user's rate |
work_type_rate |
Bills at work type rate β also requires work_type_id
|
custom_rate |
Custom hourly rate β provide custom_rate: {amount, currency}
|
fixed_price |
Fixed price β provide fixed_price: {amount, currency}
|
parent_fixed_price |
Inherits parent group's fixed price |
non_billable |
Not billable |
Status values (validated when provided): to_do, in_progress, on_hold, done
Time estimate units (validated): hours, minutes, seconds
$task = Teamleader::projectTasks()->create([
'project_id' => 'project-uuid',
'title' => 'Build login flow',
'billing_method' => 'custom_rate',
'custom_rate' => ['amount' => 95.0, 'currency' => 'EUR'],
'status' => 'to_do',
'time_estimated' => ['value' => 8, 'unit' => 'hours'],
'group_id' => 'group-uuid', // optional β assign to a group
'assignees' => [['type' => 'user', 'id' => 'user-uuid']],
]);
// work_type_rate requires work_type_id
$task = Teamleader::projectTasks()->create([
'project_id' => 'project-uuid',
'title' => 'Code review',
'billing_method' => 'work_type_rate',
'work_type_id' => 'work-type-uuid',
]);Injects id into the request body. All fields except id are optional.
Teamleader::projectTasks()->update('task-uuid', [
'status' => 'in_progress',
'description' => 'Updated description',
]);Delete strategies (validated):
| Strategy | Behaviour |
|---|---|
unlink_time_tracking |
Default β keeps time entries, removes task link |
delete_time_tracking |
Deletes the task and all time entries |
Teamleader::projectTasks()->delete('task-uuid');
Teamleader::projectTasks()->delete('task-uuid', 'delete_time_tracking');Creates a copy of the task (without time trackings).
$copy = Teamleader::projectTasks()->duplicate('task-uuid');Assignee type validated: user, team.
Teamleader::projectTasks()->assign('task-uuid', 'user', 'user-uuid');
Teamleader::projectTasks()->assignUser('task-uuid', 'user-uuid');
Teamleader::projectTasks()->assignTeam('task-uuid', 'team-uuid');
Teamleader::projectTasks()->unassignUser('task-uuid', 'user-uuid');
Teamleader::projectTasks()->unassignTeam('task-uuid', 'team-uuid');Teamleader::projectTasks()->byIds(['uuid-1', 'uuid-2']);
Teamleader::projectTasks()->updateStatus('task-uuid', 'done');use InvalidArgumentException;
// work_type_rate without work_type_id
try {
Teamleader::projectTasks()->create([
'project_id' => 'uuid',
'title' => 'Review',
'billing_method' => 'work_type_rate',
// missing work_type_id
]);
} catch (InvalidArgumentException $e) {
// 'work_type_id is required when billing_method is work_type_rate'
}
// Invalid time unit
try {
Teamleader::projectTasks()->create([
...,
'time_estimated' => ['value' => 2, 'unit' => 'days'],
]);
} catch (InvalidArgumentException $e) {
// 'Invalid time unit. Must be one of: hours, minutes, seconds'
}- Projects β Parent project
- Groups β Groups that contain tasks
- Project Lines β Unified listing of tasks, materials, groups
- Materials β Materials within a project
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