-
-
Notifications
You must be signed in to change notification settings - Fork 0
Groups
Manage project groups in Teamleader Focus (Projects v2).
Groups organise tasks and materials within a project into phases or logical sections. They can carry their own billing method, colour, dates, and assignees.
Access via Teamleader::groups().
update()billing_method uses a special object β not a plain string. Pass{value, update_strategy}.
delete()requires a strategy β defaults toungroup_tasks_and_materials.
duplicate()usesorigin_idparameter name, notid.No pagination.
projects-v2/groups
| Capability | Supported |
|---|---|
| Pagination | β Not supported |
| Filtering | β
Supported (ids, project_id) |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Supported |
| Update | β Supported |
| Deletion | β Supported |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$groups = Teamleader::groups()->list(['project_id' => 'project-uuid']);
$groups = Teamleader::groups()->list(['ids' => ['group-uuid-1', 'group-uuid-2']]);$group = Teamleader::groups()->info('group-uuid');Required fields validated before the request:
| Required | Notes |
|---|---|
project_id |
Project UUID |
title |
Group title |
Billing methods: time_and_materials, fixed_price, parent_fixed_price, non_billable
fixed_price billing requires a fixed_price: {amount, currency} object.
$group = Teamleader::groups()->create([
'project_id' => 'project-uuid',
'title' => 'Phase 1: Discovery',
'description' => 'Research and requirements gathering',
'billing_method' => 'fixed_price',
'fixed_price' => ['amount' => 5000.0, 'currency' => 'EUR'],
'color' => '#00B2B2',
'start_date' => '2025-05-01',
'end_date' => '2025-05-31',
]);Injects id into the request body. When updating billing_method, it must be an object with value and update_strategy β not a plain string.
Update strategies for billing_method: none, cascade
Teamleader::groups()->update('group-uuid', [
'title' => 'Phase 1 β Updated',
]);
// Updating billing method requires the special object form
Teamleader::groups()->update('group-uuid', [
'billing_method' => [
'value' => 'time_and_materials',
'update_strategy' => 'cascade', // propagate to child tasks/materials
],
]);Delete strategies (validated):
| Strategy | Behaviour |
|---|---|
ungroup_tasks_and_materials |
Default β moves items out of the group |
delete_tasks_and_materials |
Deletes the group and all its items |
delete_tasks_materials_and_unbilled_timetrackings |
Deletes group, items, and any unbilled time entries |
Teamleader::groups()->delete('group-uuid');
Teamleader::groups()->delete('group-uuid', 'delete_tasks_and_materials');Creates a copy of the group and its tasks/materials (without time trackings).
$copy = Teamleader::groups()->duplicate('group-uuid');Assignee type validated: user, team. Shortcuts available:
Teamleader::groups()->assign('group-uuid', 'user', 'user-uuid');
Teamleader::groups()->assignUser('group-uuid', 'user-uuid');
Teamleader::groups()->assignTeam('group-uuid', 'team-uuid');
Teamleader::groups()->unassignUser('group-uuid', 'user-uuid');
Teamleader::groups()->unassignTeam('group-uuid', 'team-uuid');$groups = Teamleader::groups()->forProject('project-uuid');| Filter | Type | Description |
|---|---|---|
ids |
array | Filter by group UUIDs |
project_id |
string | Filter by project UUID |
use InvalidArgumentException;
// Missing required field
try {
Teamleader::groups()->create(['project_id' => 'uuid']); // missing title
} catch (InvalidArgumentException $e) {
// 'title is required'
}
// Wrong billing_method format on update
try {
Teamleader::groups()->update('uuid', ['billing_method' => 'time_and_materials']); // wrong β needs object
} catch (InvalidArgumentException $e) {
// 'billing_method must be an object with value and update_strategy'
}
// Invalid delete strategy
try {
Teamleader::groups()->delete('uuid', 'archive');
} catch (InvalidArgumentException $e) {
// 'Invalid delete strategy. Must be one of: ...'
}- Projects β Parent project
- Project Lines β List all lines in a project including groups
- Project Tasks β Tasks that live inside groups
- Materials β Materials that live inside groups
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