Create invoice
Save a customer invoice with dates and rows. It is saved, not booked and not sent.
MCP tool fortnox_write → create_invoice
Creates a customer invoice for an existing customer from the rows you give and returns its number and totals. The invoice is saved, so it can still be changed in Fortnox; it is not booked and not sent until bookkeep_invoice and send_invoice run. Each row needs a description or an article_number, a quantity and a unit price. Invoice and due date default to the customer terms in Fortnox. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_number string required | string | Customer number from list_customers. |
| invoice_date date | date | Invoice date. Default: today. |
| due_date date | date | Due date. Default: from the customer payment terms. |
| rows array required | array | Objects with article_number or description, quantity, unit_price and optional discount_percent. |
| comments string | string | Text shown on the invoice. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "fortnox_write",
"arguments": {
"operation": "create_invoice",
"arguments": {
"customer_number": "1042",
"invoice_date": "2026-10-14",
"due_date": "2026-11-13",
"rows": [
{
"description": "Consulting, October",
"quantity": 10,
"unit_price": 1200
}
]
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"invoice_number": "2381",
"customer_number": "1042",
"customer": "Nordlys Design AB",
"state": "saved",
"sent": false,
"invoice_date": "2026-10-14",
"due_date": "2026-11-13",
"net": 12000,
"vat": 3000,
"total": 15000,
"currency": "SEK"
},
"isError": false
}