Create invoice

Save a customer invoice with dates and rows. It is saved, not booked and not sent.

POST https://cotlet.dev/api/v1/fortnox/customers/{customer_number}/invoices

write Confirm

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

Parameters: create_invoice
NameTypeDescription
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.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/fortnox/customers/1042/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"invoice_date":"2026-10-14","due_date":"2026-11-13","rows":[{"description":"Consulting, October","quantity":10,"unit_price":1200}]}'
Python
result = client.call("fortnox", "create_invoice", {"customer_number":"1042","invoice_date":"2026-10-14","due_date":"2026-11-13","rows":[{"description":"Consulting, October","quantity":10,"unit_price":1200}]})
Node.js
const result = await cotlet.call('fortnox', 'create_invoice', {"customer_number":"1042","invoice_date":"2026-10-14","due_date":"2026-11-13","rows":[{"description":"Consulting, October","quantity":10,"unit_price":1200}]});
CLI
cotlet call fortnox create_invoice --data '{"customer_number":"1042","invoice_date":"2026-10-14","due_date":"2026-11-13","rows":[{"description":"Consulting, October","quantity":10,"unit_price":1200}]}'

Example response

JSON

{
  "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"
}

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.