-
-
Notifications
You must be signed in to change notification settings - Fork 0
Credit Notes
Read credit notes in Teamleader Focus.
Credit notes are created indirectly via Teamleader::invoices()->credit() or Teamleader::invoices()->creditPartially(). This resource provides read-only access to list, filter, download, and send credit notes.
Access via Teamleader::creditnotes().
SDK key vs endpoint: The SDK key is
creditnotes(all lowercase). The internal API endpoint iscreditNotes(capital N) β the SDK handles this transparently.
credit_note_date_beforeis exclusive, unlikeinvoice_date_beforeon Invoices which is inclusive.
paid()andunpaid()do not filter the API. These helpers pass an internal_paidflag thatbuildFilters()strips before the request β they currently return the same result aslist(). Use thepaidfield in the response to filter manually.
creditNotes
| Capability | Supported |
|---|---|
| Pagination | β Supported |
| Filtering | β Supported |
| Sorting | β Not supported |
| Sideloading | β Not supported |
| Creation | β Not supported (use Invoices::credit()) |
| Update | β Not supported |
| Deletion | β Not supported |
use McoreServices\TeamleaderSDK\Facades\Teamleader;
$creditNotes = Teamleader::creditnotes()->list();
$creditNotes = Teamleader::creditnotes()->list([
'invoice_id' => 'invoice-uuid',
'credit_note_date_after' => '2025-01-01',
'credit_note_date_before' => '2025-04-01', // exclusive
], [
'page_size' => 50, 'page_number' => 1,
]);$creditNote = Teamleader::creditnotes()->info('credit-note-uuid');
$peppolStatus = $creditNote['data']['peppol_status']; // null until sent via PeppolReturns a temporary download URL. Throws InvalidArgumentException for invalid formats.
Valid formats: pdf, ubl/e-fff
$result = Teamleader::creditnotes()->download('credit-note-uuid', 'pdf');
$url = $result['data']['location'];Submits a credit note to the Peppol network. Poll info() to track peppol_status.
Teamleader::creditnotes()->sendViaPeppol('credit-note-uuid');| Method | Notes |
|---|---|
booked() |
Alias for list() β no extra filter applied |
paid() |
_paid flag is stripped β equivalent to list(). Filter on paid: true manually. |
unpaid() |
_paid flag is stripped β equivalent to list(). Filter on paid: false manually. |
forInvoice(string $invoiceId) |
invoice_id filter |
forCustomer(string $type, string $id) |
customer filter β validates type (contact, company) |
forProject(string $projectId) |
project_id filter |
forDepartment(string $departmentId) |
department_id filter |
betweenDates(string $after, string $before) |
credit_note_date_after + credit_note_date_before (before is exclusive) |
updatedSince(string $since) |
updated_since filter |
$creditNotes = Teamleader::creditnotes()->forInvoice('invoice-uuid');
$creditNotes = Teamleader::creditnotes()->forCustomer('company', 'company-uuid');
$creditNotes = Teamleader::creditnotes()->betweenDates('2025-01-01', '2025-04-01');
$creditNotes = Teamleader::creditnotes()->updatedSince('2025-01-01T00:00:00+00:00');
// Filter paid/unpaid manually
$unpaid = array_filter($creditNotes['data'], fn($cn) => $cn['paid'] === false);| Filter | Type | Description |
|---|---|---|
ids |
array | Filter by credit note UUIDs |
department_id |
string | Department UUID |
updated_since |
string | ISO 8601 datetime |
invoice_id |
string | Related invoice UUID |
project_id |
string | Project UUID |
customer |
object | {type: contact|company, id: uuid} |
credit_note_date_after |
string | Date inclusive (YYYY-MM-DD) |
credit_note_date_before |
string | Date exclusive (YYYY-MM-DD) |
Same values as Invoices β see Invoices#Peppol-Status-Values.
$creditNotes = Teamleader::creditnotes()->forInvoice('invoice-uuid');
foreach ($creditNotes['data'] as $cn) {
$download = Teamleader::creditnotes()->download($cn['id'], 'pdf');
// $download['data']['location'] β temporary URL
}$creditNotes = Teamleader::creditnotes()->forCustomer('company', 'company-uuid');
$unpaid = array_filter($creditNotes['data'], fn($cn) => $cn['paid'] === false);use InvalidArgumentException;
use McoreServices\TeamleaderSDK\Exceptions\TeamleaderException;
// Invalid download format
try {
Teamleader::creditnotes()->download('uuid', 'ubl/peppol_bis_3');
} catch (InvalidArgumentException $e) {
// "Invalid format 'ubl/peppol_bis_3'. Must be one of: pdf, ubl/e-fff"
}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