# Get account movement per period

`GET /v1/account-balances`

Net movement per account per calendar month, quarter or year. Opening entries (primo) are not movement and are excluded. Returns both balance-sheet and P&L accounts unless statement is set. With balance-sheet accounts included (the default), from and to must be in the same accounting year; statement=profit_loss may span years. Balance-sheet accounts also have opening (primo) and closing balances: opening_balance + net_change_total = closing_balance. Subtotal rows are not included. Drafts are excluded. Amounts are DKK; debit is positive, credit is negative (so income and liabilities are negative).

**Scopes:** any of `reports:read`, `read:ledger`

## Request

```bash
curl https://api.numina.app/v1/account-balances?from=2026-01-01&to=2026-03-31 \
  -H "Authorization: Bearer numi_YOUR_API_KEY"
```

## Query parameters

- `from` (string, required): Start of the range (inclusive) (YYYY-MM-DD)
- `to` (string, required): End of the range (inclusive) (YYYY-MM-DD)
- `granularity` (string, optional): Calendar period size (default: month) One of: `month`, `quarter`, `year`. Default: `"month"`.
- `statement` (string, optional): Only accounts on this statement (default: both, balance sheet and P&L) One of: `balance_sheet`, `profit_loss`.
- `include_empty_accounts` (string, optional): Include accounts without entries in the range and, for the balance sheet, without a balance (default: false) One of: `true`, `false`.

## Response `200`

Account movement

```json
{
  "from": "2026-01-01",
  "to": "2026-02-28",
  "granularity": "month",
  "base_currency": "DKK",
  "periods": [
    {
      "period": "2026-01",
      "start": "2026-01-01",
      "end": "2026-01-31"
    },
    {
      "period": "2026-02",
      "start": "2026-02-01",
      "end": "2026-02-28"
    }
  ],
  "accounts": [
    {
      "account_number": 1010,
      "name": "Salg af varer",
      "statement": "profit_loss",
      "category": "income",
      "periods": [
        {
          "period": "2026-01",
          "net_change": -40000
        },
        {
          "period": "2026-02",
          "net_change": -45000
        }
      ],
      "net_change_total": -85000
    },
    {
      "account_number": 5820,
      "name": "Bank",
      "statement": "balance_sheet",
      "category": "asset",
      "periods": [
        {
          "period": "2026-01",
          "net_change": -20000
        },
        {
          "period": "2026-02",
          "net_change": 30000
        }
      ],
      "net_change_total": 10000,
      "opening_balance": 180000,
      "closing_balance": 190000
    },
    {
      "account_number": 6000,
      "name": "Overført resultat",
      "statement": "balance_sheet",
      "category": "equity",
      "periods": [
        {
          "period": "2026-01",
          "net_change": 0
        },
        {
          "period": "2026-02",
          "net_change": 0
        }
      ],
      "net_change_total": 0,
      "opening_balance": -285000,
      "closing_balance": -285000
    }
  ]
}
```

## Errors

- `400` Bad Request - Invalid query, or balance-sheet accounts over more than one accounting year
- `401` Unauthorized - Invalid or missing authentication
- `403` Forbidden - Missing scope, or the company is archived
- `404` Not Found - No accounting year contains the date
- `429` Too Many Requests - Rate limit exceeded
- `500` Internal Server Error

See https://developers.numina.app/errors.md for the error format.
