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
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/: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/: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"
}
}