Create invoice draft
Save an invoice draft for a customer. Nothing is booked and nothing is sent.
POST https://cotlet.dev/api/v1/fiken/customers/{customer_id}/invoice-drafts
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. |
Request
curl -X POST https://cotlet.dev/api/v1/fiken/customers/1/invoice-drafts \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"days_until_due":1,"lines":"lines"}' result = client.call("fiken", "create_invoice_draft", {"customer_id":1,"days_until_due":1,"lines":"lines"}) const result = await cotlet.call('fiken', 'create_invoice_draft', {"customer_id":1,"days_until_due":1,"lines":"lines"}); cotlet call fiken create_invoice_draft --data '{"customer_id":1,"days_until_due":1,"lines":"lines"}' Example response
{
"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"
}