Menu
Cookbooks
API reference
- Overview
- Companies
- Capabilities
- Measures
- Packages
- Unexplained
- Liquidity forecast
- Portfolio
- Customers
- Invoices
- Collections
- Articles
- Set-offs
- Suppliers
- Supplier invoices
- Supplier payment files
- Bank payments
- Expense claims
- Transactions
- Reconciliation
- Bank accounts
- POS sales
- Webshop orders
- Journal entries
- Voucher gap explanations
- Fiscal periods
- Accounts
- Accrual schedules
- Agreements and commitments
- Tax loss carry-forwards
- Fixed assets
- Documents
- Signing requests
- Company registers
- Capital events
- Owner tax
- Inbox items
- Dimensions
- Employees
- Salary runs
- Reports
- Budgets
- Imports
- Compliance check
- Skatteverket
- Peppol
- Webhooks
- Operations
- Pending operations
- Health
- API key
- Service accounts
Agreements and commitments
What the company has signed and promised, for companies where it is switched on: agreements (rent, leases, loans, subscriptions, insurance, permits, IP rights, domains, guarantees) with their expected payments observed against the bank and their notice and end dates, ställda säkerheter and eventualförpliktelser with the årsredovisning note texts they give, and the group structure. Writes are registers only: nothing is booked.
Endpoints
GET/api/v1/companies/:companyId/agreement-obligations: List the payments the agreements say fall due, oldest first, with whether each arrived in the bank.GET/api/v1/companies/:companyId/agreements: List the company's agreements (rent, leases, loans, subscriptions, insurance, permits, IP, domains, guarantees and more) with the next payment and the notice and end dates.GET/api/v1/companies/:companyId/group-links: List the company's group structure: its parent, subsidiaries and associates with ownership and votes over time.GET/api/v1/companies/:companyId/securities: List ställda säkerheter and eventualförpliktelser, with the årsredovisning note texts they give on a balance date.POST/api/v1/companies/:companyId/agreements: Register an agreement by hand: what it is, the counterparty, the dates, notice and what it costs.POST/api/v1/companies/:companyId/agreements/:id/end: End a manual agreement: no more expected payments after the day it ended, its dates leave Viktiga datum.POST/api/v1/companies/:companyId/group-links: Register a parent, subsidiary or associate of the company.POST/api/v1/companies/:companyId/securities: Register a ställd säkerhet or an eventualförpliktelse.PATCH/api/v1/companies/:companyId/agreements/:id: Change a manual agreement; its expected payments and its dates follow.PATCH/api/v1/companies/:companyId/group-links/:id: Change a group link, or end it with valid_to.PATCH/api/v1/companies/:companyId/securities/:id: Change a ställd säkerhet or an eventualförpliktelse, or release it with valid_to.
GET /api/v1/companies/:companyId/agreement-obligations
agreements.list-obligations · scope companies:read
List the payments the agreements say fall due, oldest first, with whether each arrived in the bank.
From 60 days back by default (from, to narrow it). status expected: not seen yet; matched: a bank transaction (transaction_id) has the amount and date; missed: nothing arrived two weeks after the due date. Observation only: nothing is booked from these rows.
Use when: You need the upcoming payments of the company's agreements, or to see which rent or instalment was missed.
Don't use for: Supplier invoices or bank payments (they have their own lists).
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- AGREEMENT_NOT_FOUND: agreement_id is not an agreement of the company.
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
agreement_id | string | no | Only this agreement's payments. |
status | "expected" | "matched" | "missed" | "waived" | no | |
from | string | no | yyyy-MM-dd, default 60 days back. |
to | string | no | yyyy-MM-dd, inclusive. |
Response fields
| Name | Type | Description |
|---|---|---|
obligations[].obligation_id | string | |
obligations[].agreement_id | string | |
obligations[].agreement_title | string | |
obligations[].kind | string | |
obligations[].due_on | string | |
obligations[].amount | number | |
obligations[].currency | string | |
obligations[].direction | "out" | "in" | |
obligations[].status | "expected" | "matched" | "missed" | "waived" | |
obligations[].amount_is_estimate | boolean | |
obligations[].transaction_id | string | null | The bank transaction the payment was matched to. |
Example response
{
"data": {
"obligations": [
{
"obligation_id": "c1d2…",
"agreement_id": "6b2e…",
"agreement_title": "Hyresavtal kontor Vasagatan",
"kind": "payment",
"due_on": "2026-11-01",
"amount": 12500,
"currency": "SEK",
"direction": "out",
"status": "expected",
"amount_is_estimate": false,
"transaction_id": null
}
]
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
GET /api/v1/companies/:companyId/agreements
agreements.list · scope companies:read
List the company's agreements (rent, leases, loans, subscriptions, insurance, permits, IP, domains, guarantees and more) with the next payment and the notice and end dates.
Both the agreements registered by hand (origin manual) and the ones the archive read from documents (origin derived). next_payment is observed against the bank daily and never booked from; notice_deadline and end_deadline are the dates in Viktiga datum.
Use when: You need to know what the company has signed: what it pays and when, and when something must be terminated or renewed.
Don't use for: Booking payments (the agreements never post) or reading the agreement text (read the linked document).
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | "active" | "ended" | no | Only active or ended agreements. |
kind | "rental" | "lease" | "loan" | "subscription" | "insurance" | "employment" | "shareholder" | "investment" | "customer" | "permit" | "ip_right" | "domain" | "guarantee" | "other" | no | Only this kind. |
origin | "derived" | "manual" | no | Only derived or manual agreements. |
Response fields
| Name | Type | Description |
|---|---|---|
agreements[].agreement_id | string | |
agreements[].kind | string | |
agreements[].origin | "derived" | "manual" | derived: read from an archived document by the Arkiv pipeline (read only here); manual: registered by a person or an API client. |
agreements[].title | string | |
agreements[].status | "active" | "ended" | |
agreements[].counterparty_party_id | string | null | |
agreements[].counterparty_name | string | null | |
agreements[].starts_on | string | null | |
agreements[].ends_on | string | null | |
agreements[].notice_months | number | null | |
agreements[].renewal_terms | string | null | |
agreements[].amount | number | null | |
agreements[].currency | string | |
agreements[].period | "monthly" | "quarterly" | "yearly" | "one_time" | null | |
agreements[].first_due_on | string | null | |
agreements[].principal | number | null | |
agreements[].interest_rate | number | null | |
agreements[].document_id | string | null | |
agreements[].source_document_id | string | null | |
agreements[].notes | string | null | |
agreements[].next_payment | object | null | The next expected payment, else the latest missed one: observed against the bank daily, never booked from. |
agreements[].notice_deadline | object | null | The last day to give notice, in Viktiga datum. |
agreements[].end_deadline | object | null | The end, expiry or maturity date, in Viktiga datum. |
Example response
{
"data": {
"agreements": [
{
"agreement_id": "6b2e…",
"kind": "rental",
"origin": "manual",
"title": "Hyresavtal kontor Vasagatan",
"status": "active",
"counterparty_party_id": null,
"counterparty_name": "Fastighets AB Kvarnen",
"starts_on": "2026-01-01",
"ends_on": "2028-12-31",
"notice_months": 9,
"renewal_terms": "Förlängs tre år i taget",
"amount": 12500,
"currency": "SEK",
"period": "monthly",
"first_due_on": null,
"principal": null,
"interest_rate": null,
"document_id": null,
"source_document_id": null,
"notes": null,
"next_payment": {
"due_on": "2026-11-01",
"amount": 12500,
"currency": "SEK",
"status": "expected",
"direction": "out"
},
"notice_deadline": {
"due_date": "2028-03-31",
"title": "Sista dag att säga upp: Hyresavtal kontor Vasagatan"
},
"end_deadline": {
"due_date": "2028-12-31",
"title": "Hyresavtal kontor Vasagatan löper ut, förlängs annars"
}
}
]
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
GET /api/v1/companies/:companyId/group-links
group-links.list · scope companies:read
List the company's group structure: its parent, subsidiaries and associates with ownership and votes over time.
applies is false for a legal form that prepares no årsredovisning (an enskild firma). The parent link that holds on the balance date prefills the koncernförhållanden note.
Use when: You need the parent company for the årsredovisning, or which companies the company owns.
Don't use for: Consolidated accounts (koncernredovisning is not prepared here).
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no
Response fields
| Name | Type |
|---|---|
group_links | object[] |
applies | boolean |
Example response
{
"data": {
"group_links": [
{
"group_link_id": "3a77…",
"relation": "parent",
"counterparty_name": "Ägarbolaget AB",
"counterparty_org_number": "559000-0000",
"counterparty_registered_office": "Stockholm",
"party_id": null,
"ownership_percent": 100,
"voting_percent": 100,
"valid_from": "2024-01-01",
"valid_to": null,
"bas_account": null,
"linked_company_id": null,
"notes": null
}
],
"applies": true
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
GET /api/v1/companies/:companyId/securities
securities.list · scope companies:read
List ställda säkerheter and eventualförpliktelser, with the årsredovisning note texts they give on a balance date.
Rows are dated (valid_from, valid_to); the note texts count the rows that hold on balance_date (default today), per K2 type, with borgen always stated and what was given for group companies apart. A manual text on the årsredovisning overrides them.
Use when: You prepare the årsredovisning notes, or need to know what the company has pledged or guaranteed.
Don't use for: Loans themselves (agreements of kind loan).
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
balance_date | string | no | yyyy-MM-dd the note texts are stated per; default today. |
Response fields
| Name | Type |
|---|---|
securities | object[] |
balance_date | string |
note_texts | object |
Example response
{
"data": {
"securities": [
{
"security_id": "91c0…",
"kind": "foretagsinteckning",
"pledged": true,
"description": "Företagsinteckning för checkkredit",
"amount": 500000,
"in_favour_of_party_id": null,
"in_favour_of_name": "Handelsbanken",
"for_group_company": false,
"agreement_id": null,
"valid_from": "2025-03-01",
"valid_to": null,
"document_id": null,
"notes": null
}
],
"balance_date": "2026-12-31",
"note_texts": {
"securities_pledged": "Företagsinteckningar 500 000 kr.",
"contingent_liabilities": null
}
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
POST /api/v1/companies/:companyId/agreements
agreements.create · scope companies:write
Register an agreement by hand: what it is, the counterparty, the dates, notice and what it costs.
With amount and period, the expected payments a year ahead are written and compared with the bank daily. With ends_on, the end (or a loan's maturity) goes to Viktiga datum, and with notice_months also the last day to give notice. A document is linked by document_id, never read into fields. Dry-runnable.
Use when: The company has an agreement the books should remember: rent, a lease, a loan, a subscription, an insurance, a permit, an IP right, a domain, a guarantee.
Don't use for: Booking anything (agreements never post) or changing an agreement the archive read from a document (origin derived).
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- VALIDATION_ERROR: an amount needs a period, and ends_on cannot be before starts_on.
- COMMITMENTS_REFERENCE_NOT_FOUND: counterparty_party_id or document_id is not the company's (details.field).
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: yes · Stage for approval: yes (?stage=true)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run | string | no | true (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits. |
stage | string | no | true stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
kind | "rental" | "lease" | "loan" | "subscription" | "insurance" | "employment" | "shareholder" | "investment" | "customer" | "permit" | "ip_right" | "domain" | "guarantee" | "other" | yes | rental, lease, loan, subscription, insurance, employment, shareholder, investment, customer, permit, ip_right, domain, guarantee or other. |
title | string | yes | What the agreement is, as the company calls it (e.g. Hyresavtal kontor Vasagatan). |
counterparty_name | string | null | no | The other party as named in the agreement. |
counterparty_party_id | string | null | no | The counterparty in the company's parties (party_id), when known. |
starts_on | string | null | no | yyyy-MM-dd the agreement starts. |
ends_on | string | null | no | yyyy-MM-dd it ends or expires (bindningstid, maturity, expiry of a permit or domain). |
notice_months | number | null | no | Uppsägningstid in months before ends_on; gives a notice date in Viktiga datum. |
renewal_terms | string | null | no | How it renews when not terminated, e.g. Förlängs 12 månader i taget. |
amount | number | null | no | The recurring payment (or the one payment), SEK unless currency says otherwise. |
currency | string | no | ISO 4217, default SEK. |
period | "monthly" | "quarterly" | "yearly" | "one_time" | null | no | How often amount falls due. |
first_due_on | string | null | no | yyyy-MM-dd of the first payment when it is not starts_on; later ones follow by period. |
principal | number | null | no | A loan: the amount borrowed. |
interest_rate | number | null | no | A loan: the annual interest rate in percent. |
document_id | string | null | no | The archived document the agreement is in (document_id). Linked, never read into fields. |
notes | string | null | no |
Response fields
| Name | Type | Description |
|---|---|---|
agreement_id | string | |
kind | string | |
origin | "derived" | "manual" | derived: read from an archived document by the Arkiv pipeline (read only here); manual: registered by a person or an API client. |
title | string | |
status | "active" | "ended" | |
counterparty_party_id | string | null | |
counterparty_name | string | null | |
starts_on | string | null | |
ends_on | string | null | |
notice_months | number | null | |
renewal_terms | string | null | |
amount | number | null | |
currency | string | |
period | "monthly" | "quarterly" | "yearly" | "one_time" | null | |
first_due_on | string | null | |
principal | number | null | |
interest_rate | number | null | |
document_id | string | null | |
source_document_id | string | null | |
notes | string | null | |
next_payment | object | null | The next expected payment, else the latest missed one: observed against the bank daily, never booked from. |
notice_deadline | object | null | The last day to give notice, in Viktiga datum. |
end_deadline | object | null | The end, expiry or maturity date, in Viktiga datum. |
Example request
{
"kind": "rental",
"title": "Hyresavtal kontor Vasagatan",
"counterparty_name": "Fastighets AB Kvarnen",
"starts_on": "2026-01-01",
"ends_on": "2028-12-31",
"notice_months": 9,
"amount": 12500,
"period": "monthly"
}
Example response
{
"data": {
"agreement_id": "6b2e…",
"kind": "rental",
"origin": "manual",
"title": "Hyresavtal kontor Vasagatan",
"status": "active",
"counterparty_party_id": null,
"counterparty_name": "Fastighets AB Kvarnen",
"starts_on": "2026-01-01",
"ends_on": "2028-12-31",
"notice_months": 9,
"renewal_terms": "Förlängs tre år i taget",
"amount": 12500,
"currency": "SEK",
"period": "monthly",
"first_due_on": null,
"principal": null,
"interest_rate": null,
"document_id": null,
"source_document_id": null,
"notes": null,
"next_payment": {
"due_on": "2026-11-01",
"amount": 12500,
"currency": "SEK",
"status": "expected",
"direction": "out"
},
"notice_deadline": {
"due_date": "2028-03-31",
"title": "Sista dag att säga upp: Hyresavtal kontor Vasagatan"
},
"end_deadline": {
"due_date": "2028-12-31",
"title": "Hyresavtal kontor Vasagatan löper ut, förlängs annars"
}
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
POST /api/v1/companies/:companyId/agreements/:id/end
agreements.end · scope companies:write
End a manual agreement: no more expected payments after the day it ended, its dates leave Viktiga datum.
ended_on defaults to today; an earlier ends_on stays. Ending twice answers the same. Dry-runnable.
Use when: The agreement was terminated, expired or replaced.
Don't use for: Removing an agreement that never existed (end it with the day it started) or an agreement the archive read from a document.
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- AGREEMENT_DERIVED
- AGREEMENT_NOT_FOUND
Risk: low · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run | string | no | true (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits. |
stage | string | no | true stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
ended_on | string | no | yyyy-MM-dd the agreement ended; default today. An earlier ends_on stays. |
Response fields
| Name | Type | Description |
|---|---|---|
agreement_id | string | |
kind | string | |
origin | "derived" | "manual" | derived: read from an archived document by the Arkiv pipeline (read only here); manual: registered by a person or an API client. |
title | string | |
status | "active" | "ended" | |
counterparty_party_id | string | null | |
counterparty_name | string | null | |
starts_on | string | null | |
ends_on | string | null | |
notice_months | number | null | |
renewal_terms | string | null | |
amount | number | null | |
currency | string | |
period | "monthly" | "quarterly" | "yearly" | "one_time" | null | |
first_due_on | string | null | |
principal | number | null | |
interest_rate | number | null | |
document_id | string | null | |
source_document_id | string | null | |
notes | string | null | |
next_payment | object | null | The next expected payment, else the latest missed one: observed against the bank daily, never booked from. |
notice_deadline | object | null | The last day to give notice, in Viktiga datum. |
end_deadline | object | null | The end, expiry or maturity date, in Viktiga datum. |
Example request
{
"ended_on": "2026-10-31"
}
Example response
{
"data": {
"agreement_id": "6b2e…",
"kind": "rental",
"origin": "manual",
"title": "Hyresavtal kontor Vasagatan",
"status": "ended",
"counterparty_party_id": null,
"counterparty_name": "Fastighets AB Kvarnen",
"starts_on": "2026-01-01",
"ends_on": "2026-10-31",
"notice_months": 9,
"renewal_terms": "Förlängs tre år i taget",
"amount": 12500,
"currency": "SEK",
"period": "monthly",
"first_due_on": null,
"principal": null,
"interest_rate": null,
"document_id": null,
"source_document_id": null,
"notes": null,
"next_payment": {
"due_on": "2026-11-01",
"amount": 12500,
"currency": "SEK",
"status": "expected",
"direction": "out"
},
"notice_deadline": {
"due_date": "2028-03-31",
"title": "Sista dag att säga upp: Hyresavtal kontor Vasagatan"
},
"end_deadline": {
"due_date": "2028-12-31",
"title": "Hyresavtal kontor Vasagatan löper ut, förlängs annars"
}
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
POST /api/v1/companies/:companyId/group-links
group-links.create · scope companies:write
Register a parent, subsidiary or associate of the company.
counterparty_registered_office (säte) and counterparty_org_number go into the koncernförhållanden note for a parent. linked_company_id names the same company in Accounted when it is in the caller's team. Dry-runnable.
Use when: The company is owned by another company, or owns shares in one.
Don't use for: Individual shareholders (the aktiebok) or an enskild firma (no group structure).
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- GROUP_LINKS_NOT_FOR_LEGAL_FORM: only companies that prepare an årsredovisning have a group structure here.
- GROUP_LINK_COMPANY_NOT_IN_TEAM: linked_company_id must be another company in the same team.
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: yes · Stage for approval: yes (?stage=true)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run | string | no | true (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits. |
stage | string | no | true stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
relation | "parent" | "subsidiary" | "associate" | yes | parent (holds this company), subsidiary (dotterföretag) or associate (intresseföretag). |
counterparty_name | string | yes | The other company's name. |
counterparty_org_number | string | null | no | Its organisation number (a foreign one as registered there). |
counterparty_registered_office | string | null | no | Its säte, for the koncernförhållanden note. |
party_id | string | null | no | The company in the parties register (party_id), when known. |
ownership_percent | number | null | no | Share of the capital held, percent. |
voting_percent | number | null | no | Share of the votes held, percent. |
valid_from | string | null | no | yyyy-MM-dd the relation began. |
valid_to | string | null | no | yyyy-MM-dd it ended; open while it holds. |
bas_account | string | null | no | The 13xx account (finansiella anläggningstillgångar) the holding or claim is booked on, as a string. |
linked_company_id | string | null | no | The same company in Accounted, when it is in the caller's team. |
notes | string | null | no |
Response fields
| Name | Type |
|---|---|
group_link_id | string |
relation | "parent" | "subsidiary" | "associate" |
counterparty_name | string |
counterparty_org_number | string | null |
counterparty_registered_office | string | null |
party_id | string | null |
ownership_percent | number | null |
voting_percent | number | null |
valid_from | string | null |
valid_to | string | null |
bas_account | string | null |
linked_company_id | string | null |
notes | string | null |
Example request
{
"relation": "parent",
"counterparty_name": "Ägarbolaget AB",
"counterparty_org_number": "559000-0000",
"counterparty_registered_office": "Stockholm",
"ownership_percent": 100,
"voting_percent": 100,
"valid_from": "2024-01-01"
}
Example response
{
"data": {
"group_link_id": "3a77…",
"relation": "parent",
"counterparty_name": "Ägarbolaget AB",
"counterparty_org_number": "559000-0000",
"counterparty_registered_office": "Stockholm",
"party_id": null,
"ownership_percent": 100,
"voting_percent": 100,
"valid_from": "2024-01-01",
"valid_to": null,
"bas_account": null,
"linked_company_id": null,
"notes": null
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
POST /api/v1/companies/:companyId/securities
securities.create · scope companies:write
Register a ställd säkerhet or an eventualförpliktelse.
amount is the mortgage amount (pantbrev, företagsinteckning), the book value of the pledged asset or the guaranteed amount, in SEK. for_group_company marks what was given for a group company (stated apart). A released one gets valid_to through PATCH; rows are never deleted. Dry-runnable.
Use when: The bank took a företagsinteckning, a property is mortgaged, an asset was bought under äganderättsförbehåll, the company signed a borgen.
Don't use for: The loan itself (POST /agreements, kind loan; link it with agreement_id).
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- COMMITMENTS_REFERENCE_NOT_FOUND: in_favour_of_party_id, agreement_id or document_id is not the company's (details.field).
Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: yes · Stage for approval: yes (?stage=true)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run | string | no | true (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits. |
stage | string | no | true stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
kind | "foretagsinteckning" | "fastighetsinteckning" | "aganderattsforbehall" | "belanad_fordran" | "other_security" | "borgen" | "other_contingency" | yes | Ställd säkerhet: foretagsinteckning, fastighetsinteckning, aganderattsforbehall, belanad_fordran, other_security. Eventualförpliktelse: borgen, other_contingency. |
description | string | yes | What is pledged or promised, e.g. Företagsinteckning i Handelsbanken för checkkredit. |
amount | number | yes | SEK: the mortgage amount (pantbrev, företagsinteckning), the book value of the pledged asset or the amount of the guarantee. |
in_favour_of_name | string | null | no | Who the security or guarantee is given to. |
in_favour_of_party_id | string | null | no | That party in the company's parties (party_id), when known. |
for_group_company | boolean | no | Given for or to a group company (ÅRL 5 kap. 16 §): stated apart in the note. |
agreement_id | string | null | no | The loan agreement the security is for (agreement_id). |
valid_from | string | null | no | yyyy-MM-dd it was given. |
valid_to | string | null | no | yyyy-MM-dd it was released; open while it holds. |
document_id | string | null | no | The archived document (pantförskrivning, borgensförbindelse). |
notes | string | null | no |
Response fields
| Name | Type | Description |
|---|---|---|
security_id | string | |
kind | "foretagsinteckning" | "fastighetsinteckning" | "aganderattsforbehall" | "belanad_fordran" | "other_security" | "borgen" | "other_contingency" | |
pledged | boolean | true: a ställd säkerhet; false: an eventualförpliktelse. |
description | string | |
amount | number | |
in_favour_of_party_id | string | null | |
in_favour_of_name | string | null | |
for_group_company | boolean | |
agreement_id | string | null | |
valid_from | string | null | |
valid_to | string | null | |
document_id | string | null | |
notes | string | null |
Example request
{
"kind": "foretagsinteckning",
"description": "Företagsinteckning för checkkredit",
"amount": 500000,
"in_favour_of_name": "Handelsbanken",
"valid_from": "2025-03-01"
}
Example response
{
"data": {
"security_id": "91c0…",
"kind": "foretagsinteckning",
"pledged": true,
"description": "Företagsinteckning för checkkredit",
"amount": 500000,
"in_favour_of_party_id": null,
"in_favour_of_name": "Handelsbanken",
"for_group_company": false,
"agreement_id": null,
"valid_from": "2025-03-01",
"valid_to": null,
"document_id": null,
"notes": null
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
PATCH /api/v1/companies/:companyId/agreements/:id
agreements.update · scope companies:write
Change a manual agreement; its expected payments and its dates follow.
Send only the fields that change; null clears one. Payments already matched or missed stay. Dry-runnable.
Use when: The rent changed, the agreement was extended, the notice period was wrong.
Don't use for: Ending an agreement (POST /agreements/{id}/end) or an agreement the archive read from a document.
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- AGREEMENT_DERIVED: the agreement was read from an archived document; correct the reading there.
- AGREEMENT_NOT_FOUND
Risk: low · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run | string | no | true (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits. |
stage | string | no | true stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
kind | "rental" | "lease" | "loan" | "subscription" | "insurance" | "employment" | "shareholder" | "investment" | "customer" | "permit" | "ip_right" | "domain" | "guarantee" | "other" | no | |
title | string | no | What the agreement is, as the company calls it (e.g. Hyresavtal kontor Vasagatan). |
counterparty_name | string | null | no | The other party as named in the agreement. |
counterparty_party_id | string | null | no | The counterparty in the company's parties (party_id), when known. |
starts_on | string | null | no | yyyy-MM-dd the agreement starts. |
ends_on | string | null | no | yyyy-MM-dd it ends or expires (bindningstid, maturity, expiry of a permit or domain). |
notice_months | number | null | no | Uppsägningstid in months before ends_on; gives a notice date in Viktiga datum. |
renewal_terms | string | null | no | How it renews when not terminated, e.g. Förlängs 12 månader i taget. |
amount | number | null | no | The recurring payment (or the one payment), SEK unless currency says otherwise. |
currency | string | no | ISO 4217, default SEK. |
period | "monthly" | "quarterly" | "yearly" | "one_time" | null | no | How often amount falls due. |
first_due_on | string | null | no | yyyy-MM-dd of the first payment when it is not starts_on; later ones follow by period. |
principal | number | null | no | A loan: the amount borrowed. |
interest_rate | number | null | no | A loan: the annual interest rate in percent. |
document_id | string | null | no | The archived document the agreement is in (document_id). Linked, never read into fields. |
notes | string | null | no |
Response fields
| Name | Type | Description |
|---|---|---|
agreement_id | string | |
kind | string | |
origin | "derived" | "manual" | derived: read from an archived document by the Arkiv pipeline (read only here); manual: registered by a person or an API client. |
title | string | |
status | "active" | "ended" | |
counterparty_party_id | string | null | |
counterparty_name | string | null | |
starts_on | string | null | |
ends_on | string | null | |
notice_months | number | null | |
renewal_terms | string | null | |
amount | number | null | |
currency | string | |
period | "monthly" | "quarterly" | "yearly" | "one_time" | null | |
first_due_on | string | null | |
principal | number | null | |
interest_rate | number | null | |
document_id | string | null | |
source_document_id | string | null | |
notes | string | null | |
next_payment | object | null | The next expected payment, else the latest missed one: observed against the bank daily, never booked from. |
notice_deadline | object | null | The last day to give notice, in Viktiga datum. |
end_deadline | object | null | The end, expiry or maturity date, in Viktiga datum. |
Example request
{
"amount": 13000
}
Example response
{
"data": {
"agreement_id": "6b2e…",
"kind": "rental",
"origin": "manual",
"title": "Hyresavtal kontor Vasagatan",
"status": "active",
"counterparty_party_id": null,
"counterparty_name": "Fastighets AB Kvarnen",
"starts_on": "2026-01-01",
"ends_on": "2028-12-31",
"notice_months": 9,
"renewal_terms": "Förlängs tre år i taget",
"amount": 13000,
"currency": "SEK",
"period": "monthly",
"first_due_on": null,
"principal": null,
"interest_rate": null,
"document_id": null,
"source_document_id": null,
"notes": null,
"next_payment": {
"due_on": "2026-11-01",
"amount": 12500,
"currency": "SEK",
"status": "expected",
"direction": "out"
},
"notice_deadline": {
"due_date": "2028-03-31",
"title": "Sista dag att säga upp: Hyresavtal kontor Vasagatan"
},
"end_deadline": {
"due_date": "2028-12-31",
"title": "Hyresavtal kontor Vasagatan löper ut, förlängs annars"
}
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
PATCH /api/v1/companies/:companyId/group-links/:id
group-links.update · scope companies:write
Change a group link, or end it with valid_to.
Send only the fields that change; null clears one. Dry-runnable.
Use when: Ownership changed, the parent sold the company, a subsidiary was wound up.
Don't use for: Removing history: an ended relation keeps its row with valid_to.
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- GROUP_LINK_NOT_FOUND
- GROUP_LINKS_NOT_FOR_LEGAL_FORM
Risk: low · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run | string | no | true (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits. |
stage | string | no | true stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
relation | "parent" | "subsidiary" | "associate" | no | |
counterparty_name | string | no | The other company's name. |
counterparty_org_number | string | null | no | Its organisation number (a foreign one as registered there). |
counterparty_registered_office | string | null | no | Its säte, for the koncernförhållanden note. |
party_id | string | null | no | The company in the parties register (party_id), when known. |
ownership_percent | number | null | no | Share of the capital held, percent. |
voting_percent | number | null | no | Share of the votes held, percent. |
valid_from | string | null | no | yyyy-MM-dd the relation began. |
valid_to | string | null | no | yyyy-MM-dd it ended; open while it holds. |
bas_account | string | null | no | The 13xx account (finansiella anläggningstillgångar) the holding or claim is booked on, as a string. |
linked_company_id | string | null | no | The same company in Accounted, when it is in the caller's team. |
notes | string | null | no |
Response fields
| Name | Type |
|---|---|
group_link_id | string |
relation | "parent" | "subsidiary" | "associate" |
counterparty_name | string |
counterparty_org_number | string | null |
counterparty_registered_office | string | null |
party_id | string | null |
ownership_percent | number | null |
voting_percent | number | null |
valid_from | string | null |
valid_to | string | null |
bas_account | string | null |
linked_company_id | string | null |
notes | string | null |
Example request
{
"ownership_percent": 60
}
Example response
{
"data": {
"group_link_id": "3a77…",
"relation": "parent",
"counterparty_name": "Ägarbolaget AB",
"counterparty_org_number": "559000-0000",
"counterparty_registered_office": "Stockholm",
"party_id": null,
"ownership_percent": 60,
"voting_percent": 100,
"valid_from": "2024-01-01",
"valid_to": null,
"bas_account": null,
"linked_company_id": null,
"notes": null
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
PATCH /api/v1/companies/:companyId/securities/:id
securities.update · scope companies:write
Change a ställd säkerhet or an eventualförpliktelse, or release it with valid_to.
Send only the fields that change; null clears one. Dry-runnable.
Use when: A mortgage was raised, a borgen released, the book value of a pledged asset changed.
Don't use for: Removing history: a released security keeps its row with valid_to.
Pitfalls
- COMMITMENTS_UNAVAILABLE: Avtal och åtaganden is not switched on for this company yet.
- SECURITY_NOT_FOUND
Risk: low · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run | string | no | true (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits. |
stage | string | no | true stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
kind | "foretagsinteckning" | "fastighetsinteckning" | "aganderattsforbehall" | "belanad_fordran" | "other_security" | "borgen" | "other_contingency" | no | |
description | string | no | What is pledged or promised, e.g. Företagsinteckning i Handelsbanken för checkkredit. |
amount | number | no | SEK: the mortgage amount (pantbrev, företagsinteckning), the book value of the pledged asset or the amount of the guarantee. |
in_favour_of_name | string | null | no | Who the security or guarantee is given to. |
in_favour_of_party_id | string | null | no | That party in the company's parties (party_id), when known. |
for_group_company | boolean | no | Given for or to a group company (ÅRL 5 kap. 16 §): stated apart in the note. |
agreement_id | string | null | no | The loan agreement the security is for (agreement_id). |
valid_from | string | null | no | yyyy-MM-dd it was given. |
valid_to | string | null | no | yyyy-MM-dd it was released; open while it holds. |
document_id | string | null | no | The archived document (pantförskrivning, borgensförbindelse). |
notes | string | null | no |
Response fields
| Name | Type | Description |
|---|---|---|
security_id | string | |
kind | "foretagsinteckning" | "fastighetsinteckning" | "aganderattsforbehall" | "belanad_fordran" | "other_security" | "borgen" | "other_contingency" | |
pledged | boolean | true: a ställd säkerhet; false: an eventualförpliktelse. |
description | string | |
amount | number | |
in_favour_of_party_id | string | null | |
in_favour_of_name | string | null | |
for_group_company | boolean | |
agreement_id | string | null | |
valid_from | string | null | |
valid_to | string | null | |
document_id | string | null | |
notes | string | null |
Example request
{
"valid_to": "2026-06-30"
}
Example response
{
"data": {
"security_id": "91c0…",
"kind": "foretagsinteckning",
"pledged": true,
"description": "Företagsinteckning för checkkredit",
"amount": 500000,
"in_favour_of_party_id": null,
"in_favour_of_name": "Handelsbanken",
"for_group_company": false,
"agreement_id": null,
"valid_from": "2025-03-01",
"valid_to": "2026-06-30",
"document_id": null,
"notes": null
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}