-
-
Notifications
You must be signed in to change notification settings - Fork 0
Activity Types
Read activity type definitions in Teamleader Focus.
The Activity Types resource provides read-only access to the activity type categories used on calendar events and meetings. Types are defined in Teamleader and cannot be created or modified through the API.
Access via Teamleader::activityTypes().
activityTypes
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β
Supported (ids only) |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Not supported |
| Update | β Not supported |
| Deletion | β Not supported |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$types = Teamleader::activityTypes()->list();
$types = Teamleader::activityTypes()->list([
'ids' => ['type-uuid-1', 'type-uuid-2'],
]);
$types = Teamleader::activityTypes()->list([], [
'page_size' => 50, 'page_number' => 1,
]);$type = Teamleader::activityTypes()->info('type-uuid');$types = Teamleader::activityTypes()->byIds(['type-uuid-1', 'type-uuid-2']);Calls list() with page_size: 100. For accounts with more than 100 activity types, this will not return everything β use paginated list() calls instead.
$types = Teamleader::activityTypes()->all();Returns true if an activity type with that UUID exists. Calls byIds([$id]) internally.
$exists = Teamleader::activityTypes()->exists('type-uuid');Client-side β calls list() then searches in PHP (case-insensitive). Returns the matching type array or null.
$type = Teamleader::activityTypes()->findByName('Client Meeting');
// returns array or nullReturns [['value' => uuid, 'label' => name], ...] β an array of objects (not a flat [id => name] map). Calls all() internally.
$options = Teamleader::activityTypes()->selectOptions();
// [['value' => 'uuid', 'label' => 'Client Meeting'], ...]
// For a plain [id => name] map
$map = array_column($options, 'label', 'value');| Filter | Type | Description |
|---|---|---|
ids |
array | Filter by activity type UUIDs |
[
'data' => [
['id' => 'type-uuid', 'name' => 'Client Meeting'],
['id' => 'type-uuid', 'name' => 'Internal Sync'],
['id' => 'type-uuid', 'name' => 'Training'],
],
'meta' => ['page' => ['size' => 20, 'number' => 1], 'matches' => 8],
]$types = Teamleader::activityTypes()->list();
$map = array_column($types['data'], 'name', 'id');
// ['uuid-1' => 'Client Meeting', 'uuid-2' => 'Internal Sync', ...]$type = Teamleader::activityTypes()->findByName('Client Meeting');
if ($type) {
Teamleader::calenderEvents()->create([
'title' => 'Discovery call',
'activity_type_id' => $type['id'],
'starts_at' => '2025-05-10T10:00:00+02:00',
'ends_at' => '2025-05-10T11:00:00+02:00',
]);
}$types = Cache::remember('tl_activity_types', 86400, function () {
return Teamleader::activityTypes()->list();
});use McoreServices\TeamleaderSDK\Exceptions\TeamleaderException;
try {
$types = Teamleader::activityTypes()->list();
} catch (TeamleaderException $e) {
Log::error('Teamleader error', ['message' => $e->getMessage()]);
}-
Calendar Events β
activity_type_idis required on event creation -
Meetings β Activity type can be set on meetings via
activity_type_id - Call Outcomes β Outcome definitions for calls (parallel concept)
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