-
-
Notifications
You must be signed in to change notification settings - Fork 0
Products
Manage products in Teamleader Focus.
The Products resource provides full CRUD for managing the product catalogue. Products can be physical goods or services, and carry pricing, stock, category, tax rate, and custom field data.
Access via Teamleader::products().
create()posts toproducts.addβ not.create.
update()injectsidinto the request body.Includes key is
includes(plural) in bothinfo()andlist().No sorting supported β the API does not mention sort parameters for products.
products
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β Supported |
| Sorting | β Not supported |
| Sideloading | β
Supported (suppliers, custom_fields) |
| Creation | β Supported |
| Update | β Supported |
| Deletion | β Supported |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$products = Teamleader::products()->list();
$products = Teamleader::products()->list(
['term' => 'laptop'],
['page_size' => 50, 'page_number' => 1]
);
// With sideloading via options
$products = Teamleader::products()->list([], ['include' => 'suppliers,custom_fields']);
// With fluent interface
$products = Teamleader::products()
->withSuppliers()
->withCustomFields()
->list();$product = Teamleader::products()->info('product-uuid');
$product = Teamleader::products()->info('product-uuid', 'suppliers');
$product = Teamleader::products()->info('product-uuid', ['suppliers', 'custom_fields']);
// Fluent interface
$product = Teamleader::products()
->withSuppliers()
->info('product-uuid');Posts to products.add. At least one of name or code is required β throws InvalidArgumentException if both are absent.
$product = Teamleader::products()->create([
'name' => 'Dark Chocolate Cookies',
'code' => 'COOK-DARK-001',
'description' => 'Premium dark chocolate cookies, 200g bag',
'unit_of_measure_id' => 'unit-uuid',
'product_category_id' => 'category-uuid',
'tax_rate_id' => 'tax-rate-uuid',
'selling_price' => ['amount' => 4.99, 'currency' => 'EUR'],
'purchase_price' => ['amount' => 2.50, 'currency' => 'EUR'],
'stock' => ['amount' => 500],
'department_id' => 'dept-uuid',
]);The id is injected into the request body.
Teamleader::products()->update('product-uuid', [
'selling_price' => ['amount' => 5.49, 'currency' => 'EUR'],
'stock' => ['amount' => 450],
]);Teamleader::products()->delete('product-uuid');Passes term filter to list().
$products = Teamleader::products()->search('chocolate');Passes updated_since filter to list().
$products = Teamleader::products()->updatedSince('2025-01-01T00:00:00+02:00');| Method | Include |
|---|---|
withSuppliers() |
suppliers |
withCustomFields() |
custom_fields |
$products = Teamleader::products()->withSuppliers()->withCustomFields()->list();| Filter | Type | Description |
|---|---|---|
ids |
array | Filter by product UUIDs |
term |
string | Search on name or code |
updated_since |
string | ISO 8601 datetime |
| Include | Description |
|---|---|
suppliers |
Supplier references for this product |
custom_fields |
Custom field values |
// Look up required references first
$unit = Teamleader::unitsOfMeasure()->findByName('piece');
$category = Teamleader::productCategories()->forDepartment('dept-uuid');
$taxRate = Teamleader::taxRates()->findByRate(0.21, 'dept-uuid');
$product = Teamleader::products()->create([
'name' => 'Consulting Hour',
'code' => 'CONS-HR-001',
'unit_of_measure_id' => $unit['id'],
'product_category_id' => $category['data'][0]['id'],
'tax_rate_id' => $taxRate['id'],
'selling_price' => ['amount' => 150.0, 'currency' => 'EUR'],
]);
// Use on an invoice line item
$productId = $product['data']['id'];$products = Cache::remember('tl_products', 3600, fn() => Teamleader::products()->list());
// Search locally once cached
$filtered = array_filter($products['data'], fn($p) => str_contains($p['name'], 'Cookie'));use InvalidArgumentException;
use McoreServices\TeamleaderSDK\Exceptions\TeamleaderException;
// Missing name and code on create
try {
Teamleader::products()->create(['description' => 'Test']);
} catch (InvalidArgumentException $e) {
// 'Either name or code is required when creating a product'
}- Product Categories β Category assignment for products
-
Units of Measure β
unit_of_measure_idfor products -
Tax Rates β
tax_rate_idfor products - Price Lists β Price lists that may apply to products
- Invoices β Products used on invoice line items
- Quotations β Products used on quotation line items
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