-
-
Notifications
You must be signed in to change notification settings - Fork 0
Ticket Status
Read ticket status definitions in Teamleader Focus.
Ticket statuses define the workflow states a ticket can move through. This resource is read-only β statuses are configured in the Teamleader Focus web interface.
Access via Teamleader::ticketStatus().
No pagination.
list()returns all statuses in a single response.
findByType()is client-side β it callslist()then filters in PHP.
byIds()throws on an empty array.
ticketStatus
| Capability | Supported |
|---|---|
| Pagination | β Not 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;
$statuses = Teamleader::ticketStatus()->list();
$statuses = Teamleader::ticketStatus()->list(['ids' => ['uuid-1', 'uuid-2']]);Throws InvalidArgumentException if $ids is empty.
$statuses = Teamleader::ticketStatus()->byIds(['uuid-1', 'uuid-2']);$type is validated before calling list(). Returns an array of matching statuses or null.
$openStatuses = Teamleader::ticketStatus()->findByType('open');
$closedStatuses = Teamleader::ticketStatus()->findByType('closed');Returns all statuses with type: custom, or null if none exist.
$custom = Teamleader::ticketStatus()->customStatuses();Returns [id => label] map for dropdowns. Uses the label field if present, falls back to status.
$options = Teamleader::ticketStatus()->asOptions();
// ['uuid-1' => 'New', 'uuid-2' => 'Open', 'uuid-3' => 'My Custom Status']| Type | Meaning |
|---|---|
new |
Newly created tickets |
open |
Tickets being actively worked on |
waiting_for_client |
Awaiting customer response |
escalated_thirdparty |
Escalated to a third party |
closed |
Resolved or closed tickets |
custom |
Account-specific custom states |
[
'data' => [
[
'id' => 'status-uuid',
'status' => 'open',
'label' => 'Open', // present on custom statuses; may equal status on standard ones
],
[
'id' => 'custom-uuid',
'status' => 'custom',
'label' => 'Awaiting Parts',
],
],
]// Build a map of status names to IDs for ticket creation
$statuses = Teamleader::ticketStatus()->asOptions();
// Cache this β statuses rarely change
$openStatusId = array_search('Open', $statuses);
Teamleader::tickets()->create([
'subject' => 'Login issue',
'customer' => ['type' => 'company', 'id' => 'company-uuid'],
'ticket_status_id' => $openStatusId,
]);use InvalidArgumentException;
// Empty IDs on byIds()
try {
Teamleader::ticketStatus()->byIds([]);
} catch (InvalidArgumentException $e) {
// 'At least one ticket status ID is required'
}
// Invalid type on findByType()
try {
Teamleader::ticketStatus()->findByType('resolved');
} catch (InvalidArgumentException $e) {
// 'Invalid status type. Must be one of: new, open, waiting_for_client, escalated_thirdparty, closed, custom'
}-
Tickets β Tickets reference a
ticket_status_id
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