-
-
Notifications
You must be signed in to change notification settings - Fork 0
Incoming Invoices
Manage incoming (purchase) invoices from suppliers in Teamleader Focus.
The Incoming Invoices resource manages purchase invoices you receive from suppliers. These move through a review workflow (pending β approved/refused) before being sent to bookkeeping.
Access via Teamleader::incomingInvoices().
list()throwsInvalidArgumentException. Use theExpensesresource to list and filter expense documents.
create()posts toincomingInvoices.addβ not.create.create()is an alias foradd().Payment statuses include
partially_paidβ unique to this resource vs incoming credit notes and receipts.
incomingInvoices
| Capability | Supported |
|---|---|
| Pagination | β Not supported β use Expenses resource |
| Filtering | β Not supported β use Expenses resource |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Supported |
| Update | β Supported |
| Deletion | β Supported |
| Payment management | β Supported |
Throws if $id is empty. Returns full invoice detail including payment_status and iban_number.
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$invoice = Teamleader::incomingInvoices()->info('invoice-uuid');
$paymentStatus = $invoice['data']['payment_status']; // unknown | paid | partially_paid | not_paid
$ibanNumber = $invoice['data']['iban_number']; // nullable
$reviewStatus = $invoice['data']['review_status']; // pending | approved | refusedCreates a new incoming invoice. Posts to incomingInvoices.add. create() is an alias.
Required fields (validated before the request):
| Field | Notes |
|---|---|
title |
Invoice title |
currency.code |
Valid currency code |
total |
Must include at least tax_exclusive or tax_inclusive
|
$invoice = Teamleader::incomingInvoices()->add([
'title' => 'Software licences Q2',
'supplier_id' => 'company-uuid', // optional
'document_number' => 'INV-2025-042', // optional
'invoice_date' => '2025-04-01', // optional
'due_date' => '2025-05-01', // optional
'currency' => ['code' => 'EUR'],
'total' => [
'tax_exclusive' => ['amount' => 1000.0],
'tax_inclusive' => ['amount' => 1210.0],
],
'payment_reference' => 'REF-123', // optional
'file_id' => 'file-uuid', // optional
]);
$id = $invoice['data']['id'];Merges ['id' => $id] with $data before posting. Validates currency if provided.
Teamleader::incomingInvoices()->update('invoice-uuid', [
'title' => 'Updated title',
'due_date' => '2025-05-15',
]);Teamleader::incomingInvoices()->delete('invoice-uuid');Teamleader::incomingInvoices()->approve('invoice-uuid');Teamleader::incomingInvoices()->refuse('invoice-uuid');Teamleader::incomingInvoices()->markAsPendingReview('invoice-uuid');Teamleader::incomingInvoices()->sendToBookkeeping('invoice-uuid');Returns all payments with a meta.total.amount summary.
$payments = Teamleader::incomingInvoices()->listPayments('invoice-uuid');
$totalPaid = $payments['meta']['total']['amount'];
foreach ($payments['data'] as $payment) {
echo $payment['payment']['amount'] . ' ' . $payment['payment']['currency'];
}registerPayment(string $id, array $payment, string $paidAt, ?string $paymentMethodId = null, ?string $remark = null)
$paidAt is required. $payment must have amount (numeric) and currency (valid code) β both validated before the request.
Teamleader::incomingInvoices()->registerPayment(
'invoice-uuid',
['amount' => 1210.0, 'currency' => 'EUR'],
'2025-04-15T10:00:00+02:00',
'payment-method-uuid', // optional
'Paid via bank transfer' // optional
);Teamleader::incomingInvoices()->removePayment('invoice-uuid', 'payment-uuid');updatePayment(string $id, string $paymentId, array $payment, ?string $paidAt = null, ?string $paymentMethodId = null, ?string $remark = null)
$paidAt is optional on update.
Teamleader::incomingInvoices()->updatePayment(
'invoice-uuid',
'payment-uuid',
['amount' => 605.0, 'currency' => 'EUR'],
null,
null,
'Corrected to partial amount'
);Payment statuses (payment_status on info() response):
unknown, paid, partially_paid, not_paid
Review statuses (review_status on info() response):
pending, approved, refused
// Create
$invoice = Teamleader::incomingInvoices()->add([
'title' => 'Cloud hosting Q2',
'currency' => ['code' => 'EUR'],
'total' => ['tax_exclusive' => ['amount' => 500.0], 'tax_inclusive' => ['amount' => 605.0]],
]);
$id = $invoice['data']['id'];
// Approve
Teamleader::incomingInvoices()->approve($id);
// Register payment
Teamleader::incomingInvoices()->registerPayment(
$id,
['amount' => 605.0, 'currency' => 'EUR'],
now()->toIso8601String()
);
// Send to bookkeeping
Teamleader::incomingInvoices()->sendToBookkeeping($id);use InvalidArgumentException;
// list() not supported
try {
Teamleader::incomingInvoices()->list();
} catch (InvalidArgumentException $e) {
// 'The list method is not supported for incoming invoices. Use info() to get a specific invoice.'
}
// Missing required fields on create
try {
Teamleader::incomingInvoices()->add(['title' => 'Test']);
} catch (InvalidArgumentException $e) {
// 'currency.code is required for incoming invoices'
}
// Invalid currency on registerPayment
try {
Teamleader::incomingInvoices()->registerPayment('uuid', ['amount' => 100, 'currency' => 'XYZ'], '2025-04-01T00:00:00+02:00');
} catch (InvalidArgumentException $e) {
// 'Invalid payment currency. Must be one of: ...'
}- Bookkeeping-Submissions β Track submission history per invoice
- Incoming Credit Notes β Supplier credit notes (same workflow)
- Receipts β Smaller expense receipts (same workflow)
-
Payment Methods β Optional on
registerPayment()
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