List Fortnox Invoices
fortnox_list_invoicesList Fortnox invoices with pagination and filters by status, customer, date, amount, and sorting to find exactly what you need.
Instructions
List invoices from Fortnox accounting system.
Retrieves a paginated list of invoices with optional filtering by status, customer, date range, or amount. Supports convenience period filters and can fetch all results for large datasets.
Args:
limit (number): Max results per page, 1-100 (default: 20)
page (number): Page number for pagination (default: 1)
filter ('cancelled' | 'fullypaid' | 'unpaid' | 'unpaidoverdue' | 'unbooked'): Filter by invoice status
customer_number (string): Filter by customer number
from_date (string): Filter invoices from this date (YYYY-MM-DD)
to_date (string): Filter invoices to this date (YYYY-MM-DD)
period ('today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'this_quarter' | 'last_quarter' | 'this_year' | 'last_year'): Convenience date period, overrides from_date/to_date
from_final_pay_date (string): Filter by due date from (YYYY-MM-DD)
to_final_pay_date (string): Filter by due date to (YYYY-MM-DD)
sortby ('customername' | 'customernumber' | 'documentnumber' | 'invoicedate' | 'total'): Field to sort by
sortorder ('ascending' | 'descending'): Sort order (default: ascending)
fetch_all (boolean): Fetch all results by auto-paginating (max 10,000 results)
min_amount (number): Filter invoices >= this amount (client-side)
max_amount (number): Filter invoices <= this amount (client-side)
response_format ('markdown' | 'json'): Output format
Returns: For JSON: { total, page, limit, count, has_more, total_pages, next_offset?, truncated?, invoices: [...] } For Markdown: Formatted list with pagination info
Examples:
List unpaid invoices: filter="unpaid"
Last month's invoices: period="last_month"
Top invoices by amount: sortby="total", sortorder="descending"
All invoices over 10000: fetch_all=true, min_amount=10000
Customer invoices this year: customer_number="1001", period="this_year"
Error Handling:
Returns "Error: Rate limit exceeded..." if API limit hit
Returns truncation info if fetch_all hits safety limits
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination | |
| limit | No | Maximum number of results to return (1-100) | |
| filter | No | Filter invoices by status | |
| period | No | Convenience date period filter (e.g., 'last_month', 'this_quarter'). Overrides from_date/to_date if provided. | |
| sortby | No | Field to sort results by | |
| to_date | No | Filter invoices to this date (YYYY-MM-DD) | |
| fetch_all | No | Fetch all results by auto-paginating through all pages. WARNING: May take time for large datasets (max 10,000 results). | |
| from_date | No | Filter invoices from this date (YYYY-MM-DD) | |
| sortorder | No | Sort order for results | ascending |
| max_amount | No | Filter invoices with total <= this amount (client-side filter, applied after fetching) | |
| min_amount | No | Filter invoices with total >= this amount (client-side filter, applied after fetching) | |
| customer_number | No | Filter by customer number | |
| response_format | No | Output format: 'markdown' or 'json' | markdown |
| to_final_pay_date | No | Filter by due date to (YYYY-MM-DD) | |
| from_final_pay_date | No | Filter by due date from (YYYY-MM-DD) |