Altinn 3 API client for creating instances, uploading data, and completing submissions.
Ported from wenche/altinn_client.py in the original Python Wenche project.
Handles instance creation, data submission, and completion for all three submission types: annual accounts, tax return, and shareholder register.
Summary
Functions
Moves the instance to the next process step (legacy API).
Creates a new Altinn 3 app instance (legacy API).
Advances the instance to the signing step and returns the Altinn inbox URL where the user can sign with BankID/ID-Porten.
Gets the current status of an instance (legacy API).
Gets the current status of an instance.
Creates a new AltinnClient with the given token and environment.
Updates an existing data element in the instance with PUT.
Creates a new instance for the given submission type and organization.
Uploads/updates a data element on an existing instance (legacy API).
Types
Functions
Moves the instance to the next process step (legacy API).
Returns {:ok, response_body} or {:error, reason}.
Creates a new Altinn 3 app instance (legacy API).
Returns {:ok, instance_body} or {:error, reason}.
Advances the instance to the signing step and returns the Altinn inbox URL where the user can sign with BankID/ID-Porten.
Signing requires ID-Porten and cannot be done programmatically.
Returns {:ok, inbox_url} or {:error, reason}.
Gets the current status of an instance (legacy API).
Returns {:ok, response_body} or {:error, reason}.
Gets the current status of an instance.
Returns {:ok, response_body} or {:error, reason}.
Creates a new AltinnClient with the given token and environment.
Options
:env—"test"or"prod"(default:"prod")
Updates an existing data element in the instance with PUT.
Altinn creates data elements automatically upon instance creation; we find the correct element via dataType and replace its contents.
Returns {:ok, response_body} or {:error, reason}.
Creates a new instance for the given submission type and organization.
App keys
"aarsregnskap"— Annual accounts (BRG)"aksjonaerregister"— Shareholder register (SKD)"skattemelding"— Tax return (SKD)
Returns {:ok, instance_map} or {:error, reason}.
Uploads/updates a data element on an existing instance (legacy API).
Returns {:ok, response_body} or {:error, reason}.