Create invoice draft
Save an invoice draft for a customer. Nothing is booked and nothing is sent.
MCP tool fiken_write → create_invoice_draft
write
Saves a draft like Lagre utkast in Fiken and returns its draft_id. The draft shows under Utkast at the top of Salg → Faktura-/salgsoversikt, where you can open and change it. Nothing is booked, no invoice number is used and the customer hears nothing, so create_invoice_draft runs without asking first. Pass the draft_id to create_invoice to issue it.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_id integer required | integer | Contact ID from list_contacts or create_contact. |
| issue_date date | date | Invoice date. Default: today. |
| days_until_due integer required | integer | Days from the invoice date to the due date. |
| lines array required | array | Objects with description, quantity, unit_price (net per unit, excluding VAT), vat_type (for example HIGH, MEDIUM, LOW or NONE), optional discount_percent and income_account. A line without a product needs an income account. |
| invoice_text string | string | Comment printed above the invoice lines. |
| your_reference string | string | Your reference, printed on the invoice. |
| currency string | string | ISO 4217 code. Default: NOK. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "fiken_write",
"arguments": {
"operation": "create_invoice_draft",
"arguments": {
"customer_id": 1,
"days_until_due": 1,
"lines": "lines"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"draft_id": 771204,
"customer_id": 4021188,
"customer": "Nordlys Design AS",
"issue_date": "2026-10-14",
"due_date": "2026-10-28",
"net": 12000,
"vat": 3000,
"gross": 15000,
"currency": "NOK"
},
"isError": false
}