Yearly Accounts

Yearly accounts (årsregnskap) represent annual financial statements submitted to the Norwegian Register of Business Enterprises (Brønnøysundregistrene) via Altinn. The API supports a full workflow: preview accounting data, create drafts with editable notes, submit to Altinn, download PDFs, and post annual allocation entries.

Endpoints

Preview Yearly Account

GET /api/v2/yearly-accounts/preview

Generates a preview of the yearly account with auto-populated data from accounting records. Use this to review financial statements before creating a draft or submitting.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes The client account ID
reporting_year integer Yes Fiscal year to preview
from_date date No Period start (default: January 1 of reporting year)
to_date date No Period end (default: December 31 of reporting year)

Response

Returns a preview object with balance sheet, income statement, and related financial data.

List Submissions

GET /api/v2/yearly-accounts/submissions

Retrieves a paginated list of yearly account submissions.

Query Parameters

Parameter Type Required Description
client_account_id integer/list No Filter by client account(s). Defaults to user’s eligible accounts
reporting_year integer No Filter by fiscal year
order_by string No Sort order (e.g., -reporting_year, created_at)
page integer No Page number (default: 1)
page_size integer No Items per page (default: 100)

Response

{
  "data": [
    {
      "id": 1,
      "client_account_id": 7,
      "reporting_year": 2025,
      "from_date": "2025-01-01",
      "to_date": "2025-12-31",
      "status": "SUBMITTED",
      "altinn_instance_id": "abc-def-123",
      "main_form_id": "RF-1167",
      "sub_form_id": "RF-1175",
      "submitted_at": "2026-03-15T10:00:00Z",
      "error_message": null,
      "created_at": "2026-03-14T14:00:00Z",
      "created_by_id": 7,
      "updated_at": "2026-03-15T10:00:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "pages": 1,
    "per_page": 100,
    "records": 1
  }
}

Get Submission

GET /api/v2/yearly-accounts/submissions/{id}

Retrieves a specific yearly account submission.

Response

Returns the yearly account object.

Create Draft

POST /api/v2/yearly-accounts/drafts

Creates a draft yearly account with auto-generated notes. Use this to prepare the submission and allow note editing before final submission.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
reporting_year integer Yes Fiscal year

Example Request

{
  "client_account_id": 7,
  "reporting_year": 2025
}

Response

Returns the created draft with status DRAFT.

Submit Yearly Account

POST /api/v2/yearly-accounts/submissions

Submits a yearly account directly to Altinn (without creating a draft first).

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
reporting_year integer Yes Fiscal year being filed

Example Request

{
  "client_account_id": 7,
  "reporting_year": 2025
}

Response

Returns the submitted yearly account object.

Submit Draft

POST /api/v2/yearly-accounts/submissions/{id}/submit

Submits an existing draft yearly account to Altinn. Only drafts with status DRAFT can be submitted.

Response

Returns the yearly account with updated status.

Validation

Attempting to submit a non-draft yearly account returns a 400 Bad Request:

{
  "error": "Only DRAFT yearly accounts can be submitted",
  "status": 400
}

Cancel Submission

POST /api/v2/yearly-accounts/submissions/{id}/cancel

Cancels a draft or submitted yearly account. Only submissions with status DRAFT or SUBMITTED can be cancelled.

Response

Returns the yearly account with status set to CANCELLED.

Download PDF

GET /api/v2/yearly-accounts/submissions/{id}/pdf

Downloads the yearly account as a PDF file.

Response

Returns a PDF file (application/pdf) as an attachment with filename Årsregnskap_{year}.pdf.

Get Notes

GET /api/v2/yearly-accounts/submissions/{id}/notes

Retrieves the notes for a yearly account. Returns stored notes if they have been edited, otherwise generates default notes from accounting data.

Response

Returns a JSON array of note objects.

Update Notes

PUT /api/v2/yearly-accounts/submissions/{id}/notes

Saves edited notes for a yearly account. Only allowed on submissions with DRAFT status.

Request Body

A JSON array of note objects.

Example Request

Note: The example below is simplified. Actual note objects include additional fields: note_number, key, body_type, body (which may be a string or table object), and an optional footer_text.

[
  {
    "note_number": 1,
    "key": "regnskapsprinsipper",
    "title": "Regnskapsprinsipper",
    "body_type": "text",
    "body": "Årsregnskapet er satt opp i samsvar med regnskapsloven..."
  },
  {
    "note_number": 2,
    "key": "lonnskostnader",
    "title": "Lønnskostnader",
    "body_type": "table",
    "body": {
      "columns": ["", "2025", "2024"],
      "rows": [["Lønninger", "500000.00", "450000.00"]]
    },
    "footer_text": "Selskapet er pliktig til å ha tjenestepensjonsordning..."
  }
]

Response

Returns the saved notes array.

Validation

Attempting to edit notes on a non-draft yearly account returns a 400 Bad Request:

{
  "error": "Notes can only be edited on DRAFT yearly accounts",
  "status": 400
}

Post Annual Allocations

POST /api/v2/yearly-accounts/annual-allocations

Posts an annual allocation closing entry (årsavslutning) with a journal entry and associated PDF document.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
reporting_year integer Yes Fiscal year
lines array Yes Journal entry lines (minimum 2 lines required)
description string No Entry description (default: “Årsavslutning {year}”)

Example Request

{
  "client_account_id": 7,
  "reporting_year": 2025,
  "description": "Årsavslutning 2025",
  "lines": [
    {
      "account_code": "8800",
      "debit": "50000.00",
      "credit": "0"
    },
    {
      "account_code": "2050",
      "debit": "0",
      "credit": "50000.00"
    }
  ]
}

Response

Returns the created journal entry object.

Yearly Account Statuses

Status Description
DRAFT Created but not yet submitted. Notes can be edited
SUBMITTED Sent to Brønnøysundregistrene via Altinn
APPROVED Accepted by the register
REJECTED Rejected (see error_message for details)
CANCELLED Cancelled by user

Yearly Account Attributes

Attribute Type Description
id integer Unique identifier
client_account_id integer Associated client account
reporting_year integer Fiscal year
from_date date Period start date
to_date date Period end date
status string Current status (see statuses above)
altinn_instance_id string Altinn tracking identifier
main_form_id string Main form ID (e.g., RF-1167)
sub_form_id string Sub-form ID (e.g., RF-1175)
submitted_at datetime When the submission was sent
error_message string Error details if submission failed
created_at datetime Creation timestamp
created_by_id integer User who created the submission
updated_at datetime Last update timestamp

Error Responses

Status Code Description
400 Invalid request (missing fields, invalid status transition, notes edit on non-draft)
403 Forbidden (no access to client account)

Business Rules

  1. Yearly accounts are scoped to a specific client account and reporting year
  2. Users must have access to the client account to manage its yearly accounts
  3. Notes can only be edited while the submission is in DRAFT status
  4. Only DRAFT and SUBMITTED submissions can be cancelled
  5. Only DRAFT submissions can be submitted via the submit endpoint
  6. Annual allocation entries require at least two balanced journal entry lines
  7. The PDF generation uses the stored submission data

Typical Workflow

  1. Preview - Call the preview endpoint to review financial data
  2. Create draft - Create a draft to start preparing the submission
  3. Edit notes - Review and customize the auto-generated notes
  4. Submit - Submit the draft to Altinn
  5. Download PDF - Get a PDF copy for records
  6. Post allocations - Create the closing journal entry for the fiscal year