Create invoice

Issue an invoice and book the income. It is created, not sent.

POST https://cotlet.dev/api/v1/fiken/invoices

write Confirm

Creates the invoice, like Opprett faktura in Fiken, from lines or from a draft_id, and registers the income in the accounts. It returns the invoice number and totals; the customer gets nothing until send_invoice runs. Fiken has no delete for invoices: a wrong invoice is corrected with a credit note in Fiken. Pass draft_id to issue a draft, or customer_id, days_until_due and lines to create one directly. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_invoice
NameTypeDescription
draft_id integer integer Draft ID from create_invoice_draft. Use this or the fields below.
customer_id integer integer Contact ID. Required without draft_id.
issue_date date date Invoice date. Default: today.
days_until_due integer integer Days from the invoice date to the due date. Required without draft_id.
lines array array Required without draft_id. 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.
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.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/fiken/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customer_id":4021188,"issue_date":"2026-10-14","days_until_due":14,"lines":[{"description":"Consulting, October","quantity":10,"unit_price":1200,"vat_type":"HIGH"}]}'
Python
result = client.call("fiken", "create_invoice", {"customer_id":4021188,"issue_date":"2026-10-14","days_until_due":14,"lines":[{"description":"Consulting, October","quantity":10,"unit_price":1200,"vat_type":"HIGH"}]})
Node.js
const result = await cotlet.call('fiken', 'create_invoice', {"customer_id":4021188,"issue_date":"2026-10-14","days_until_due":14,"lines":[{"description":"Consulting, October","quantity":10,"unit_price":1200,"vat_type":"HIGH"}]});
CLI
cotlet call fiken create_invoice --data '{"customer_id":4021188,"issue_date":"2026-10-14","days_until_due":14,"lines":[{"description":"Consulting, October","quantity":10,"unit_price":1200,"vat_type":"HIGH"}]}'

Example response

JSON

{
  "invoice_id": 5120331,
  "invoice_number": 10042,
  "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",
  "sent": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.