Menu
Getting started
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
- Deadlines
- Skatteverket
- Peppol
- Webhooks
- Operations
- Pending operations
- Health
- API key
- Service accounts
Accrual schedules
Periodiseringar: re-plan the months of a schedule that are not yet posted, with a new period end and/or the day each month books on. Posted months stay as they are; the remainder is split equally.
Endpoints
POST/api/v1/companies/:companyId/accrual-schedules: Create a periodisering by hand for an amount on 17xx/29xx that no invoice line in Accounted carries, with monthly catch-up.POST/api/v1/companies/:companyId/accrual-schedules/:id/cancel: Undo a periodisering set up by hand: cancel its months not yet posted and storno the months it posted.POST/api/v1/companies/:companyId/accrual-schedules/:id/replan: Re-plan the months of a periodisering that are not yet posted: a new period end and/or the day each month books on.
POST /api/v1/companies/:companyId/accrual-schedules
accrual-schedules.create · scope bookkeeping:write
Create a periodisering by hand for an amount on 17xx/29xx that no invoice line in Accounted carries, with monthly catch-up.
Ny periodisering. Spreads amount_sek over calendar months with the same installments and catch-up as an invoice plan. For a deferral (förutbetald kostnad on 17xx, förutbetald intäkt on 29xx) amount_sek is what remains to dissolve: it may not exceed the balance left on balance_account (from its latest ingående balans on, after every month already dissolved, by Accounted, by hand or by an imported voucher from an earlier system) less the months not yet posted of other active plans on the account, nor what the origin verifikat or ingående balans put there. Start at the first month not yet dissolved. An upplupen kostnad (29xx) or intäkt (17xx) has no such limit. Months already begun post at approval; the rest post through the nightly accrual run. Dry-runnable: the dry run answers the months and available_sek and writes nothing.
Use when: A migration brought a running periodisering whose remaining months must keep dissolving, or a bank booking or the ingående balans put an annual insurance, licence or rent on 17xx/29xx without an invoice line in Accounted.
Don't use for: An invoice line in Accounted (periodisera on that line), changing an existing plan (replan it), or undoing one (cancel it).
Pitfalls
- For a migrated plan give the REMAINING amount and the first month not yet dissolved: the earlier system's dissolutions are already in the books, and booking a month twice is refused with 400 ACCRUAL_BALANCE_EXCEEDED (details.available_sek says what is left).
- Without origin_journal_entry_id a deferral comes from the ingående balans: 400 ACCRUAL_OPENING_BALANCE_MISSING when the account has none. A reversed origin is refused (ACCRUAL_ORIGIN_REVERSED).
- Give either months (1-120) or period_end. The amount is split in öre over every calendar month and sums exactly to amount_sek. target_account must be a resultatkonto, 3xxx-8xxx.
- Reversing the origin verifikat later cancels the plan and stornoes the months it posted.
Risk: medium · 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 |
|---|---|---|---|
direction | "expense" | "revenue" | yes | expense: a cost (förutbetald kostnad on 17xx, upplupen kostnad on 29xx); revenue: förutbetald intäkt on 29xx, upplupen intäkt on 17xx. |
amount_sek | number | yes | What remains to spread, in SEK: for a migrated or half-dissolved item, the balance left on the account, not the original amount. |
balance_account | string | yes | The interim account the amount sits on, 17xx or 29xx. |
target_account | string | yes | The resultatkonto each month dissolves to, 3xxx-8xxx. |
period_start | string | yes | The first month not yet dissolved, YYYY-MM-DD (any day of the month). |
months | number | no | Number of months, 1-120. Give this or period_end. |
period_end | string | no | The last month, YYYY-MM-DD. Give this or months. |
description | string | yes | |
dimensions | object | no | |
origin_journal_entry_id | string | no | The posted verifikat that put the amount on balance_account. Omit when it came with the ingående balans. |
Response fields
| Name | Type |
|---|---|
accrual_schedule_id | string |
source_kind | "manual" |
direction | "expense" | "revenue" |
balance_account | string |
target_account | string |
total_amount | number |
period_start | string |
period_end | string |
months | number |
origin_journal_entry_id | string | null |
posting_floor_date | string |
Example request
{
"direction": "expense",
"amount_sek": 6000,
"balance_account": "1790",
"target_account": "6570",
"period_start": "2026-07-01",
"months": 6,
"description": "Årsavgift bankpaket, resterande månader",
"origin_journal_entry_id": "5b1e…"
}
Example response
{
"data": {
"accrual_schedule_id": "7f3c…",
"source_kind": "manual",
"direction": "expense",
"balance_account": "1790",
"target_account": "6570",
"total_amount": 6000,
"period_start": "2026-07-01",
"period_end": "2026-12-31",
"months": 6,
"origin_journal_entry_id": "5b1e…",
"posting_floor_date": "2026-01-10"
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
POST /api/v1/companies/:companyId/accrual-schedules/:id/cancel
accrual-schedules.cancel · scope bookkeeping:write
Undo a periodisering set up by hand: cancel its months not yet posted and storno the months it posted.
Ångra periodisering. The months not yet posted are cancelled and every month the plan posted is stornoed (dated today when today lies in that month's fiscal year, else on the month's own date), so the whole amount is back on the balance account. Only a manual plan: an invoice's plan is cancelled by crediting the invoice. Dry-runnable: the dry run lists the months it would cancel and reverse.
Use when: A manual periodisering was set up wrong (amount, accounts, months), or the item it spreads no longer exists.
Don't use for: Booking the rest now (Lös upp nu), moving the end or the booking day (replan it), or an invoice's plan (credit the invoice).
Pitfalls
- A month whose storno fails (a locked or closed year) keeps the plan active with failed_reversals > 0 and a last_error on the month: unlock and cancel again.
- Reversing the origin verifikat runs the same undo on its own.
Risk: medium · 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. |
Response fields
| Name | Type |
|---|---|
accrual_schedule_id | string |
status | "cancelled" | "active" |
cancelled_months | number |
reversed_entries | number |
failed_reversals | number |
Example request
{}
Example response
{
"data": {
"accrual_schedule_id": "7f3c…",
"status": "cancelled",
"cancelled_months": 4,
"reversed_entries": 2,
"failed_reversals": 0
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}
POST /api/v1/companies/:companyId/accrual-schedules/:id/replan
accrual-schedules.replan · scope bookkeeping:write
Re-plan the months of a periodisering that are not yet posted: a new period end and/or the day each month books on.
Ändra periodisering. Posted months and their verifikat stay exactly as they are; what remains (total minus posted) is split equally over the calendar months of the new period that have no posted month, the same split a new schedule gets. release_day sets the day each month books on (1-31, clamped to the month end, so 31 is the last day; null is the first of the month). Months whose day has already come are booked at once. A deferral only (förutbetald kostnad 17xx, förutbetald intäkt 29xx): an upplupen kostnad is refused. Dry-runnable: the dry run answers the months before and after and writes nothing.
Use when: The service period of a periodiserad invoice line changed (a contract ends early or runs longer), or the months should book on the day the period starts, e.g. the 14th for a rent running 14th to 13th.
Don't use for: Changing months already posted (correct those verifikat, or credit the invoice), booking the whole remainder now (Lös upp nu), or an upplupen kostnad on 29xx.
Pitfalls
- period_end must be on or after the last posted month and leave at least one unposted month: 400 ACCRUAL_REPLAN_INVALID with details.reason otherwise.
- A schedule a credit is still settling (cancelled months) or that is not active cannot be re-planned.
- A month the posting run books between the dry run and the commit makes the commit answer 409 ACCRUAL_REPLAN_CONFLICT: re-read and retry.
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 |
|---|---|---|---|
period_end | string | no | New last day of the period, YYYY-MM-DD. Unchanged when omitted. |
release_day | number | null | no | Day of the month each month books on (1-31, 31 = last day), null for the first. Unchanged when omitted. |
Response fields
| Name | Type |
|---|---|
accrual_schedule_id | string |
period_start | string |
period_end_before | string |
period_end_after | string |
release_day_before | number | null |
release_day_after | number | null |
remaining_amount | number |
before | object[] |
after | object[] |
posted_now | number (optional) |
Example request
{
"period_end": "2027-06-30",
"release_day": 14
}
Example response
{
"data": {
"accrual_schedule_id": "7f3c…",
"period_start": "2026-07-01",
"period_end_before": "2026-12-31",
"period_end_after": "2027-06-30",
"release_day_before": null,
"release_day_after": 14,
"remaining_amount": 4000,
"before": [
{
"period_month": "2026-11-01",
"amount": 2000,
"booking_date": "2026-11-01"
}
],
"after": [
{
"period_month": "2026-11-01",
"amount": 500,
"booking_date": "2026-11-14"
}
],
"posted_now": 0
},
"meta": {
"request_id": "req_…",
"api_version": "2026-05-12"
}
}