# The accounting model

> How amounts, signs, VAT, drafts and booking work in Numina, and what that means for the data you send and read.

Numina is a double-entry ledger for Danish companies. Every transaction is a set of lines on accounts that sum to zero. The API exposes that model directly, so it pays to know four rules before you write.

## Signs

Amounts are signed: positive is debit, negative is credit.

| Account kind | Increases with | Example |
| --- | --- | --- |
| Expenses, assets | Positive amounts | `2450 Kontorartikler: 500` |
| Income, liabilities, equity | Negative amounts | `1010 Salg af varer og ydelser: -1000` |

The same convention holds in responses: on a revenue account, the balance endpoints return negative totals.

## Balanced lines

A journal entry has at least two lines, and their amounts sum to exactly zero in DKK. An unbalanced entry fails with `400 validation_error`.

```json title="Office supplies paid from the bank" {3}
{
  "lines": [
    { "account_number": 2450, "amount": 500, "vat_code": "I25" },
    { "account_number": 6480, "amount": -500 }
  ]
}
```

Lines refer to accounts by number. Numbers differ between companies, so read them from [List accounts](https://developers.numina.app/api/accounts/list-accounts.md) rather than hard-coding them.

## VAT

Put the VAT code on the line it applies to, and Numina splits out the VAT when the entry is booked.

- Danish VAT codes (`I25` for deductible purchase VAT, `U25` for sales VAT) take the gross amount, VAT included. The 500 DKK line above becomes 400 DKK of expense and 100 DKK of VAT.
- Reverse-charge codes take the net amount; Numina adds both VAT lines.

[List VAT codes](https://developers.numina.app/api/accounts/list-vat-codes.md) returns the codes a company uses, with their rates and types.

## Drafts and booking

What an integration creates starts as a draft. It changes the books only when it is booked.

### Draft

A journal entry from the API arrives in Numina's journal with status `open`. Drafts do not affect balances and can still be changed or deleted, so treat their figures as provisional.

### Booked

Booking splits out VAT, writes the final ledger entries and locks them. A booked entry is final: it is corrected in Numina with reversing entries.

A person can book a draft in Numina, or your integration can book it with [Book journal entry](https://developers.numina.app/api/journal-entries/book-journal-entry.md) and the `journal:book` scope. The entry needs a document first. Invoices work the same way with `invoices:book`: [Book draft invoice](https://developers.numina.app/api/invoices/book-draft-invoice.md), or `book: true` when you create one. Booking assigns the invoice number but does not send it.

> [!WARNING]
> **Booking is your approval**
>
>
> Numina does not review what you book through the API. Make sure a person at your company has checked the entry, or has approved the rules your system books by. Booking is not available to Fuld Service customers, whose books Numina's bookkeepers keep: those calls return `403 booking_not_available`.

> [!NOTE]
> Balance and report endpoints read booked entries only. A draft you just created will not show up in a trial balance until it is booked.

## Currency and dates

- DKK is the base currency. Ledger amounts and balances are DKK; invoices carry their own `currency` and a `currency_rate` to DKK.
- Dates are `YYYY-MM-DD` with no time zone. A company's accounting years decide which periods balance-sheet reports can span.
