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
Changelog
Reverse-chronological release notes for the Accounted REST API. Versions follow Stripe's dated format (
YYYY-MM-DD). The current version is2026-05-12.
2026-05-12 (current)
The first stable release of the public REST API. Six phases of development covering the full agent-native surface: authentication + discovery, invoicing vertical, transactions vertical, bookkeeping engine + suppliers + compliance check, payroll + reports + import, webhooks.
Authentication + discovery (Phase 1)
- API key auth via
Authorization: Bearer gnubok_sk_<random>(live keys) /gnubok_sk_test_<random>(test keys). 100 RPM rate limit per key. gnubok_sk_test_*keys: same company as a live key, every write forced into dry-run (X-Gnubok-Mode: test). There is no separate sandbox company or host.- Scope-based authorisation per endpoint (
invoices:read,payroll:write,webhooks:manage, ...). - Discovery:
GET /llms.txt,GET /api/v1/openapi.json,GET /.well-known/skills/index.json. - Health:
GET /api/v1/health. - Response envelope:
{ data, meta: { request_id, api_version, audit, next_cursor } }. X-Request-Idon every response; idempotency on every write.
Invoices vertical (Phase 2)
- Customers: GET list + detail, POST create + bulk-create, PATCH, DELETE.
- Invoices: GET list + detail, POST create, PATCH, lifecycle verbs
/mark-sent,/mark-paid,/credit,/send,/bulk-create. PDF download at/{id}/pdf. - VIES validation runs on commit for EU-business customers with a VAT number.
- Mixed-rate invoices supported: per-item
vat_rateoverrides the header rate. - ROT/RUT-avdrag flow and supplier-invoice fakturamodellen on the AP side.
Transactions vertical (Phase 3)
- Transactions: cursor-paginated GET list + detail. Single-tx verbs
/categorize,/uncategorize,/match-invoice,/match-supplier-invoice. Bulk/ingest(up to 500),/batch-categorize(up to 100). - Reconciliation:
POST /reconciliation/bank/run,GET /reconciliation/bank/status. - Reads:
GET /accounts,GET /fiscal-periods. - All write surfaces honour strict-mode (commit fully or error with no side effects).
Errors: docs_url links the code's catalogue entry (2026-11)
- Fix:
docs_urlon every error response is the code's entry in the error catalogue (2026-11-19),https://docs.accounted.se/errors#<code>with the code in lowercase (PERIOD_LOCKEDis#period_locked). Before, it washttps://app.accounted.se/docs/api/errors/<CODE>, which forwarded to a page per code that does not exist (404). A stored link in the old form now forwards to the same entry.codeand every other field are unchanged. The API version date is unchanged.
Webshop orders: a booking links the bank row that paid it (2026-11)
- New:
transaction_idonPOST /webshop-orders/{orderId}/book(2026-11-19), optional: the bank row that paid the order (a Swish payment on the bank account, a Stripe charge on 1686) is linked to the verifikat once it is posted, in the same call or approval. Before anything is posted it is refused unless the row is the company's, unbooked, unlinked and not ignored (404 TX_CATEGORIZE_TX_NOT_FOUND,400 LINK_TX_TX_ALREADY_LINKED,409 BANK_ROW_IGNORED), its amount is the order total in its currency (409 WEBSHOP_ORDER_TRANSACTION_AMOUNT_MISMATCH), and the lines book exactly that amount on the row's own account (409 WEBSHOP_ORDER_TRANSACTION_ACCOUNT_MISMATCH). The dry run previews the row (transaction_date,transaction_amount,transaction_currency,transaction_description,bank_account). The answer hastransaction_link:linked: true, orlinked: falsewith the link'srefusal(and warningWEBSHOP_ORDER_TRANSACTION_NOT_LINKED) when the link is refused after posting; the booking stands then, and the row is linked withPOST /transactions/{id}/link-journal-entry. Withouttransaction_idnothing changes. Additive; the API version date is unchanged.
Bank file import: an unreadable Excel file says what to do (2026-11)
- Fix:
POST /imports/bankwith an Excel workbook that cannot be opened (2026-11-18: broken, password-protected) keeps its400 VALIDATION_ERRORwithdetails.fieldfile;messagenow says what to do and arecovery_hintis added (save the workbook again as .xlsx, or send the bank's CSV or camt.053 export). Before,messagewas the generic validation one and there was norecovery_hint. Additive; the API version date is unchanged.
Documents: a locked year is a refusal, not a server error (2026-11)
- Fix:
POST /documentswith ajournal_entry_idon a verifikat in a locked or closed fiscal year answers400 DOC_UPLOAD_PERIOD_LOCKED(2026-11-18) and stores nothing;messagesays why andrecovery_hintnames the way forward (unlock or reopen the year, or upload withoutjournal_entry_id). Before, it answered500 DOC_UPLOAD_STORAGE_FAILEDwith no reason.POST /documents/{id}/linkkeeps its documented400 PERIOD_LOCKEDfor the same case and now gives the same message andrecovery_hint. Additive; the API version date is unchanged. - Fix:
POST /transactions/{id}/attach-documentrefused with400 PERIOD_LOCKEDbecause the verifikat is in a locked or closed fiscal year (2026-11-18) gives that samemessage,message_enandrecovery_hint. Before, they were the generalPERIOD_LOCKEDones (change the entry date), and the document sentence sat only indetails.reason, where it stays. An attach staged by an agent and refused for this at approval keeps the document sentence as its error and hasmessage_enandremediationin the result'sdata. Additive; the API version date is unchanged. - Behaviour change:
POST /transactions/{id}/attach-documentwithdry_run=trueanswers400 PERIOD_LOCKED(2026-11-19), with the samemessage,message_enandrecovery_hint, when the verifikat the document would join is in a locked or closed fiscal year; an agent can no longer stage such an attach. Before, the dry run previewed it and only the write refused. Fix:POST /pending-operations/{id}/approverefused this way answers the refusal's ownmessage,message_enandrecovery_hint, not the generalPERIOD_LOCKEDones;details.datais unchanged. The API version date is unchanged.
Documents: an arrival's original takes its token in a header (2026-11)
- Behaviour change:
original_urlonGET /documents/{id}?include=arrivalscarries no token (2026-11-17). Each arrival answersoriginal_url_headersbeside it: send those headers with the GET (Authorization: Bearer <signed token>). Without them the URL answers400 STORAGE_PROXY_TOKEN_REQUIRED, and a request withtokenin its query string answers400 STORAGE_PROXY_TOKEN_IN_URL: no credential rides in a URL this API serves.original_url_headersis an empty object when the URL needs none, so it can always be passed along as it came.
Dry-run: refused where it cannot preview (2026-11)
- Behaviour change:
dry_run=trueon a write without dry-run support answers400 VALIDATION_ERROR(2026-11-16), withdetails.fielddry_run, and runs nothing. Before, 28 of the 31 writes withoutx-dry-run-supportedignored the flag (or theX-Dry-Runheader) and ran for real while the caller believed it previewed: period lock, close, year-end, opening balances and currency revaluation, match-invoice and match-supplier-invoice, generate-agi, SIE and bank imports, approving, rejecting or withdrawing a pending operation, the webhook delete, test, verify and rotate-secret verbs, a webhook delivery retry and the service-account writes. Document upload, inbox delivery and bank sync already refused it. Writes withx-dry-run-supported: truepreview as before, and a request without the flag is unchanged. A test key is still answered403 TEST_KEY_WRITE_BLOCKEDon these endpoints.
Deadlines (2026-11)
- New:
GET /deadlinesandPOST /deadlines/{id}/complete(2026-11-16). The company's deadlines (the tax and filing deadlines generated from its tax settings and the ones added by hand) are listed over REST, open ones by default, each withdeadline_id,due_date,overdueanddays_until_due(scopereports:read). The second endpoint ticks one off, or puts it back withis_completed: false(scopebookkeeping:write; dry-runnable, and stageable with?stage=true). Only the tick changes: nothing is booked or filed. A moms period filed outside Accounted is still recorded withPOST /reports/vat-declaration/filings, which completes its deadline with the filing date. Both were MCP tools only before. Additive.
Typed handles (2026-10)
- New:
handlenext to the id (2026-10-16). The resources a response returns carry a typed handle beside their id,<prefix>_<the UUID as 32 lowercase hex>(jejournal entry,invcustomer invoice,sinvsupplier invoice,txnbank transaction,docdocument,poppending operation, and more: see Ids and typed handles on the API overview). It is the same id spelled with its type. Covered: the journal entry, invoice, supplier invoice, transaction, document, pending operation (the?stage=true202 included), customer, supplier, company, fiscal period, employee, salary run, webhook, asset, article, dimension, inbox item, expense claim, cash account, payment order, supplier payment batch and async operation endpoints that return those resources; the spec showshandlewith its pattern wherever it is added. Existing fields and their values are unchanged. Additive; the API version date is unchanged. - New: send a handle wherever the id goes (2026-10-16). Path ids and body or query fields named for a resource (
journal_entry_id,credited_invoice_id,invoice_ids,period_id, ...) accept the handle or the plain UUID; plain UUIDs keep working everywhere. A handle of the wrong type answers400 HANDLE_TYPE_MISMATCH(new code) withdetails.issues[]naming the field, theexpected_prefixand thereceived_prefix, before anything is read. A retry that spells an id as a handle instead of the UUID is the same request toIdempotency-Key. The MCP tools accept handles in their id arguments the same way. - New: four more prefixes (2026-10-16):
audaudit log entry (GET /audit-trail),rsoreconciliation sign-off (the account status, the sign-off history, sign-off and reopen;.../signoff/{signoffId}/reopentakes the handle in the path),vgapvoucher gap explanation (POST /voucher-gap-explanations) andteamteam, byrå or personal (data.teamonGET /portfolio/overview;team_idonPOST /companiestakes the handle). Additive. - Reserved:
bevbusiness event (2026-10-16): the prefix of a business event, the record of what a posting meant in business terms. No endpoint returns or accepts one yet; abusiness_event_idfield will take the handle when one does. Additive.
Capabilities (2026-10)
- New:
GET /companies/{companyId}/capabilities(2026-10-15): which building blocks (the modules behind the OpenAPI tags) the company can use, each withstatus,reasonsand aresolutionsentence, like Stripe account capabilities.activeis usable now;needs_planmeans the paid plan does not include it (on a self-hosted instance, a connector key does);offmeans it is turned off for this company;unsupportedmeans it is not offered for this company, because of its country or its legal form (payroll for an enskild firma that has not said it pays salaries).dependency_unavailablemarks a module that needs a module which is unsupported or off, and takes that status. The kernels (platform,ledger) are always active. Read-only: it reports the gates that exist today, and the per-company module switch arrives later. The response also carries the company'sjurisdiction(SE) andledger_currency(SEK). Additive; the API version date is unchanged.
Retries: Idempotency-Key (2026-10)
POST /api/v1/companieshonoursIdempotency-Key(2026-10-15). With the header, a retry with the same key and body returns the company the first call created (200,Idempotent-Replayed: true), never a second company; the same key with another body answers409 IDEMPOTENCY_KEY_REUSE. The header stays optional so existing callers keep working; without it a retry after a network failure still creates a second company, so send one. Before, the header was ignored on this route. A dry run is never cached, so the real create may reuse the preview's key. The API version date is unchanged.- Behaviour change: a repeat that overlaps the first request with the same
Idempotency-Keyanswers409 IDEMPOTENCY_KEY_IN_PROGRESS(2026-10-15). The key is now claimed before the write runs, so two requests with one key never both run: the one that arrives while the first is still running gets409withRetry-Afterand changes nothing, and resending it after the first has finished replays that answer (Idempotent-Replayed: true). Before, both could run, which on a write that posts a verifikat meant two verifikat. A failed request (5xx, 429) still caches nothing and gives the key back; a request killed before it answered frees its key after 15 minutes. Sequential retries behave as before. MCP tools that write directly and takeidempotency_keyanswer an overlapping repeat with the same code. The API version date is unchanged. POST /webhook-deliveries/{id}/retryhonoursIdempotency-Key(2026-10-15): a repeat with the same key answers the first call'swebhook_delivery_idinstead of queueing another delivery. The header stays optional. Before, it was ignored on this route.x-idempotentcorrected (2026-10-15) on eight writes whose retry behaviour it misstated:DELETE /assets/{id},DELETE /invoices/{id},POST /reconciliation/accounts/{accountKey}/links,/residualand/signoff,POST /webhooks/{id}/rotate-secret(each requiresIdempotency-Key),POST /bank-connections/{connectionId}/sync(lease and dedupe) andPOST /webhooks/{id}/verify(already-verified short circuit) now saytrue. Requests and responses are unchanged.
Transactions: ingest (2026-10)
- Behaviour change: the
POST /transactions/ingestdry-run predicts the commit row by row (2026-10-11). It runs the same dedup decision as the commit, so it now also reports a row that matches a stored unbooked transaction from an import feed (skip_reason: "content_match_unbooked", a new value next toexternal_id_matchandcontent_match_booked). It used to read booked rows only and answerwould_skip: falsefor a row the commit then skipped. Every item also carriesmatched_external_idandmatched_transaction_id, and the preview addswould_skip_by_reason. - The commit names every skipped row (2026-10-11): the response adds
skipped(external_id,reason,matched_external_id,matched_transaction_id, in request order) andduplicates_by_reason.duplicatesis unchanged and equals the length ofskipped. Theimport.bankoperation result addstransactions_duplicates_by_reason. - New:
stable_external_ids(2026-10-11). Set it totruewhen everyexternal_idis the bank's own per-booking reference (the same booking always arrives under the same id, a different id is a different booking). A stored transaction from the sameimport_sourceunder another id is then never treated as a copy of an incoming row, so identical movements on one day (several identical fees, each with its own reference) are all imported whenever they arrive. Rows from another channel (a bank file, another feed) still dedup on content. Requires the sameimport_sourceon every row. Without it nothing changes: a row identical to a stored one is skipped, and now listed inskipped.
Collections over REST (2026-10)
- New: collections endpoints (2026-10-22), under
/api/v1/companies/{companyId}:GET /collections/candidates(overdue invoices that could be handed over, with the checks each fails),GETandPOST /invoices/{id}/collection(read the invoice's case, hand the invoice over),POST /invoices/{id}/collection/actions(pause, resume, withdraw, dispute, or answer what the provider waits for),GET /collections/settlements(what the provider collected and paid out) and the bookingsPOST /collections/payments/{paymentId}/bookandPOST /collections/settlements/{settlementId}/book. The same operations as the MCP collections tools, the same scopes. Additive. - New:
400 STAGE_REQUIRED(2026-10-22): the handover and the escalating case actions (approve_step, contest_dispute, confirm_not_paid, approve_legal_action) are approved only by a person in Accounted, so over REST they are sent with?stage=true; a direct call answersSTAGE_REQUIREDand does nothing. Their dry runs work as usual.
Approvals over REST: pending operations and stage mode (2026-10)
- New: the approval door for staged writes (2026-10-15).
GET /pending-operations(cursor-paginated,statusdefaultpending,allfor every status),GET /pending-operations/{id},POST /pending-operations/{id}/approveandPOST /pending-operations/{id}/reject, under/api/v1/companies/{companyId}. Scopespending_operations:readandpending_operations:approve, as on MCP. Approve commits now and answers the committed operation; a high-risk one needs{"confirmed": true}; approving twice never commits twice (the second answers409 PENDING_OPERATION_NOT_PENDING). Both POSTs requireIdempotency-Key. Additive. - New:
task_stateon every pending operation (2026-10-15): the status in the MCP Tasks / A2A vocabulary,working(pending, committing),completed(committed),failed(the approved commit did not go through),cancelled(rejected, expired or superseded), beside the unchangedstatus. The MCP toolgnubok_list_pending_operationscarries it too. - New:
operation_numberon every pending operation (2026-11-17): the proposal's number in its company, counting up in the order proposals are staged, set when it is staged and never changed. It is what a person sees in Accounted as "Förslag 128", so it is the way to name a proposal to a person; requests still takepending_operation_id.nullon a proposal decided before numbers were introduced. The staged answers andgnubok_list_pending_operationsover MCP carry it too. Additive. - New: the key that staged a pending operation can withdraw it (2026-11-12).
POST /pending-operations/{id}/withdrawtakes back a proposal the calling key staged itself while it still waits for approval (a duplicate, a wrong amount): it leaves the approval queue and answers the operation withstatusrejected,task_statecancelled,rejection_categorysupersededandresult.withdrawntrue. No particular scope and neverpending_operations:approve: the key must be the stager. Another stager's operation answers403, one no longer pending409 PENDING_OPERATION_NOT_PENDING; repeating the call answers the same operation. Optionalreason,Idempotency-Keyrequired. The MCP tool isgnubok_withdraw_pending_operation. Additive. - New:
?stage=trueon the writes agents stage over MCP (2026-10-15,x-stage-supportedin the spec): the write is staged for approval instead of committed and answers202with the pending operation.stage=trueon any other endpoint answers400 STAGE_NOT_SUPPORTED, and a value other thantrueorfalseis400. Before, the parameter was ignored, so a write sent with it committed. The API version date is unchanged. - New: pinned previews (2026-10-15,
x-preview-token-supportedin the spec). The dry run of every operation write also answersdata.preview_token. Send it back in thePreview-Tokenheader on the commit (or on?stage=true) and the commit books exactly the previewed result, or answers409 PREVIEW_STALEwith the fresh preview and its token inerror.detailsand writes nothing. The header on an endpoint without the flag, or a malformed value, is400. Without the header nothing changes; additive. Over MCP the generated write tools take the same token aspreview_tokenwhen staging.
Document signing with BankID (2026-10)
- New: signing requests (2026-10-25).
POST /signing-requestssends an archived PDF for BankID signing: one link per signer to a page where they read the document and sign with their own BankID, mailed when they have an address (signers[].urlis answered only for a signer no mail reached; the URL is the credential). The document is frozen by its SHA-256, which every signature carries.GET /signing-requestsandGET /signing-requests/{id}show every signer's status and, once completed,signed_document_id(the PDF with a Signeringsbevis page) andevidence_document_id(Bevispaket.zip: the original, each BankID signature and OCSP response, a manifest), both archive documents.POST /signing-requests/{id}/signers/{signerId}/remindmails a pending signer again with a new link (once a day at most);POST /signing-requests/{id}/cancelstops an open request. Scopesdocuments:readanddocuments:write. No endpoint signs: each signer signs in person. A personnummer cannot be sent; locking a signer to one person is done in the app. MCP:gnubok_request_signatureandgnubok_remind_signerstage,gnubok_list_signing_requestsandgnubok_get_signing_requestread. - New: the board signs the årsredovisning with BankID (2026-10-25).
POST /fiscal-periods/{id}/arsredovisning/versions/{versionId}/signing-requestsends a locked version to its signers, one per pending slot; each BankID signature fills its slot and the last one makes the version signed. The signer's BankID name must match the slot's name (SIGNING_NAME_MISMATCH), and a version is signed one way:ARSREDOVISNING_SIGNING_TRACK_MIXEDwhen a slot already has a signature recorded by hand. MCP:gnubok_request_arsredovisning_signaturesstages. - Changed:
signing_method: "bankid"cannot be recorded by hand (2026-10-25).PATCH /fiscal-periods/{id}/arsredovisning/signatures/{signatureId}answers422 SIGNING_METHOD_RESERVEDfor it:bankidnow means a signature made with BankID in Accounted, with the signature behind it. A BankID signature made in another service isadvanced_e_signature. A slot covered by a BankID signing request takes no evidence by hand (409 ARSREDOVISNING_SIGNING_TRACK_MIXED). - New: the revisor in the årsredovisning's signer roster (2026-10-27).
POST /fiscal-periods/{id}/arsredovisning/signaturestakes the rolesAuktoriserad revisor,Godkänd revisorandHuvudansvarig revisor: that slot holds the revisorspåteckning (ABL 9 kap. 28 §), recorded by hand withPATCH .../signatures/{signatureId}once the revisionsberättelse is given and the whole board has signed, in the board's medium:advanced_e_signatureon a version the board signed electronically (BankID included; the board's signing request covers the board's slots only),paper_originalon a paper original. The compliance profile takesauditor_firm_name(the elected revisionsbolag) andauditor_opinion(what the revisionsberättelse says); both are frozen on the revisor's slot as it is signed, so a signed or filed version keeps the påteckning it was given. A revisor role cannot sign the fastställelseintyg. Additive; the API version date is unchanged. - New webhooks (2026-10-25):
signing.signer_signed,signing.declinedandsigning.completed. Payloads carry ids, positions and times, never names, addresses or personnummer. Additive; the API version date is unchanged. - Changed: signing is part of the paid plan (2026-10-26).
POST /signing-requestsand the årsredovisningsigning-requestanswer403 SIGNING_CAPABILITY_BLOCKEDfor a company with neither a paid plan nor a trial;SIGNING_UNAVAILABLEnow means signing is not switched on for that company. Reading, reminding and cancelling a request already sent are unchanged, and every signer with an email now gets the signed PDF when the last one signs.
Inbox, transactions and documents (2026-10)
- New:
pending_operation_idonGET /transactionsrows (2026-11-12). The open proposal (a staged categorize or bulk booking, awaiting approval) that already holds the bank row;nullwhen none does. Approve or reject that proposal: staging the row again answersTRANSACTION_ALREADY_STAGED. A page filtered withstatus=bookedalways answersnull. Additive. - Behaviour change: the booking endpoints refuse a transaction a posted verifikat was booked from but never linked to (#203, 2026-11-09). When a verifikat was posted from the transaction (
source_typebank_transactionwith the transaction assource_id) but the write that links the two never landed,POST /transactions/{id}/categorize,/batch-categorize,/match-invoice,/match-supplier-invoice,/match-batchandPOST /transactions/bulk-book(a new samlingsverifikat) answer the code they answer for any booked transaction, withdetails.vianamedanddetails.journal_entry_idnaming the verifikat (its correction, when the verifikat was corrected);/match-expense-payoutrefuses it with its own code. Link the two when that verifikat is the transaction's booking (POST /transactions/{id}/link-journal-entry), or reverse it and book again. Before, the transaction read as unbooked and got a second verifikat, so the bank movement was booked twice. A reversed verifikat names nothing, so a storno still opens the transaction. - Behaviour change:
GET /inbox-itemsreads one definition of an open item (2026-11-01).processedis true, andunprocessed_only=trueleaves the item out, also when Arkiv took it or when a verifikat holds its document, stamp or not. A document on a reversed verifikat is not held: its item is open again. A page ofunprocessed_only=truecan run short with anext_cursorto go on from. Same answer asgnubok_list_inbox_items, the Inkorg and the counts. - Behaviour change:
POST /inbox-items/{id}/convertrefuses a second booking of the purchase (2026-11-01). Where registering posts a verifikat, an item a live verifikat books already, by its stamp or because that verifikat holds its document, answers409 INBOX_ITEM_ALREADY_BOOKEDwithdetails.journal_entry_id, and nothing is registered. Registering with no verifikat (kontantmetoden, a company that defers booking) is unchanged. The same document on a live verifikat now also stopsPOST /expense-claimsand the Inkorg's direct booking. The supplier card takes the document's bank details once the invoice exists, no longer before a refusal. - New:
POST /inbox-items, the partner door into the Inkorg (2026-10-15, scopedocuments:write). A partner delivering documents on a company's behalf (a digital mailbox, a scanning service) sends one PDF or image per call asmultipart/form-data, with optionalkind_hint(supplier_invoice|receipt),external_ref(your id, 1-200 chars),sender_name,sender_org_number,subject,messageandreceived_at. It takes the path of a person's upload: archived, deduplicated on content, read by extraction, and filed among the Inkorg's open items for a person or a granted agent to book. It books nothing.201answersinbox_item_id,document_id,deduplicatedandarrival_id; a repeatedexternal_ref(or a file already in the Inkorg) answers200with the existing item anddeduplicated: true, and the sameexternal_refwith another file answers409 INBOX_DELIVERY_REF_CONFLICT.Idempotency-Keyis required. A mailbox partner that today callsPOST /supplier-invoices(which registers and books on arrival) should deliver here instead. - Behaviour change:
POST /transactions/{id}/match-batchrefuses a transaction in a foreign currency (2026-11-01), with400 BATCH_FOREIGN_CURRENCY(details.currency), the dry run included, asPOST /transactions/bulk-bookdoes. Before, the transaction's foreign figure was booked as kronor on both legs: 1 000 EUR became Dr 1932 1 000 / Cr 1510 1 000 on an invoice worth 11 300 kr, and the entry balanced. Match such a transaction to one invoice at a time (match-invoice,match-supplier-invoice). A SEK transaction against foreign invoices works as before; the dry run now also answers the400 BATCH_FX_DEVIATION_TOO_LARGEthe commit would. The API version date is unchanged. - Behaviour change:
POST /transactions/{id}/match-supplier-invoicereads a row in another currency against the remaining balance (2026-11-01), at Riksbanken's rate on the payment date, the invoice's own rate when there is none. Short by more than 2 % it is a part payment:statuspartially_paid, 2440 cleared by that part and the kursdifferens booked on it. Above the balance by more than 10 % it answers400 MATCH_SI_AMOUNT_EXCEEDS_REMAINING. Anything between settles the balance, the difference on 3960/7960, as before: a card rate runs a few percent over the mid rate. Under kontantmetoden a part payment of a never-booked invoice answers400 MATCH_SI_CASH_FX_UNSUPPORTED. Before, any amount settled the whole balance: half a payment closed the debt and booked the rest as a gain, and under kontantmetoden booked the whole invoice at half its value. With neither rate the match answers400 SI_FX_RATE_MISSING. The API version date is unchanged. - A full settlement of a foreign invoice clears what the ledger carries (2026-11-01).
match-invoice,match-supplier-invoice,match-batchandPOST /invoices/{id}/mark-paidclear what the invoice's own vouchers left on 1510 or 2440, not the balance at the rate, so a paid invoice leaves no öre on the account, and the difference to the kronor that moved lands on 3960/7960. Onmark-paid,exchange_rate_differencestays measured from the booked rate: the bank takes that figure plus the difference and the gap to the ledger is the FX line, and customlinesthat clear what 1510 carries pay the whole remainder. When the vouchers cannot say (a verifikat shared with another invoice, none linked) the rate clears, as before. Foreign amounts round one way everywhere: on the written decimals, half away from zero, the sign outside the amount, so*_sekof a credit note is minus the invoice's and a preview shows the öre the commit books. The API version date is unchanged. - Behaviour change:
POST /transactions/{id}/match-invoicerefuses a transaction that is already booked or ignored (#58, 2026-11-01). When the transaction's pointer or abank_linevoucher link names a posted verifikat, or it is linked to an existing verifikat, the match answers409 MATCH_INVOICE_TX_ALREADY_BOOKEDand writes nothing;detailsnames the verifikat (journal_entry_id,voucher,via:pointer,link,reconciliation, orconcurrentwhen another booking took the transaction first) and says inundohow the transaction opens again:uncategorize(POST /transactions/{id}/uncategorize),unlink(the reconciliation unlink: the verifikat stays posted) orreverse_voucher(a storno of the verifikat, which releases every transaction on it). An ignored transaction answers409 BANK_ROW_IGNORED. Before, a categorized transaction had its verifikat reversed without being asked, a transaction linked to an existing verifikat kept that verifikat posted beside the payment, and one booked only through voucher links got a second verifikat, so the bank account was debited twice; an ignored transaction answered 500 with the payment already posted and the invoice paid. Nothing else about a successful match changes. On the way: an invoice with an active credit note answersMATCH_INVOICE_CREDIT_NOTE, a pointer at a verifikat no longer posted books instead of answeringCANNOT_REVERSE_NON_POSTED, and a match that stops after the payment verifikat posted cancels it and undoes its own writes.POST /transactions/{id}/match-batchandPOST /transactions/bulk-bookrefuse the same rows, the dry run included.POST /reconciliation/accounts/{accountKey}/linksandPOST /transactions/{id}/link-journal-entryrefuse a verifikat that is an opening balance or a storno (ENTRY_NOT_OPEN,LINK_TX_JE_NOT_BANK_MOVEMENT). The API version date is unchanged. A failed read of the transaction answers503 BANK_ROW_READ_FAILEDon this door and onmatch-supplier-invoice, not the booked refusal: nothing was booked, so retry. - Behaviour change:
POST /transactions/{id}/match-supplier-invoicerefuses a transaction that is already booked (#58, 2026-10-28). When the transaction's pointer or abank_linevoucher link names a posted verifikat (its own categorization, a bulk-book samlingsverifikat, a split, an earlier batch match) or it is linked to an existing verifikat, the match answers409 MATCH_SI_TX_ALREADY_BOOKEDand writes nothing;detailsnames the verifikat (journal_entry_id,voucher,via:pointer,link,reconciliation, orconcurrentwhen another booking took the transaction first) and says instorno_allowedwhether it is the transaction's own categorization. Only then may the request be resent with the new body fieldstorno_existing: true, which reverses that verifikat (storno) after every other check has passed and books the payment. Before, a categorized transaction had its verifikat reversed without being asked, a transaction linked to an existing verifikat was re-pointed to the payment, and one booked only through voucher links got a second verifikat, so the bank account was credited twice. The endpoint now books through the dashboard match's own code, so a failure to create the payment verifikat answersMATCH_SI_JE_FAILED(wasMATCH_SI_RECORD_PAYMENT_FAILED), and a match that stops after the verifikat posted (a concurrent booking of the transaction or settlement of the invoice, a payment row that cannot be recorded) cancels it and undoes its own writes instead of leaving it posted. The API version date is unchanged. - Behaviour change: categorize, batch-categorize and bulk-book also refuse a row a samlingsverifikat already holds (issue #101, 2026-10-26). When a posted verifikat entered outside the feed (
source_typemanual, orimporton a payment provider's account such as 1686) books the transaction's settlement account in its direction, is dated the transaction's day (bank accounts 1910-1949) or between that day and the end of the next month (other accounts), and still has at least the transaction's amount that no transaction is linked to, the booking answers409 TRANSACTION_BOOK_POSSIBLE_DUPLICATEwith that verifikat indetails.candidateand the newdetails.candidate.covering(booked,held,unlinked, kronor). Link the transaction to it (POST /transactions/{id}/link-journal-entry) or ignore it; book it anyway only when it is not part of that verifikat, withforce: trueandexpected_duplicate_journal_entry_id, as for the other candidates. Before, such a row booked a second verifikat for a sale the samlingsverifikat already held. Non-SEK rows and rows without a cash account are not checked. No field was removed, and the API version date is unchanged. - Behaviour change:
POST /documentsrefuses a dry run (2026-10-15). The endpoint is not dry-runnable, but a live key sending?dry_run=trueorX-Dry-Run: truehad its file archived for real (the archive is WORM, so it could not be taken back) while it believed it previewed. It now answers400 VALIDATION_ERROR(details.field: "dry_run") and stores nothing. Test keys are refused as before. - Fix:
503 EXTENSION_DISABLEDnames no feature it is not about (2026-10-15). Its message said the Skatteverket integration was off, also when bank sync or the Inkorg was. It now reads "This feature is not enabled on this installation." (sv "Funktionen är inte aktiverad i den här installationen."), anddetails.extensionnames the feature (enable-banking,invoice-inbox,skatteverket). The code and status are unchanged. - Fix: a resent multipart upload replays under its
Idempotency-Key(2026-10-15). The key's request hash covered the raw multipart text, and every client encodes a fresh boundary per request, so a resend ofPOST /documentswith the same key and file answered409 IDEMPOTENCY_KEY_REUSEinstead of the first answer. Multipart bodies are now compared by their parts (each text value, and each file's name, type, size and SHA-256). JSON bodies are compared as before. - Behaviour change: reverse charge on
POST /inbox-items/{id}/convert(2026-10-13): the convert applies the reverse-charge rules ofPOST /supplier-invoices.reverse_charge: truenow setsvat_treatmenttoreverse_charge, registers the net as the payable (total,remaining_amount) and refuses a line with avat_rateother than 0 with400 VALIDATION_ERROR(details.fieldnames the line). An EU or non-EU supplier withoutreverse_chargedefaults to reverse charge, as onPOST /supplier-invoices; sendreverse_charge: falsefor a foreign supplier that charged its own or no VAT. Before, the convert keptvat_treatmentatstandard_25, priced an omitted line rate at 25 % and registered net plus VAT as the payable while the registration verifikat credited 2440 with the net, so the invoice could never settle cleanly. Invoices already registered are not touched; the API version date is unchanged. - Behaviour change:
GET /transactions?status=booked|unbookedfollows every anchor to a verifikat (2026-10-13):status=unbookedis now the work queue, the rows the period-lock guard, the VAT close check and the MCP list count: not ignored, not triaged as private (is_businessfalse), and anchored to no verifikat.status=bookedis every row anchored to a verifikat: thejournal_entry_idpointer, a bulk booking or split (one verifikat for several rows, or one row over several verifikat) and a batch allocation against invoices, which keepjournal_entry_idnull. Before, both readjournal_entry_idalone, so an ignored row and a bulk-booked or allocation-settled row were listed as unbooked and missing fromstatus=booked; an integration that booked the unbooked list could book them again. Withoutstatusevery row is listed, as before. The API version date is unchanged. - Behaviour change:
POST /documents/{id}/linkruns the same link rules as the app and the MCP tools (2026-10-13): a document already linked to another verifikat answers409 DOC_LINK_ALREADY_LINKEDwhatever that verifikat's status (posted, draft or reversed), withdetails.current_journal_entry_idanddetails.current_journal_entry_status, and so does a change of a line already set; the dry run refuses the same, and refuses a verifikat in a closed or locked period withPERIOD_LOCKED. Before, only a posted holder was refused, as409 CONFLICT, and a draft or reversed holder or a locked period passed the dry run and then failed live. The invoice-inbox item that carries the document is now marked handled whether or notinbox_item_idis sent, and aninbox_item_idthat does not carry the document is no longer stamped (it used to stamp any inbox item of the company). Ajournal_entry_line_idthat is not a line ofjournal_entry_idis404 NOT_FOUND, as before. The API version date is unchanged.
Transactions: revenue accounts of a bank row (2026-11)
- New:
confirm_foreign_seller_vaton categorize (crm#1765, 2026-11-12).POST /transactions/{id}/categorizeand/batch-categorizerefusevat_treatment: "reverse_charge"with400 TX_CATEGORIZE_REVERSE_CHARGE_SELLER_VATwhen the row's underlag shows VAT from the seller.confirm_foreign_seller_vat: truestates that the VAT is another country's VAT the seller charged in error: the purchase is then booked as reverse charge on the whole amount paid (the foreign VAT is part of the cost and of the basis in ruta 20, 21 or 22, and is never deducted). An underlag that names a Swedish seller is refused all the same (details.reason: "seller_vat_swedish"); without the flagdetails.reasonisnot_confirmedanddetails.confirm_withnames it. Additive: a request without the flag is refused as before. - Behaviour change: a sale on a category books the revenue account an invoice books (2026-11-01).
POST /transactions/{id}/categorizeand/batch-categorize:income_productsatexportorreverse_chargebooks 3105 or 3108, the goods accounts in ruta 36 and 35, where it booked the services accounts 3305 and 3308. An exempt sale of an enskild firma or ideell förening books 3100, where it booked 3004: same ruta and NE line.income_otherstays on 3999.
Transactions: hard blocks (2026-10)
- Behaviour change: a booking a hard block matches is booked only by a person, from its review (#130, 2026-10-30). An owner or admin adds hard blocks in the app (Regler, Spärrar): accounts, a counterparty, an amount from in SEK and a VAT treatment, any mix; a booking of a bank row matches when every criterion the block sets holds. A key never books such a booking directly:
POST /transactions/{id}/categorizestages it for a person and answers202with the pending operation (staged_because: BOOKING_REVIEW_REQUIRED), or refuses it with409 BOOKING_REVIEW_REQUIREDwhen it names a template by id;batch-categorizeskips the matched items with that code;bulk-bookrefuses a samlingsverifikat with a matched row (409 BOOKING_REVIEW_BULK_REFUSED,details.transaction_ids), also for a person, who books such a row on its own. The MCP categorize tool stages as always.POST /pending-operations/{id}/approverefuses a matched booking from a key withBOOKING_REVIEW_WEB_ONLYand leaves it pending; rules for automatic booking do not apply to it. Blocks are set and archived in the app only. Storno, rättelse and imports are never matched. A company without blocks books as before. - Behaviour change: hard blocks also hold supplier invoices and Inkorg documents (#145, 2026-10-31). A supplier invoice's registration verifikat, the verifikat a kontantmetoden payment books the purchase with, and an Inkorg document booked without a bank row are judged like a bank row: the supplier (or the document's seller) is the counterparty and the invoice total in SEK the amount. A key never posts such a booking:
POST /supplier-invoices,POST /inbox-items/{id}/convert,POST /supplier-invoices/{id}/book,POST /supplier-invoices/{id}/mark-paidandPOST /transactions/{id}/match-supplier-invoice(kontantmetoden) answer409 BOOKING_REVIEW_REQUIREDand book nothing (a refused registration has drawn its ankomstnummer, as any refusal of the engine does); a person registers it in the app. A bank payment order's own debit no longer settles an unbooked (kontantmetoden or deferred) invoice a block may hold: it stays a suggestion for a person.POST /pending-operations/{id}/approverefuses a matchedcreate_supplier_invoice_from_inboxwithBOOKING_REVIEW_WEB_ONLYand leaves it pending, rules for automatic booking do not apply to it, and any approval the database refuses for a block now leaves the operation pending instead of rejected. Payments of registered invoices, credit notes, customer invoices and utlägg are not judged.
Supplier invoices: förattest and substitutes (2026-11)
- New: förattest per project before the attest, and substitutes (#192, 2026-11-08).
PUT /supplier-invoices/attest-policytakespre_attesters(user ids; one of them approves first an invoice, or a line, without a project of its own) andproject_attesters([{ project, attesters }], a dimension 6 code and its förattestants; it replaces every project's), both optional: left out, they stay as they are. With either set, every project on an invoice's lines needs one approval by its förattestants before the attesters may attest; one person approves an invoice once, so a förattestant never also attests it, and no limit applies to a förattest.POST /supplier-invoices/attest-substitutes({ user_id, substitute_user_id, starts_on, ends_on }) names a substitute who, while the period runs, attests wherever the attester may, as them (their step, their limit);DELETE /supplier-invoices/attest-substitutes/{id}removes one.GET /supplier-invoices/attest-policyanswerspre_attesters,project_attestersandsubstitutes.GET /supplier-invoices/{id}/attestationsaddsstage(pre/final),pre_attest, eachremainingperson'sstands_in_for, each decision'sstageandon_behalf_of, andviewer.acts_for. New refusals:403 ATTEST_NOT_ALLOWEDwithdetails.reasonother_stepon approve,400 ATTEST_PROJECT_NOT_FOUNDon the policy,400 ATTEST_SUBSTITUTE_NOT_MEMBER,409 ATTEST_SUBSTITUTE_NO_POLICYand404 ATTEST_SUBSTITUTE_NOT_FOUND. A company that names none of it attests as before. Additive; the API version date is unchanged.
Supplier invoices: attest levels (2026-10)
- New: attest limits per person and two attesters from an amount (#135, 2026-10-30).
PUT /supplier-invoices/attest-policytakestwo_step_from_sek(from that SEK total two different attesters must approve;null= one is enough) andlimits([{ user_id, max_amount_sek }], the highest SEK total each attester's approval covers;null= no limit; it replaces every limit). Both are optional: left out, they stay as they are.GETanswers them, each attester withlimit_sek. With the policy on, below the two-step amount one approval by an attester whose limit covers the invoice attests it; at or above it two different attesters must approve, at least one with a covering limit, in any order. New refusals:400 ATTEST_POLICY_TWO_STEP_NEEDS_TWOand400 ATTEST_LIMIT_NOT_ATTESTERon the policy, and403 ATTEST_LIMIT_EXCEEDEDonPOST /supplier-invoices/{id}/approve(details.reasonlimitorkey_limit, withdetails.limit_sekanddetails.amount_sek). With levels on (a limit or a two-step amount), an attest through an API key is capped by the lower of the key user's limit and the key's unattended ceiling.GET /supplier-invoices/{id}/attestationsaddsamount_sek,steps,approvals_needed,needs_covering, eachremainingattester'slimit_sekand each decision'sstep;remainingnames only those whose approval would move the invoice on. A company without limits or a two-step amount attests as before.
Supplier invoices: EU goods (2026-10)
- New:
reverse_charge_kindon a supplier invoice (crm#1323, 2026-10-19):POST /supplier-invoicesandPOST /inbox-items/{id}/convertacceptreverse_charge_kind(eu_goods|eu_services) for a reverse-charge invoice from a supplier in another EU country.eu_goodsbooks the basis pair on 4515 (momsdeklaration ruta 20) / 4598 instead of 4535 (ruta 21); the fiktiv moms on 2645 / 2614 is the same, and the credit note and the kontantmetoden entries follow it.GET /supplier-invoices/{id}returns it (nullbooks services). Sent without reverse charge or for a supplier that is noteu_businessit answers400 SI_CREATE_INVALID_INPUT. Additive: nothing changes for a request without it. - Fix: a privately paid reverse-charge invoice registers (crm#1377, 2026-10-22):
POST /supplier-invoiceswithpaid_with_private_funds: trueand reverse charge (an EU or non-EU supplier's service bought on a private card) answered400 SI_CREATE_INVALID_INPUT. It now books the utlägg verifikat with the same fiktiv moms 2645 / 26x4 and basis pair 45xx / 4598 the registration would, and the payer's claim is the net the supplier invoiced. Lines must still carryvat_rate0. Nothing changes for any other request. - Behaviour change:
400 SI_CREATE_INVALID_INPUTnames its rule (#96, 2026-10-23):POST /supplier-invoicesandPOST /inbox-items/{id}/convertsend a stabledetails.reason(reverse_charge_kind_without_reverse_charge,reverse_charge_kind_not_eu_supplier,inbox_item_requires_private_payment,inbox_item_not_found,inbox_item_already_booked,document_unavailable,document_already_used,accrual_with_private_payment,accrual_requires_accrual_method,vat_on_non_vat_registered, orexpense_claim_lines_invalidwithdetails.detail), andmessage/message_enare that rule's sentence. Before,details.reasonwas a free English sentence and both messages were the same for every refusal. A client that matched the old sentence matches the code instead. The API version date is unchanged. - Behaviour change: under kontantmetoden an EU goods invoice is booked at registration (#73, 2026-10-22). ML 2023:200 7 kap. 26 and 40 §§ put the reverse-charge moms of an EU goods acquisition in the period the invoice is issued, whatever the buyer's accounting method.
POST /supplier-invoicesandPOST /inbox-items/{id}/convertwithreverse_charge_kind: "eu_goods"from a kontantmetoden company now post the registration verifikat on the invoice date (cost, 4515 / 4598, 2645 / 2614, credit 2440) and returnregistration_journal_entry_id; the dry run sayswould_create_registration_journal_entry: true, and an invoice date in a locked period answersPERIOD_LOCKED. Its payment then clears 2440, as under faktureringsmetoden. Before, nothing was posted until the payment, which booked the moms in the payment's period. EU services and every other kontantmetoden invoice are unchanged. The API version date is unchanged. - Behaviour change: an EU goods registration is dated no later than the 15th of the month after delivery (#93, 2026-10-23). ML 2023:200 7 kap. 26 and 40 §§ put the reverse-charge moms of an EU goods acquisition in the period the invoice is issued, but at the latest in the period holding the 15th of the month after the delivery month.
POST /supplier-invoices,POST /inbox-items/{id}/convertandPOST /supplier-invoices/{id}/bookfor an invoice withreverse_charge_kind: "eu_goods"and adelivery_datenow date the registration verifikat on that 15th when the invoice date is later, under both accounting methods, and check the period lock on that date (PERIOD_LOCKED; the Bokför step also returnsdetails.entry_date). Before, the verifikat was always dated on the invoice date, so a late invoice reported the moms in a later period. Withoutdelivery_date, and for every other invoice, nothing changes. The API version date is unchanged.
Expense claims (2026-11)
- New:
salary_run_idon expense claims (crm#1942, 2026-11-17):GET /expense-claims,GET /expense-claims/{id}and the claimPOST /expense-claimsanswers carrysalary_run_id: the salary run whose payslip repays the claim while itsstatusisregistered(put there byPOST /salary-runs/{id}/employees/{employeeId}/expense-claims),nullotherwise. Such a claim staysregistereduntil the run is booked and is paid with that salary, so a registered claim waits for a payout only whilesalary_run_idisnull. A payout of a claim on a payslip answers409 EXPENSE_PAYOUT_ON_PAYSLIPas before; the dry run of that refusal now names the run indetails.salary_run_idanddetails.salary_run_status. Additive; the API version date is unchanged.
Expense claims (2026-10)
- Reverse charge on an utlägg (crm#1028, 2026-10-09):
POST /expense-claimsacceptsreverse_charge(eu_services|non_eu_services) for a service under huvudregeln (SaaS, licences, ads, consulting) from a seller abroad that charged no VAT. Hotel, restaurant, taxi, travel and event costs abroad are taxed where performed and take noreverse_charge. The verifikat then also carries the fiktiv moms 2645 D / 2614 K on the SEK amount and the basis pair 4535 (ruta 21) or 4531 (ruta 22) D / 4598 K, left out whenexpense_accountreports that ruta itself. It needsvat_amount0, nolinesand anexpense_accountthat reports no other box (400otherwise). Additive: nothing changes for a request without it.
Reports and compliance (2026-10)
- Behaviour change:
GET /compliance/check?type=vat_closecompares each VAT rate with the previous period (2026-10-28).details.sanity.ratios.rate_sharesis new:{ current, previous }, each{ "25", "12", "6" }, the rate's share in percent of the taxable base derived from output VAT (ruta 10/11/12 divided by the rate), ornullwhen the period has no sales, a rate is negative, or (previous) the previous period was not read. A new anomaly kind,rate_share_shift, fires once per rate whose share moved at least 15 percentage points while its base moved at least max(25 000 kr, 10 % of the larger total); itscurrentandpreviousare shares in percent,delta_pctthe change in percentage points, andcurrent_baseandprevious_base(new fields) the rate's base in kronor.output_vat_ratio_driftis no longer emitted: ruta 10 / ruta 05 moved with the sales mix of any company selling at more than one rate, and could not see 12 % or 6 %.revenue_dropandrevenue_spikekeep their thresholds but stay quiet when both periods' ruta 05 is below 25 000 kr.ratios.output_vat_ratio_25,_12and_6are deprecated and still returned unchanged; readrate_shares. The thresholds are a first proposal, to be calibrated against real declarations.sanitystays advisory:readyis unchanged. The MCP toolgnubok_vat_close_checkreturns the samesanity. The API version date is unchanged. - Behaviour change: a year left unclosed opens the next on its closing account (2026-10-24): when a year's opening balance is derived from history, an earlier year that ended without a booked resultatavslut is read as closed, so its result opens on 2099 (enskild firma 2010, ideell förening 2069) and the later balance sheets, saldobalans and huvudbok balance. Booking the real closing replaces it.
imbalance_diagnosisonGET /reports/balance-sheetno longer carriesuntransferred_results. - Behaviour change:
GET /compliance/check?type=vat_closereturns the rutor as filed (2026-10-13):details.rutoris the momsdeklaration Skatteverket receives, box for box and signed (a box whose credit notes exceed its sales is negative, as it is in the filing). Before, every box but ruta 49 was an absolute value and ruta 05 also summed a fixed list of class 3 accounts (3041-3078, 3106, ...) the filing leaves out. A class 3 account in no ruta is reported by theREVENUE_ACCOUNT_WITHOUT_RUTAfinding instead. The API version date is unchanged. - Docs fix:
GET /reports/trial-balancerows (2026-10-13): the reference describedaccount,opening_balanceandclosing_balance, fields the response never had. It now documents what is returned:account_number,account_name,account_classand the opening, period and closing debit and credit per account, each side gross (the balance isclosing_debit - closing_credit). The response itself is unchanged.
Journal entries: a filed momsperiod (2026-11)
- New booking-time warning
VAT_PERIOD_ALREADY_FILED(2026-11-17):POST /journal-entries/{id}/commitof a typed draft that moves a ruta of a momsperiod whose declaration is on record as filed answers409 VOUCHER_NEEDS_CONFIRMATIONwith the code indetails.warnings(details.filed_periodsnames each period, its filing date and the rutor that move), like the other warnings of that answer. Show it to a person; to book anyway, send the same request withacknowledged_warningsnaming the code. The declaration for the period may then need correcting. A draft that changes no ruta of a filed period is not asked, and a locked period still refuses as before.
Fiscal periods and journal entries (2026-10)
- New:
owned_byon reverse and correct (2026-10-18).POST /journal-entries/{id}/reverseand/correct, live and dry run, answerowned_by: the invoice, credit note, supplier invoice, periodisering, asset or payroll run the verifikat books, with its ownaction,action_href, the MCPtoolthat does it and a one-linehint_sv/hint_en, ornull. The storno or correction is posted exactly as before; that object does not follow it, so a credit is usually the better call. Additive field, the API version date is unchanged. - Behaviour change: one opening balance per fiscal year on every door (2026-10-13). A year counts as having its IB when it points at one or holds any posted
source_type=opening_balanceverifikat, including one booked through the agent's voucher tool or left by a replaced SIE import, which no pointer named.POST /fiscal-periods/{id}/opening-balancesanswers409 CONFLICT(details.reasonopening_balance_already_posted, now withdetails.existing_entry_id) and posts nothing; a reversed (stornoed) IB no longer blocks it.POST /fiscal-periods/{id}/opening-balances/manualanswers409 OB_PERIOD_ALREADY_HAS_BALANCESfor such a year, dry run included, where it used to post a second IB.POST /fiscal-periods/{id}/year-endandGET /compliance/check?type=year_end_readinessreportNEXT_PERIOD_HAS_IBfor it, before anything is posted. An IB booked as a voucher now also points its year at itself, soPOST /opening-balances/correctworks on it. The API version date is unchanged. - Behaviour change: a storno is dated inside the original's fiscal year (2026-10-13).
POST /journal-entries/{id}/reversedefaultsreversal_dateto the original entry's date (it was today), as the app and the agent tools already did. The storno is numbered in the original's series and booked into the original's fiscal year, so areversal_dateoutside that year answers400 ENTRY_DATE_OUTSIDE_FISCAL_PERIOD; it used to be posted dated in the other year, counted in one year by the trial balance and in another by the VAT report. A locked or closed year, or a date on or before the company lock date, answersPERIOD_LOCKED(details.reason) before any voucher number is drawn, live and dry run alike; the lock used to be checked on today's period, and a locked original year failed at the database after using up a voucher number. The same check runs onPOST /journal-entries/{id}/correctbefore its storno. The API version date is unchanged. - Behaviour change: a voucher gap check that cannot run blocks year-end (2026-10-13).
GET /compliance/check?type=year_end_readinessandPOST /fiscal-periods/{id}/year-endreport a blocker when the gap detection or the gap explanations cannot be read, where the series used to be skipped and the year could close past an unexplained gap. The API version date is unchanged. - Behaviour change: voucher gap explanations are checked once, the same way, and are write-once (2026-10-13).
POST /voucher-gap-explanationstakes anexplanationof 1-500 characters after trimming (it accepted 2000, and 501-2000 then failed in the database) and answers409 VOUCHER_GAP_ALREADY_EXPLAINEDfor a gap that already has one, dry run included; a saved explanation is never overwritten. The API version date is unchanged. - Behaviour change:
POST /imports/siereads itsoptionsthrough the import job's own schema (2026-10-13), the one the dashboard and the agent tools use. Vouchers the file gives no series now go to series B, as on the dashboard (this endpoint defaultedvoucherSeriesto A);voucherSeriesandopeningBalanceSeriestake up to 16 characters (was 2);markImportedNoDocRequiredis accepted. Every other default is unchanged (createFiscalPeriod,importOpeningBalances,importTransactionsandupdateAccountNamestrue), and an unknown key is still400. The API version date is unchanged. - Docs: the year-end flow is one call (2026-10-13). The reference pages for
/lock,/year-end,/closeand/opening-balancesprescribed lock, then year-end, then close, which fails:POST /fiscal-periods/{id}/year-endruns on an unlocked period and locks it, closes it and generates the next year's IB itself./closeis a recovery path and/lockis for interim locks. The year-end page now says to pollGET /api/v1/operations/{id}or subscribe toperiod.year_closed(operation.completedis not a deliverable webhook), and its 202 example showsstatus: "queued", as the response does. Nothing on the wire changed.
API keys: inspect a key's grant (2026-10)
-
Behaviour change: an archived company answers
404(2026-11-01). A call naming a company that has been archived now answers404 NOT_FOUND, reads and writes alike, as an unknown company does and as the MCP server andGET /api/eventsalready did.GET /companiesandGET /api-keyleft such a company out before, but it stayed reachable by id. The company's data is kept; only the door is closed. -
A refused write names why (2026-11-01). A write refused because the membership is a viewer, or the key has read-only access to the company, is
403 FORBIDDENwitherror.details.codeROLE_READ_ONLYorCONNECTION_READ_ONLY, as before. The MCP server now carries the samedetails.codeon its error. Additive. -
OAuth connections are named as their client (2026-11-01). Everything a key from the OAuth sign-in writes through the REST API now records the actor
mcp_oauthwith the client's name (Claude (Anthropic)), as the MCP server does:committed_actor_*on a verifikat,actor_typeandactor_labelon a pending operation. They recordedapi_keywith the reserved key name. Rows already written keep what they carry. -
GET /api/v1/api-key(2026-10-07): returns the calling key'smode(live|test), itsscopes,company_access(all_membershipsorallowlist) and every company it reaches withrole,access(read_write|read_only) andread_only_code(ROLE_READ_ONLY|CONNECTION_READ_ONLY, the codes a refused write answers with). Any valid key may call it, whatever its scopes, including keys issued through MCP OAuth; no key gives401. Check a key when a customer connects it instead of waiting for the first403: a document upload to company X needsdocuments:writeinscopes, X withaccessread_write, andmodelive(a test key gets403 TEST_KEY_WRITE_BLOCKEDon uploads, which cannot be dry-run). Additive. -
The reference pages said live keys start
gnubok_sk_live_. They startgnubok_sk_followed directly by the random part; only test keys carry an infix (gnubok_sk_test_). The OpenAPIbearerFormatnow says the same.
One answer on bank rows (2026-11)
- Behaviour change: a payment with no bank row of its own books on the company's primary bank account (2026-11-01).
POST /invoices/{id}/mark-paid,POST /supplier-invoices/{id}/mark-paid, the recovered customer loss, the proceeds of an asset disposal, the ROT/RUT payout and the dividend, contribution and capital change bookings used 1930 when the request named no account. They now use the primary cash account; with no usable primary the only enabled SEK bank account; with neither 1930, as for a company with no cash accounts. A company whose primary is 1930 sees no change. A named account still wins, and an invoice's chosen payee account still comes before the primary. Dry runs answer the resolved account. A failed read of a chosen payee account now answers an error: it used to book on 1930. The API version date is unchanged. - Behaviour change: one answer to whether a bank row is booked (2026-11-01). A row is booked by a posted verifikat through its pointer, a
bank_linelink or a payment row, and every read and guard answers from that. An anchor at a reversed verifikat books nothing, unless a posted correction of that verifikat books on a bank account: such a row keeps reading as booked, and a door that would book it now refuses it, naming the correction.GET /transactions?status=unbooked, the lock guard and the bank reconciliation list a row with only a reversed anchor as open work;GET /reconciliation/accounts/{accountKey}/itemslists it as unmatched. A link with roleotherorclearingdoes not book a row on its own. A row whose payment verifikat was deleted is open work. - Fix: the bank status floors at a real opening balance (2026-11-01).
GET /reconciliation/bank/statusand the account status took the latest verifikat labelledopening_balanceon any date. They now take the rule every other balance has: posted, on a fiscal year's first day, and not a date whose opening balance verifikat cancel on the account. The items list starts at the same floor. - Fix: a linked row is listed in the month the status counts it (2026-11-01). A row with a pointer and a later link was listed in both months and counted in the later one.
- Fix: a reference names a document only as a whole number (2026-11-01).
POST /reconciliation/bank/runand the supplier match read a reference or a giro anywhere in the text, so 1234 matched "Faktura 212345" and a bankgiro matched the digits of an OCR number. They now compare whole numbers. A reference of digits and separators alone needs four digits and matches on them, so one written with separators matches the same number without them. A reference with letters, such as F-101, must stand as written, never by the digits inside it. A reference of words alone matches nothing.auto_referenceandamount_bankgirofire less often. - Fix: one bank account on two rows is one account (2026-11-01). The duplicate guard on a booking finds a booked copy on a twin row (one IBAN and currency).
superseded_byinGET /reconciliation/accountsmarks the row without bookkeeping history, not the older one; an account split over two ledgers marks neither.
Fiscal years (2026-11)
- Behaviour change: a year has ended the day after its last day (2026-11-01). On the last day itself
POST /fiscal-periods/{id}/year-endandGET /compliance/check?type=year_end_readinessreportPERIOD_NOT_ENDED, andPOST /fiscal-periods/{id}/close-externalanswers409 FISCAL_PERIOD_CLOSE_EXTERNAL_NOT_ENDED, as the VAT and annual report doors already did. - Behaviour change: an enskild firma keeps the calendar year on create and import (2026-11-01).
POST /fiscal-periodsanswers400 FISCAL_PERIOD_ENSKILD_FIRMA_CALENDAR_YEARfor a year not ending on 31 December, or a later year not starting on 1 January, asPATCHdid; an SIE import with such a year is refused. - Fixed:
exceeds_18_monthsonGET /fiscal-periodscounts like the doors that refuse a year: a year starting on the last of a month is over the cap by that day. - Behaviour change: a next year that cannot be created stops the year-end before anything is posted (2026-11-01).
POST /fiscal-periods/{id}/year-endandGET /compliance/check?type=year_end_readinessreportNEXT_PERIOD_NOT_CALENDAR_YEARfor an enskild firma whose year does not end on 31 December, andNEXT_PERIOD_OVERLAPSwhen a later year starts inside the twelve months after this one: create the shorter year between them first. The close used to post its closing entry and then fail. - Fixed: a yearly VAT period follows the recorded räkenskapsår. The
tax_period, dates and due date on the filing record are the recorded year's whenfiscal_year_start_monthis out of step with it,period_startis that year's own first day also when it runs longer or shorter than twelve months, and the report withoutfiscal_period_idreads the year that has started when two end in one calendar year. An enskild firma keeps the calendar year as its key, as its deadline does.
Recording a payment by hand (2026-11)
- Behaviour change:
POST /supplier-invoices/{id}/mark-paidbooks through the dashboard's payment path, and the dashboard through the same rules (2026-11-01). An amount above what the invoice still owes answers400 MATCH_SI_AMOUNT_EXCEEDS_REMAININGwithdetails.remaining_amountanddetails.excess(it wasVALIDATION_ERROR). A credit note answers400 SI_PAID_NOT_PAYABLEwithdetails.reasoncredit_note(it wasVALIDATION_ERROR). A payment row that cannot be written, or a lost race, now cancels the payment voucher and documents its number as a gap; it used to storno it, or leave the invoice paid with no row. Under dry-run editedlinesare checked too, andwarningscarries the Bokför step's warnings when the registration was booked first. - Behaviour change:
POST /invoices/{id}/mark-paidrefuses the same documents on every door (2026-11-01): an invoice with an active credit note, a draft included, answers400 INVOICE_PAID_NOT_PAYABLEwithdetails.reasonactive_credit_note, as the dashboard always has. A delivery note answers the same code withdetails.reasondelivery_note(it wasVALIDATION_ERROR). Aforce: truepast the duplicate guard on a full settlement is recorded in the behandlingshistorik. - Behaviour change:
payment_dateafter today (the Swedish calendar day) answers400 PAYMENT_DATE_IN_FUTURE(2026-11-01) on both mark-paid endpoints and the MCP tool, under dry-run too, a credit note refund included. On supplier invoices it wasVALIDATION_ERROR; on customer invoices it was booked. - Behaviour change: a signed bank payment stops the credit and the link to an existing verifikat (2026-11-01):
POST /supplier-invoices/{id}/creditand the MCP toolgnubok_link_supplier_invoice_to_voucheranswer409 SI_BANK_PAYMENT_UNDER_WAY, as mark-paid does, while a bank payment signed for the invoice will still execute. Cancel that payment first; once the money has left, match its bank row to the invoice instead. That match stays open: the row is that payment. - Behaviour change:
POST /transactions/{id}/link-journal-entryrefuses a row larger than the invoice (2026-11-01) with400 MATCH_AMOUNT_EXCEEDS_REMAINING, before anything is written. It used to record the whole row as paid and clamp the remainder at zero.
Invoices: issuing and credit notes (2026-11)
- Behaviour change: a momsfri sale is issued like any other (2026-11-01).
POST /invoices/{id}/mark-sentand/sendanswered400 VALIDATION_ERROR(moms_ruta) for every invoice of a company outside the VAT register, and the advice to re-create the draft could not help: such a sale hasvat_treatment=exempt,vat_amount=0and states nomoms_ruta. Every other invoice with nomoms_rutais still refused, anexemptone at a VAT-registered company included: send its items withPATCH /invoices/{id}. - Behaviour change: a delivery note is marked sent, never emailed (2026-11-01).
POST /invoices/{id}/mark-sentissues one (no verifikat, its D-series number kept), as the dashboard does:400 VALIDATION_ERRORno more.POST /invoices/{id}/sendrefuses one with400 INVOICE_SEND_DELIVERY_NOTE(was400 VALIDATION_ERROR). - Behaviour change: a credit note is a link or a total below zero (2026-11-01).
/mark-sent,/send,/mark-paid,/bookand the match doors treat a draft or open invoice withtotal < 0and nocredited_invoice_id(an imported kreditfaktura) as the credit note it is.GET /invoices?status=sentkeeps listing it; it is never reported as overdue. - New:
POST /invoices/{id}/creditsays it delivered nothing (2026-11-01). Every response carries warningCREDIT_NOTE_NOT_DELIVERED: the credit note is issued and booked, and sending its PDF to the customer is yours. - Fixed:
GET /customers/{id}?expand=invoiceslists what is owed (2026-11-01): a sent credit note or an invoice with nothing remaining is no longer an open invoice. - New:
payment_referenceon invoices (2026-11-17).GET /invoicesandGET /invoices/{id}returnpayment_reference, the reference the invoice asks the payer to quote (the one its PDF prints), andpayment_reference_type:ocris the digits ofinvoice_numberfollowed by a Luhn (10-modulen) check digit, 2 to 25 digits and never a length digit (invoice 2026-0042 gives 202600425);invoice_numberis the invoice number as it is, written as the message of the payment. An invoice carriesocrwhen it is printed in Swedish with a bankgiro or plusgiro and the company has not turned the OCR reference off; the value follows those settings, as the PDF does. Both arenullon a document that asks for no payment under a reference: no number yet (a draft), a credit note, a quote, a proforma, a delivery note, an invoice debited by Autogiro. Theinvoice.sentwebhook and event carry the same two fields oninvoice, and the MCP toolsgnubok_get_invoiceandgnubok_list_invoicesreturn them. Before, the reference was only on the PDF. Additive; the API version date is unchanged. - Fixed: a credited invoice has
remaining_amount0 (2026-11-17).POST /invoices/{id}/creditandPOST /invoices/{id}/link-credit-notenow set the credited invoice'sremaining_amountto 0 in the write that moves it tocredited: the credit note covers the whole invoice, so nothing is left to pay. Before, the invoice kept the amount it asked for before the credit, and onlystatussaid the customer owed nothing. The MCP reads report the same figure. Invoices credited earlier are not touched by this change.
Invoices (2026-10)
-
Behaviour change:
POST /invoices/{id}/creditruns the credit the dashboard and MCP use, and fails closed (2026-10-13). The credit note now mirrors the original line for line with its revenue accounts, ROT/RUT and periodisering fields and its payee: on a ROT/RUT invoice the reversal credits 1513 for Skatteverket's share and 1510 for the customer's (it credited 1510 for the full total and left 1513 standing), deferred revenue is reversed on its 29xx account and the accrual schedule stops (it reversed 30xx while the schedule kept dissolving), and a line with its ownrevenue_accountreverses on that account. A self-billed original's credit note is numberedKR-<its external number>(it was numbered after the original's id). No fiscal period for today now also answers400 INVOICE_CREDIT_PERIOD_LOCKED(details.reasonno_fiscal_period) before anything is written. When the reversing entry cannot be posted the request fails with500 INVOICE_CREDIT_ISSUE_INCOMPLETE(details.failure_steps), the credit note stays a draft and the original keeps its status; a retry issues the same credit note.500 INVOICE_CREDIT_REPAIR_REQUIREDmeans the entry posted and a later step did not finish; retrying completes it. Before, the request answered201with the original alreadycreditedand aJOURNAL_ENTRY_NOT_POSTEDwarning. Crediting a credit note answers400 INVOICE_CREDIT_NOT_INVOICEwithdetails.reasoncredit_note(wascannot credit a credit note). The only response warning left isPDF_ARCHIVE_FAILED. The API version date is unchanged. -
Behaviour change:
POST /invoices/{id}/mark-sentissues through the dashboard's issue step and fails closed (2026-10-13). When the invoice's verifikat cannot be posted (no open or a locked period, a required dimension, an account outside the chart) the request fails with the engine's code or500 INVOICE_MARK_SENT_BOOK_FAILED(details.reasonin Swedish), and the invoice stays a draft and keeps any number already allocated. Before, it answered200with the invoicesentand aJOURNAL_ENTRY_NOT_POSTEDwarning: an issued invoice without its verifikat. A ROT/RUT invoice now books Dr 1510 for the customer's share and Dr 1513 for Skatteverket's (it debited 1510 for the full total), a periodised line books on its 29xx account with an accrual schedule (it booked on 30xx), and the issued PDF is archived as underlag on the verifikat. A verifikat posted but not linked to the invoice answers500 INVOICE_MARK_SENT_REPAIR_REQUIRED(was theJOURNAL_ENTRY_ID_WRITEBACK_FAILEDwarning), and a draft whose customer was deleted409 INVOICE_CUSTOMER_MISSING.warningsnow carriesPDF_ARCHIVE_FAILED,ACCRUAL_SCHEDULES_NOT_CREATEDorDELIVERY_HISTORY_NOT_RECORDED. The MCP mark-sent tool also archives the PDF and emitsinvoice.sentnow. The API version date is unchanged. -
Behaviour change:
POST /invoices/{id}/mark-paidbooks through the dashboard's payment path (2026-10-13). Under kontantmetoden a ROT/RUT invoice now books Dr 1930 for the customer's share and Dr 1513 for Skatteverket's (it debited 1930 for the full total and booked no 1513), and a line with its ownrevenue_accountbooks on that account (it booked on the default 30xx). Customlineson a never-booked kontantmetod invoice post as aninvoice_cash_paymentvoucher. When the invoice update loses a race (409 INVOICE_PAID_RACE) or fails, the payment voucher just posted is makulerad with a documented gap instead of staying in the ledger. A refusal from the bookkeeping engine (a locked period, say) answers with the engine's code instead ofINVOICE_PAID_BOOK_FAILED.invoice.paidcarriespaymentAmountin the invoice currency for a foreign invoice settled with SEK lines, as on the dashboard. Thewarningsfield (EVENT_EMIT_FAILED) is gone from the response; an emit failure is logged. The API version date is unchanged. -
Behaviour change:
POST /invoices/{id}/mark-paidaccepts apartially_paidinvoice (2026-10-13) and books its remaining amount, as the dashboard and now the MCP tool do. It used to answer400 INVOICE_PAID_NOT_PAYABLE. A never-booked kontantmetod invoice that is already part-paid is still refused with400 INVOICE_PAID_CASH_PARTIAL_UNSUPPORTED. The API version date is unchanged. -
subtotal_sek,vat_amount_sekandtotal_sekare stored in whole öre (2026-10-13) on a foreign-currency invoice created or edited through any door (POST /invoices,PATCH /invoices/{id},POST /invoices/bulk-create, the dashboard and MCP). They used to hold the raw product of amount and rate (for example11235.62345). Existing invoices are unchanged; the API version date is unchanged. -
v1 invoice items carry
accrual_period_start,accrual_period_endandaccrual_balance_account(2026-10-13) on create,GET /invoices/{id},PATCH /invoices/{id}and:send, the periodisering fieldsPOST /invoicesalready accepts. Behaviour change:POST /invoices/{id}/sendnow books a periodised line on its 29xx account with an accrual schedule, as the dashboard does; it used to book it as immediate revenue on 30xx. Additive fields; the API version date is unchanged. -
Behaviour change:
POST /transactions/{id}/match-invoicerefuses a kontantmetod payment it cannot book once (2026-10-13): for an invoice never booked at issue under kontantmetoden, a partial payment and the final payment of an invoice already part-paid both answer400 INVOICE_PAID_CASH_PARTIAL_UNSUPPORTED(details.reasonpartial_paymentorpreviously_partially_paid), the code the dashboard and the MCP match already return. Before, the partial answered400 VALIDATION_ERROR(details.fieldaccounting_method) and the final payment of a part-paid invoice was booked as the whole invoice, recognising the earlier installments' revenue and moms a second time. Every refusal (this one, unbalancedlines, an inactive settlement account) now comes before the reversal of the transaction's earlier voucher, so a refused match leaves that voucher in place. The API version date is unchanged. -
New journal entry
source_typerot_rut_reclassification(crm#1144, 2026-10-14): a voucher that moves the ROT, RUT or grön teknik deduction of an invoice imported from Visma from 1510 to 1513 (debit 1513, credit 1510,source_idthe invoice), booked by the post-migration deduction step on the import page. It can appear in journal entry and general ledger responses; like the other engine-owned types it cannot be created throughPOST /journal-entries(400 VALIDATION_ERROR). The invoice then carriesdeduction_totaland per-row deduction fields like an invoice issued in Accounted. Invoices imported part-paid now readpartially_paidinstead ofsent. Additive. -
Behaviour change: an invoice number is never issued under a higher number of its series, and is unique by value (2026-10-12): numbering an invoice (
:send,:mark-sent,:send-peppol, and the MCP send, mark-sent and convert tools) takes the first free number fromnext_invoice_numberon, skipping numbers the series already has, and is refused with409 INVOICE_NUMBER_SERIES_BEHINDwhen the series already holds a higher number (typically after importing invoices from another system).details.first_allowedis the lowest next number that continues the series. Nothing is used up: setnext_invoice_numbertofirst_allowedor higher, or a newinvoice_prefix, withPATCH /settings, then retry. A settings save that movesnext_invoice_numberorinvoice_prefixonto a number the series already has, or under its highest number, is refused with400 SETTINGS_INVOICE_NUMBER_IN_SERIES. Numbers are compared by value, so1and001are the same number: an invoice whose number already exists in another spelling is refused like any taken number. Proformas number from their ownPF-series and no longer leave a hole in the invoice series. Before, the number came from the counter alone: a counter set onto an imported number failed withINVOICE_SEND_NUMBER_ASSIGN_FAILEDon every attempt, and a counter below imported invoices issued numbers under them, such as001next to an imported1. No field was removed, and the API version date is unchanged. -
Domestic reverse charge for construction services (crm#1007, 2026-10-05):
POST /invoicesandPATCH /invoices/{id}acceptvat_treatment=reverse_charge_domestic, omvänd betalningsskyldighet under ML 16 kap. 13 § (the buyer is a construction business and the supply a construction service). The invoice gets 0 % on every line,moms_ruta41, revenue on 3231 when sent, and the notice "Omvänd betalningsskyldighet, byggtjänster, ML 16 kap. 13 §" with the buyer's VAT number on the PDF. It needscustomer_type=swedish_businesswith a Swedishvat_number(SE + 12 digits) and takes nodelivery_country:400 INVOICE_VAT_TREATMENT_DOMESTIC_BUYER_REQUIRED(details.reason) or_DELIVERY_COUNTRY_MISMATCHotherwise. Additive: nothing changes for a request without it. Not accepted byPOST /invoices/bulk-create.
Customers (2026-10)
- Behaviour change:
default_payment_terms: 0is stored as 0 (2026-10-13) onPOST /customers, as on the dashboard and MCP create: 0 days (betalning direkt) used to be replaced by the company'sinvoice_default_days, else 30. An omitted value still takes that default. The API version date is unchanged.
Payroll (2026-10)
- Behaviour change:
PATCH /salary/settingsis for an owner or admin (2026-11-01). The endpoint writes company settings, which only an owner or admin may change in the app. A member's key was let through; it now gets403 FORBIDDENwithdetails.required_roles, on a dry run too. Reading (GET /salary/settings) is unchanged. - Behaviour change: payment files pay from the account the salary is booked on (crm#1483, 2026-10-26): a pain.001 from
POST /salary-runs/{id}/payment-fileandPOST /supplier-payment-batches(and the dashboard's tax file) pays from the cash account the salary verifikat credits: a booked run's verifikat account, otherwise the company's primary bank account. It used to pay from the IBAN in company settings, which is what SEK invoices print and could be another account than the one the salary is booked on. The account's own IBAN is used (the bank-reported one for a connected account, the entered one for a manual account), and its BIC (saved, named by the bank connection, or derived). Settingsibanandbicremain the fallback when that account has no IBAN and is the company's only SEK bank account, or the company has no bank accounts; otherwise the call is refused with422 SALARY_RUN_PAYMENT_FILE_MISSING_BANK_DETAILSor400 SI_BATCH_DEBTOR_INCOMPLETEanddetails.account(cash_account_id, name, ledger_account, iban_last4) names the account. New:paying_accounton the salary payment-file response (null forbg_lb) anddebtor_accounton the supplier batch preview. Bankgirot LB files still go from the company bankgiro, and Swedbank's ids stay company settings.salary_default_bankis still accepted; the dashboard now opens the upload instructions of the paying account's bank and uses it only as a fallback. - New: Fora's monthly report (crm#1389, 2026-10-22): employees take
fora_fok_id(the FOK code from Fora's Mina sidor,FOKplus six digits) andfora_fok_start_dateonPOST /employeesandPATCH /employees/{id}, set together, never oncompany_ownerorboard_member;GET /employees/{id}returns them.GET /salary/fora-report?year=&month=(scopepayroll:read) answers what the month's Fora file says: each coded worker, the code and the cash gross pay paid out in that payment month in whole kronor (the bruttolön less taxable traktamente and taxable car allowance), plus warnings; personnummer are masked and the file itself is downloaded on the salary run page. 400FORA_REPORT_INCOMPLETElists what blocks the file indetails.issues. Additive. - Text rows on the payslip, and behaviour change: a 0 kr line is refused (crm#1076, 2026-10-14):
item_type: "text"(Textrad) is a new payslip line for words without money, such as how the salary is built up. Add one to a single payslip withPOST /salary-runs/{id}/employees/{employeeId}/lines, or to every payslip withPOST /employees/{id}/recurring-lines(copied into each run like the other recurring lines and printed under the base salary). Senddescription(at most 200 characters) and leave outamount,quantityandunit_price; the row is stored with amount 0, every flag false and no account, and never reaches tax, the AGI or the booking. Behaviour change: every other line now needs a non-zero amount, from every door (these endpoints, the dashboard and the MCP tools): a 0 kr line, or one withoutamount, is refused with400 VALIDATION_ERROR(details.fieldamount), and so is aPATCH /salary-runs/{id}/lines/{lineId}that sets a 0 kr amount. The one exception is avacationline carrying its days inquantity. Before, a 0 kr line was accepted and printed "0,00" on the payslip; use a text row instead. A line cannot be changed into or out of a text row (400 VALIDATION_ERROR,details.fielditem_type): delete it and add a new one. Recurring additions are still refused: a standing raise goes on the employee'smonthly_salary.amountis now optional in both request bodies; the API version date is unchanged. - Förhöjt skatteavdrag per employee (crm#1073, 2026-10-14):
POST /employeesandPATCH /employees/{id}acceptextra_tax_amount(whole kronor per salary run, 1 to 1 000 000) orextra_tax_percentage(a requested total, above 0 and at most 100 with two decimals: withhold the higher of the statutory tax and this share of the taxable income), never both (400 VALIDATION_ERRORonextra_tax_percentage; send the other asnullin the same PATCH to switch). The employer must honour such a request from the employee's main income (SFL 11 kap. 22 §). A salary run adds the extra after the table or jämkning tax, capped at the cash pay left after that tax and the net deductions; it is not applied with F-skatt, sidoinkomst, an unverified tax status or without a tax table, and the stored value is kept. It is part oftax_withheld, so the booking, AGI field 001, year-to-date totals and the payment file carry the total, and the payslip PDF prints the extra on its own row (one tax row under a per-run tax override).GET /salary-runs/{id}/employeesaddseffective.extra_tax_withheldand the payslip detail alsoextra_tax_withheld: the extra part of the tax, 0 under a per-run tax override.GET /employees/{id}returns both fields. Additive: nothing changes for an employee without them. - Behaviour change: payslip lines carry an account only when one was chosen (2026-10-14):
account_numberon a payslip line is now an override. A line created without one (byPOST /salary-runs/{id}/employees/{employeeId}/linesor by the calculation) returnsaccount_number: nulland books on the default the booking resolves fromitem_type, the employee'semployment_typeandpersonnel_category. Before, the default was written onto the line when it was created, so an owner's hourly or manual line could stay on 7210 and a line whoseitem_typechanged kept its old account.PATCH /salary-runs/{id}/lines/{lineId}acceptsaccount_number: nullto drop an override, and a patch that changesitem_typedrops a stored account unless it sets one. Lines on runs that were not yet booked had their old defaults cleared the same way; booked runs are unchanged. The API version date is unchanged. - New:
personnel_categoryon employees (2026-10-14):arbetareortjansteman(the default). An arbetare's wages book on 7010, vacation pay on 7082 and the vacation-liability change on 7090; a tjänsteman's on 7210, 7285 and 7290. Owners and board members keep their own accounts whatever it says. Accepted byPOST /employeesandPATCH /employees/{id}(no null), returned by every employee response, andGET /employees?personnel_category=filters on it. Unbooked runs follow a change at their booking; a booked run keeps the category it was booked with.GET /reports/salary-journalrows carrypersonnelCategory, andgroupTotalssums the period per category, with owners and board members as their own groups. Additive. - Behaviour change:
personnummer_maskedreadsYYYYMMDD-XXXX(2026-10-12) on every employee and salary-run employee response (GET /employees,POST /employees,PATCH /employees/{id},GET /salary-runs/{id}/employeesand its payslip detail), the form the app, payslips and MCP already showed. It readYYYYMMDDXXXX(no hyphen). A stored value that is not a 10- or 12-digit number is redacted whole (XXXXXXXX-XXXX). The detailGET /employees/{id}still returns the full value. The API version date is unchanged. - Behaviour change: an omitted
voucher_seriesonPOST /salary-runsfollows the company's salary series (2026-10-13): the company's voucher series setting forsalary_payment(Kon the standard series set,Afor a company without one), the series the app and MCP book lön into and the systemdokumentation lists. It used to default toAwhatever the company documented. An explicitvoucher_seriesstill wins, and a dry run previews the resolved letter. The run still starts empty. A409 SALARY_RUN_DUPLICATE_PERIODnow also names the live run (details.existing_id,details.existing_status). The API version date is unchanged. - New:
effectiveonGET /salary-runs/{id}/employeesandGET /salary-runs/{id}/employees/{employeeId}(2026-10-13): the gross, tax, net, avgifter, vacation accrual and employer cost the booking, the AGI and the bank file use once the review overrides apply, withtax_overriddenandavgifter_overridden. The pitfalls used to say the effective value isCOALESCE(override, calculated), which is wrong for the net (a tax override moves the payout too) and for an F-skatt payee's avgifter (the override is ignored). The plain fields are unchanged: they stay the calculation's values. Additive.
Portfolio and event polling: the multi-user seat gate (2026-10)
GET /portfolio/overviewaddsscope.dormant(2026-10-13): companies paused for the key user by the multi-user seat gate (a non-owner in a company whose multi-user plan lapsed past its grace) are left out ofcompaniesand listed there, as every per-company endpoint already refuses them with403; a paused company no longer takes one of the 25 scope slots.GET /api/eventsanswers403 FORBIDDENfor such a key the same way. The seat gate is off unless the instance turns it on, so nothing changes where it is off. Additive.
Bookkeeping lock: the automatic lock (2026-11)
- Behaviour change:
auto_lock_period_daysnow locks, andperiod.lock_date_changedcan carryvia: auto_lock(2026-11-17): the setting ("Automatisk låsning efter" on the settings page) was stored and returned, but nothing acted on it. Every night, for each company with the setting on,bookkeeping_locked_throughis now moved forward to the newest calendar month end that lies at least that many days back. It is never moved back, and a lock date at or past that month end is left alone, so a lock date moved back while the setting is on is moved forward again the next night; setauto_lock_period_daystonullto keep dates open longer. Each move sendsperiod.lock_date_changedwithdirectionforwardandviaauto_lock: no person or key made the change. The event is inGET /api/eventstoo. A receiver that readsviashould accept the new value next toapp,apiandapproval. The API version date is unchanged. - Behaviour change: a company lock date over the year's last day stops the year-end before anything is posted (2026-11-18). The closing entry is dated the period's last day, so a
bookkeeping_locked_throughon or after it refused the closing at its first posting, after readiness had said ready.GET /compliance/check?type=year_end_readinessnow reports it as a blocker that names the lock date, andPOST /fiscal-periods/{id}/year-endfails with that sentence before it posts anything. Move the lock date back withPATCH /settings/bookkeeping-lockfirst, and sendauto_lock_period_days: nullwhile the closing is done when automatic locking is on.
Webhooks: dimension values (2026-11)
- New webhooks:
dimension_value.created,dimension_value.renamed,dimension_value.archived,dimension_value.unarchived(2026-11-08): a project (dimension 6), cost centre (dimension 1) or other dimension value was created, renamed, archived or made active again, through the app,POST/PATCH /dimensions/{id}/values, MCP, "Importera befintliga koder" or an SIE import. The payload carriesdimensionValue(id,dimension_id,sie_dim_no,dimension_name,code,name,is_active,start_date,end_date) andpreviousName(the old name on a rename, otherwisenull). OnePATCHthat renames and archives sends both events. A change of dates alone sends none, and neither does deleting a value no line uses. The four types are inGET /api/eventstoo. Additive; the API version date is unchanged.
Webhooks (2026-10)
- New webhook:
period.lock_date_changed(2026-10-28): fires when the company-wide lock date (bookkeeping_locked_through, "Bokföring låst t.o.m.", the usual monthly close) is set, moved or removed, through the settings page,PATCH /settings/bookkeeping-lockor an approved staged change. The payload carriespreviousLockDate,lockDate(nullwhen the lock was removed),direction(forwardorbackward),via(app,apiorapproval: the door, never the person) andreopenedFiledVatPeriods(the filed momsdeklaration periods a backward move reopened, empty otherwise). It fires only when the stored date really changes, never on a dry run. Also served byGET /api/events. Additive; the API version date is unchanged. journal_entry.committedreaches the event feed in the posting transaction (2026-10-15): theGET /api/eventsrow for a posted verifikat is written by the same database transaction that posts it, so it exists exactly when the voucher was posted. Before, it was written after the commit returned, and a request that crashed or timed out in between posted the voucher without the event. The row'sdatais unchanged (entrywith itslines); webhook delivery is unchanged and still queued after the commit. The API version date is unchanged.- One webhook can receive several event types (2026-10-15):
POST /webhooksandPATCH /webhooks/{id}acceptevent_types(one or more event types), and every webhook read returns it.event_typeis still accepted (as a one-entry list) and still returned (the first listed type).PATCHwithevent_typesreplaces the list, so an existing webhook's events can change without recreating it;api_version_pinnedis kept. Listingsalary_run.*oragi.generatedneedspayroll:read, as before. Each delivery still carries one event. Additive; the API version date is unchanged. - The event feed serves every webhook event type (2026-10-15):
GET /api/eventsnow also returnsinvoice.paid,supplier_invoice.uncredited,period.unlocked, the fourreconciliation.*events,salary_run.created,salary_run.approved,salary_run.bookedandagi.generated. They were deliverable as webhooks but never written to the feed, so a receiver that missed one could not catch up (event feed). Payroll events needpayroll:readon the key, as webhook registration does: a key without it does not see them, and naming one intypesanswers403 INSUFFICIENT_SCOPE. Events from before the change are not backfilled. Additive; the API version date is unchanged. - Behaviour change: personnummer and internal user ids are removed from every webhook payload, at any depth (2026-10-11):
personal_number,personnummer,deduction_personnummer_encrypted,deduction_personnummer_last4,personnummer_encrypted,personnummer_last4,user_idanduserIdno longer appear anywhere indata.object. Before, only a top-leveluserIdwas dropped, so aninvoice.createddelivery carried the invoice'suser_idand ROT/RUT personnummer ciphertext and last four digits, and itscustomerrow'spersonal_numberanduser_id. The same projection applies toPOST /webhook-deliveries/{id}/retry(an older delivery is re-minimised before it is sent again) and toGET /api/events. Nothing else in the payload changed; the API version date is unchanged. - Behaviour change:
journal_entry.committedfires for bulk-booked bank transactions (2026-10-07): a samlingsverifikat posted byPOST /transactions/bulk-book, the dashboard bulk booking or an approved agent (MCP) bulk booking now emitsjournal_entry.committed, like every other posted voucher. Before, those vouchers were posted without the event. Linking rows to an existing voucher (existing_journal_entry_id) posts nothing new and still emits nojournal_entry.committed; a dry run emits nothing. The payload and the API version date are unchanged. - Behaviour change:
journal_entry.committedfires for samlingsbetalningar, utlägg payouts and kursdifferens vouchers (2026-10-08): the verifikat posted byPOST /transactions/{id}/match-batch(and its dashboard and agent twins), by an expense payout (POST /expense-claims/payouts,POST /transactions/{id}/match-expense-payout), and the kursdifferens verifikat (3960/7960) a link of a foreign-currency invoice or supplier invoice to an existing payment voucher can post, now emitjournal_entry.committed. A link without a kursdifferens posts nothing new and emits nojournal_entry.committed; a dry run emits nothing. SIE imports, their undo and provider migrations stay silent on purpose: they bring in history that was posted elsewhere. The payload and the API version date are unchanged.
Webhooks: endpoint verification (2026-09)
- Behaviour change: webhook URLs must pass an ownership handshake before events are delivered (#3191, 2026-09-29). Accounted POSTs a signed
webhook.verificationevent whosedata.object.challengethe endpoint returns as{"challenge": "..."}with a 2xx within 10 seconds (contract). New webhooks startpendingand receive nothing until they pass; a changedwebhook_urlstarts over. Run the handshake with the newPOST /webhooks/{id}/verify(422 WEBHOOK_VERIFICATION_FAILEDwithdetails.reasonon a failure,429inside a 10-second cooldown); Accounted also retries on its own. - Existing webhooks keep receiving events for 30 days (
verification_status: "grace_period", end inverification_grace_ends_at) while Accounted attempts the handshake daily. A webhook still unverified after that ispaused: nothing is delivered until it passes. - Every webhook read and write response carries
verification_status,verified_at,verification_grace_ends_at,verification_attempts,verification_last_attempt_at,verification_last_errorandverification_next_attempt_at.POST /webhooks/{id}/testandPOST /webhook-deliveries/{id}/retryanswer409 WEBHOOK_NOT_VERIFIEDforpendingandpausedwebhooks.
Invoices (2026-09)
- Behaviour change:
invoice.paidandsupplier_invoice.paidwebhooks (2026-09-30): both now fire once, when an invoice becomes fully paid, on every path that settles it:/mark-paid, a bank-transaction match (/transactions/{id}/match-invoice,/match-supplier-invoice, the batch match), linking a bank transaction or an invoice to an existing voucher, the Stripe payment sync and the agent (MCP) equivalents. Before, a bank match emitted neither event (only*.match_confirmedinternally), so an invoice paid through the bank never reached subscribers; and/mark-paidalso fired them for a partial payment. A partial payment now fires neither event. The payload is unchanged and the API version date is unchanged. - Per-invoice VAT treatment (#2906, 2026-09-27):
POST /invoicesandPATCH /invoices/{id}acceptvat_treatment(standard|export|reverse_charge) anddelivery_country(ISO 3166-1 alpha-2, the country the goods are transported to), so an invoice can state its own supply instead of taking the customer's treatment. A Swedish buyer with goods shipped to Norway is now an export:vat_treatment=export,delivery_country=NOgives 0 %,moms_ruta36, revenue on 3105 and the export notice.reverse_chargewith a delivery country in another member state is an intra-EU supply of goods (0 %,moms_ruta35, revenue on 3108, the Article 138 notice) and needs the customer's VIES-validated VAT number from a member state other than Sweden.standardis Swedish VAT at the line rates. The treatment is refused, never guessed, when the facts do not support it:400 INVOICE_VAT_TREATMENT_DELIVERY_COUNTRY_REQUIRED,_DELIVERY_COUNTRY_MISMATCH,_BUYER_VAT_NUMBER_REQUIREDor_NOT_VAT_REGISTERED. The dry run and the invoice detail, create and update responses carryvat_treatment_overrideanddelivery_countrynext tovat_treatment,moms_rutaandreverse_charge_text. Nothing changes for a request without the fields.POST /invoices/bulk-createrefuses them per item. Behaviour change: avat_treatmentkey on these bodies used to be dropped silently; a value outside the three is now400 VALIDATION_ERROR. - Behaviour change: Swedish VAT for an EU business established in Sweden (#2783, 2026-09-20):
POST /invoicesandPATCH /invoices/{id}(when items are replaced) now refuse reverse charge for a customer withcustomer_type=eu_businesswhosecountryisSE, even when itsvat_numberis VIES-validated. Such an invoice used to be created at 0 % (vat_treatment=reverse_charge, ruta 39, with the reverse-charge notice); it is now created with Swedish VAT (vat_treatment=standard_25, ruta 05, no notice) and lines that omitvat_ratedefault to 25 %. This is the rule the dashboard, the MCP tools andPOST /invoices/bulk-createalready applied, and the one this page has described since the entry below: the two single-invoice routes never read the customer's country, so the same customer got 0 % here and 25 % everywhere else. A buyer established in Sweden owes Swedish VAT whatever foreign VAT number it holds (ML 6 kap. 34 §: a B2B service is taxed where the buyer is established, so reverse charge exists only when that is another member state). The response says why:meta.warningscarriesEU_BUSINESS_COUNTRY_IS_SEwithmessage_sv,message_enand aremediation, on the live call and on a dry run. Nothing is refused and no status code changed. If you relied on the old result, the customer row is what to fix: setcountryto where the buyer is actually established (PATCH /customers/{id}), or changecustomer_typetoswedish_businessif it is Swedish. A genuinely foreign customer with a validated number is unaffected and still gets reverse charge. Replacing the items of an existing draft re-decides the treatment from the customer's current row, so a draft created at 0 % under the old behaviour moves to Swedish VAT the next time its items are replaced. Invoices already sent are not touched. - VAT-treatment warnings (#2749, #2558, 2026-09-20):
POST /invoices,PATCH /invoices/{id}(when items are replaced) andPOST /invoices/bulk-create(per item) now say why the VAT treatment is what it is, without changing it. Reverse charge (0 %, ruta 39) needscustomer_type=eu_business, a VIES-validatedvat_numberand a country other than SE; when one of those is missing the draft gets Swedish VAT as before and the response carriesmeta.warnings(EU_BUSINESS_VAT_NUMBER_NOT_VALIDATED,EU_BUSINESS_VAT_NUMBER_MISSING,EU_BUSINESS_COUNTRY_IS_SE), each withmessage_sv,message_enand aremediation. A Swedish rate set explicitly on a line to a validated EU or non-EU business is still accepted (the ML 6 kap. supplies taxed where they are performed) but flagged asSWEDISH_VAT_TO_REVERSE_CHARGE_CUSTOMER/SWEDISH_VAT_TO_EXPORT_CUSTOMER. Warnings never fail a request; dry runs return the same list.meta.warningsis a new optional field on every envelope, absent when there is nothing to say.
Transactions (2026-09)
- Behaviour change: double-booking guards on categorize (2026-09-30):
POST /transactions/{id}/categorizeandPOST /transactions/batch-categorizenow run the two checks the dashboard already ran, on the live call and on a dry run, whenever the transaction has no verifikat yet. A bank line the ledger already books (a booked sibling transaction, or a verifikat booking the same amount on the bank account, such as a supplier invoice marked paid) is refused with409 TRANSACTION_BOOK_POSSIBLE_DUPLICATEand the candidate indetails.candidate. Link the transaction to that verifikat instead; only for a genuinely separate event, resend withforce: trueplusexpected_duplicate_journal_entry_id(orexpected_duplicate_transaction_id) echoing the candidate, which the live call logs in behandlingshistorik. A stale id returns409 TRANSACTION_BOOK_FORCE_CANDIDATE_MISMATCH. A plain 244x or 151x categorization that an open supplier or customer invoice covers is refused with409 TX_CATEGORIZE_SUGGEST_SI_MATCH/TX_CATEGORIZE_SUGGEST_CI_MATCH: match the invoice with/match-supplier-invoice//match-invoice, or passconfirm_no_match: trueto keep the categorization. Inbatch-categorizeeach refusal is a per-item error and the other items still book; an item is never compared with a verifikat booked earlier in the same batch. Before, both routes acceptedforce,expected_duplicate_*andconfirm_no_matchbut never ran the checks, so one bank payment could be booked twice. No field was added or removed, and the API version date is unchanged. - Behaviour change: the supplier-invoice bank match books like the dashboard (#3253, 2026-09-30):
POST /transactions/{id}/match-supplier-invoicenow plans and books the payment with the same code as the dashboard match, so the same bank row gives the same verifikat (line texts included) and the same ledger update on both. A same-currency row that pays more than the invoice's remaining balance settles the invoice in full: 2440 is cleared by the remaining balance only and the excess, up to 5 000 kr, is booked on 6570 as a bank fee, under both accounting methods. A SEK row less than 1 kr off the remaining balance of a SEK invoice (a whole-krona payment of an öre total) now settles it in full under faktureringsmetoden too, with the difference on 3740; it used to leave the invoicepartially_paidwith the öre on 2440.paid_amount,remaining_amountand the payment row record the debt settled and never exceed the invoice total. A same-currency excess above the fee cap is refused with400 MATCH_SI_AMOUNT_EXCEEDS_REMAININGand books nothing; it used to clear the whole bank amount off 2440 and pushpaid_amountpast the total. Allocate such a payment across invoices withPOST /transactions/{id}/match-batch. A cross-currency match is not capped, as before: it settles the remaining balance and books the SEK difference as kursdifferens. The plan's refusals (the overshoot, a kontantmetoden partial, a missing exchange rate) and the check that customlinesbalance now run before a conflicting categorization of the transaction is reversed; they used to run after it, so a refused request left the reversal posted. The response gainsbank_fee_sek, the SEK booked on 6570 (0 when there is none, and with customlines). The request shape is unchanged.
Customers (2026-09)
- Sole traders (enskild firma) (#2367, 2026-09-13): an
org_numbershaped like a Swedish personnummer is now accepted oncustomer_type=swedish_business. A sole trader has no separate organisationsnummer: its owner's personnummer IS the firm's org number, so the old blanket400 CUSTOMER_ORG_NUMBER_IS_PERSONALmade a real customer impossible to register as a business. The refusal now applies toeu_businessandnon_eu_businessonly, where the value cannot be an org number at all;individualis unchanged (a personnummer there is still moved intopersonal_number). The data-minimisation reason behind the old rule moved to the read paths where it belongs:GET /customersreturnsorg_numberandvat_numberasnullfor any row whoseorg_numberis a personnummer, the masking individual rows already had.GET /customers/{id}still returns the full value.
Chart of accounts (2026-09)
- Order (2026-09-11):
GET /accountsreturns accounts inaccount_numberorder, the BAS sequence it always documented. It used to sort by the storedsort_order, which is0on every account seeded at company creation, so the seeded accounts came first and the rest followed. - Class filter:
?classaccepts any digit0-9, the first digit ofaccount_number. Class9appears on internal accounts carried over from an imported chart and could not be filtered on before. - Schema: the response schema lists the
account_typevalues (untaxed_reservesincluded),normal_balanceanddefault_vat_treatment. No field was added or removed, and the API version date is unchanged. - Journal entry dry runs:
POST /journal-entries?dry_run=truenow resolves the lines' accounts against the chart and fails with400 ACCOUNTS_NOT_IN_CHARTfor a deactivated account or a non-BAS number the chart does not contain, the same verdict as the live call. A standard BAS account that is not in the chart yet still passes: the live call adds it.
OpenAPI spec and reference pages (2026-09)
- Query parameters in the spec:
/api/v1/openapi.jsonnow lists every endpoint's query parameters (filters, paginationcursor/limit, reportperiod_idand date ranges,expand) with type, requiredness and description, anddry_runon every dry-run-capable endpoint. Before, the spec carried path parameters only. - Nullable fields: nullable fields are published as
type: [T, "null"](OpenAPI 3.1). Before, they read as non-null, so a strict generated client could reject a valid response. - Reference pages: each endpoint section shows its query parameters, request body fields and response fields. New pages: Bank accounts (
/cash-accounts,/bank-connections), Skatteverket (filed VAT declarations) and Health; company settings are on Companies, vacation-year close on Salary runs. - Documentation only: no request or response changed, and the API version date is unchanged.
Reports and journal entries: dimensions (2026-09)
POST /dimensions/retagsays when lines were left untagged (2026-11-17, additive). The answer carriesoutcome(completeorpartial),failed_by_reason(every refused line counted per reason, with the first and last verifikat date) and areasonon each line infailed:period_closed,period_locked,company_lock_date,line_not_found,required_dimensionorrefused. A200was never every line tagged: readoutcome. The dry run answerstaggable_lines,blocked_linesandblocked_by_reason, so the lines a commit will leave (a closed or locked period, the bookkeeping lock date) are known before anything is written. The same lines are refused as before, with the same sentences.- Line dimensions on journal-entry reads (2026-09-28):
GET /journal-entries/{id}and thePOST /journal-entriesresponse carry each line'sdimensions({"<dim_no>": "<code>"},{}when untagged), so dimension 2, 7-9 and custom dimensions 20+ are visible;cost_centerandprojectstay as mirrors of keys1and6. The dry-run preview echoes the bag the engine stores.PATCH /journal-entries/{id}(draft edit) answersdimensionson every line. - Dimension filter on reports (2026-09-28):
GET /reports/income-statement,/reports/general-ledgerand/reports/monthly-breakdownacceptdim_no+dim_code(together) and then answerdimension_filterandpartial_view(complete: false; on the general ledgeropening_balances_included: false, everyopening_balanceis 0 under a filter). The trial balance and the statutory reports refuse the pair. - Fix: project opening balances on the filtered general ledger (2026-10-01): under
dim_no+dim_codethe general ledger'sopening_balancewas always 0, so a project's work in progress or receivable carried from last year read as zero. It is now that value's own IB: the IB lines tagged with it, or, when the year has no IB entry, its prior tagged history. The year-end close and the SIE import (#OIB) now split each balance-sheet account's IB per project (dimension 6), except the VAT accounts (26xx), whose IB stays one untagged line. Under a filter, dimensions that reset annually (kostnadsställe, dimension 1, and custom dimensions by default) and the 26xx accounts open at 0.partial_viewnow carriesopening_balances: "dimension_scoped", andopening_balances_includedstays in the body but istrue(it wasfalse). Unfiltered reports are unchanged. A bug fix: the API version date is unchanged. - Split an existing IB per project (#3313, 2026-10-03, additive):
GET /fiscal-periods/{id}/opening-balances/split-per-projectpreviews splitting the year's IB verifikat per project from the previous year's closing balances per object of the dimensions that carry across years (projekt, dimension 6): per balance-sheet account the current and the proposed lines (one per project plus an untagged remainder; the account total never changes), which accounts change, project codes missing from the registry, andblockedwhen the year does not allow it.POSTon the same path applies it as an inline rättelse of the same verifikat (the struck lines stay in the rättelse log); pass the preview'sfingerprintasexpected_fingerprint(409 OB_SPLIT_PROPOSAL_CHANGEDwhen it moved). Open, unlocked years without a bokslut only:409 OB_SPLIT_PERIOD_CLOSED,OB_SPLIT_PERIOD_LOCKED,OB_COMPANY_LOCK_DATE,OB_CORRECT_YEAR_END_EXISTS. A split already in place answersapplied: false(its?dry_run=trueanswers409 OB_SPLIT_NOTHING_TO_DO, so nothing is staged), and an account whose IB already carries a different project split, for example from SIE#OIB, is skipped (skip_reason: "existing_split"), never overwritten. The preview'schanged_amount_sekis what an API key's unattended-commit ceiling prices. MCP:gnubok_preview_opening_balance_splitand the stagedgnubok_split_opening_balances_per_project. - Behaviour change, dimension filters only: every
GET /reports/*endpoint and the årsredovisning reads under/fiscal-periods/{id}/arsredovisninganswer400 VALIDATION_ERROR(unknown_params+allowed_paramsin details) to a dimension filter they do not document (dim_no,dim_code,dimensions,project,cost_center). Before, they silently ignored it, sodim_noon the trial balance returned the unfiltered report as if it were filtered. - Ignored parameters are named (2026-09-28): any other query parameter a report does not document is still not applied and not refused; the response now names it in the
X-Ignored-Query-Paramsheader (comma-separated). Check it when a filter seems to have had no effect. If these are ever refused too, that change will be announced here first.
Reconciliation, account-keyed (2026-08)
- Accounts:
GET /reconciliation/accountslists every account with an outside truth (bank accounts asbank:<cash_account_id>, the skattekonto asskattekonto) with status;GET .../accounts/{accountKey}is the bridge (outside balance, ledger, difference, unexplained, explanatory lines, counts, latest sign-off);GET .../accounts/{accountKey}/itemsthe rows behind it, bucketed (proposed, unmatched_external, unmatched_ledger, matched, ignored, upcoming). - Links:
POST .../accounts/{accountKey}/links(pairs oruse_proposals),DELETE .../links/{linkId},POST .../items/{itemId}/ignore. Links never touch the ledger. - Verifikat settled against each other (crm#1074, 2026-10-11, additive): on a bank account in SEK a
POST .../linkspair may carry noexternal_idsand two or morejournal_entry_ids: verifikat without a bank row whose lines on the account sum to exactly zero (a wrong verifikat and the correction booked by hand). They leaveunmatched_ledgertogether and come back in the newsettled[]with asettlement_id; the items endpoint lists them undermatchedwith asettlementobject, andDELETE .../links/{settlement_id}undoes it.external_idsis now optional in the request and every links response carriessettled(empty unless such a pair was sent). New skip codesENTRY_NOT_OPENandALREADY_SETTLED.GET /reconciliation/bank/statusgainssettled_gl_entry_countandsettled_gl_line_total, and the bridge asettled_ledgerline, for a settled verifikat whose counterpart is dated outside the window;unexplained_differenceis the same before and after a settlement. Nothing is proposed for this shape anduse_proposalsnever applies it. - Sign-off:
POST .../accounts/{accountKey}/signoff("avstämt t.o.m." a date; refused with an unexplained difference unless forced with a note),GET .../signoffhistory,POST .../signoff/{signoffId}/reopen. - New scopes
reconciliation:read,reconciliation:write,reconciliation:signoff. The legacy/reconciliation/bank/*endpoints and theirtransactions:*scopes are unchanged. - Webhooks: new event types
reconciliation.matched,reconciliation.unmatched,reconciliation.signed_off,reconciliation.reopened. Additive: existing subscriptions are unaffected and the API version date is unchanged.
Reports, companies, Skatteverket, customers, transactions (2026-08, additive)
Backfilled 2026-08-26 from merged PRs. Every item is additive (new endpoints, optional fields, optional filters): the API version date stays 2026-05-12.
- Custom date ranges on reports (#1909, 2026-08-25):
GET /reports/income-statementaccepts optionalfrom_date/to_date(YYYY-MM-DD, both inside the fiscal period named byperiod_id,from_date <= to_date).GET /reports/balance-sheetis a position, so it takes onlyto_date(or its aliasas_of) and refusesfrom_date. Omit them for the whole period, as before. These routes now reject unknown query parameters with400 VALIDATION_ERROR(unknown_params+allowed_paramsin details) instead of silently returning a full-period report. - Report PDFs (#1909):
GET /reports/balance-sheet/pdfandGET /reports/income-statement/pdfreturnapplication/pdf, byte-equivalent to the dashboard export, with the sameperiod_idand range parameters. Scopereports:read. - Company creation (#1864, 2026-08-25):
POST /api/v1/companies(scopecompanies:write) creates a company and sets it up in one call: owner membership, BAS chart of accounts for the company form, compliance settings, the first fiscal period and the automatic tax deadlines. A VAT-registered company must sendmoms_period. (Since 2026-10-15 it requires and replaysIdempotency-Key: see Retries above.) - Filed VAT declarations (#1773, 2026-08-21):
GET /skatteverket/vat-declarations?period_type=&year=&period=(scopecompliance:read) reads one period's momsdeklaration as Skatteverket has it on file:submitted(SKV inlämnat) anddecided(SKV beslutat), eachnullwhen nothing is on file. Live read, requires an active Skatteverket connection on the company. - Company settings write (#1405, 2026-08-04):
PATCH /companies/{companyId}/settings(scopecompanies:write, risk medium, dry-run supported) updates bank details (bank_name,clearing_number,account_number,bankgiro,plusgiro,swish,iban,bic),contact_person,email,phone,websiteandinvoice_email_texts, with the same validation as the MCP tool. - Customer
personal_number(#1724 2026-08-20, #1788 2026-08-21):personal_numberon customer create, bulk-create, detail, PATCH and list. Accepted only forcustomer_type=individual, stored encrypted, always returned masked (********-1234); sending the masked form on PATCH means "leave unchanged",nullclears it. A personnummer-shapedorg_numberon a business customer type is refused (400 CUSTOMER_ORG_NUMBER_IS_PERSONAL); on an individual it is moved intopersonal_numberandorg_numberis cleared, or refused with400 CUSTOMER_PERSONAL_NUMBER_CONFLICTwhen it differs from apersonal_numberin the same body. - Ignore a transaction (#1661, 2026-08-29):
POST /transactions/{id}/ignore(scopetransactions:write, risk low, idempotent, dry-run supported) marks an unbooked bank transaction as ignored without writing a verifikat, so it is allowed in a locked or closed period: the path for rows that are not business events (PSD2 ghost rows, duplicates, transfers that never executed).DELETEon the same path restores the row. A booked transaction (directly, via a payment allocation, or via a voucher link) is refused with409 TX_IGNORE_ALREADY_BOOKED. In the same change,/categorizeand/batch-categorizeansweris_business: falsein a locked period with400 TX_CATEGORIZE_PRIVATE_PERIOD_LOCKED(details.suggested_action: "ignore") instead of a barePERIOD_LOCKED: a private marking is a real eget uttag / insättning booking, so the lock still applies to it. - Transactions by bank account (#1809, 2026-08-23): transaction list and detail carry
cash_account_id;GET /transactions?cash_account_id=<uuid>filters to one bank account.
Bookkeeping primitives + AP + compliance (Phase 4)
- Suppliers + supplier-invoices vertical (mirror of Phase 2 invoices on the AP side).
- Journal entries primitives:
POST /journal-entries(draft+commit),/{id}/commit,/{id}/reverse(storno) and/{id}/correct(rättelse): both satisfy BFL 5 kap 5 § (storno is the canonical method of rättelse),/batch-create. - Voucher gap explanations:
POST /voucher-gap-explanationsper BFNAR 2013:2. - Fiscal-periods ops:
/lock,/closeand/opening-balancesare synchronous and return 200 with the updated period;/year-endand/currency-revaluationare async and return 202 with operation_id (poll atGET /api/v1/operations/{id}). - Compliance check:
GET /compliance/check?type={year_end_readiness|voucher_gaps}: pre-flight findings before submission. - Documents:
POST /documents(multipart upload, magic-number-checked),GET /{id}/download(15-min signed URL),POST /{id}/link(attach to journal entry).
Payroll + reports + import (Phase 5)
- Employees: full CRUD with personnummer masking on list/create per GDPR Art.5(1)(c). Soft-delete via
is_active. - Salary runs: CRUD + lifecycle verbs
/calculate,/approve,/mark-paid,/book,/generate-agi. State machine: draft → review → approved → paid → booked./generate-agiproduces and persists the arbetsgivardeklaration XML: the response carries it asdata.xmlfor the integrator to upload to Skatteverket Mina Sidor (or via the optionalskatteverketextension). Accounted does NOT auto-submit; the AGI deadline: the 12th of the following month for every reporting period EXCEPT January and August, where companies with annual turnover ≤ 40 MSEK get the 17th: is the integrator's responsibility. - JSON reports (13): trial-balance, balance-sheet, income-statement, general-ledger, journal-register, vat-declaration, monthly-breakdown, ar-ledger, supplier-ledger, continuity-check, salary-journal, avgifter-basis, vacation-liability.
- Binary report:
GET /reports/sie-export(text/plain SIE4 file). Note: a SIE4 export alone does NOT satisfy BFL 7 kap archiving obligations: SIE captures account-level positions and verifikationer but lacks system documentation and behandlingshistorik. Treat SIE as a portability format (Fortnox/Visma/Bokio migration), not as a complete archive. - Async imports:
POST /imports/sie(multipart, 50 MB),POST /imports/bank(multipart, 10 MB, auto-format detection across 12 bank formats). Both async viaoperationssubstrate. Post-SIE-import warning: SIE files do NOT carry VAT codes or tax-rate-to-account mappings, AND they do NOT transfer behandlingshistorik (the source system's processing log required by BFNAR 2013:2 kap 8 §) or systemdokumentation. After importing from Fortnox / Visma / BL / SpeedLedger / Bokio you MUST manually reconfigure VAT codes (typically via/settings/tax-codes) before the first momsdeklaration; skipping this step is the most common source of incorrect VAT submissions in migrated bookkeeping. The behandlingshistorik gap must be preserved separately: under BFNAR 2013:2 kap 8 § the obligation attaches to the entire räkenskapsår, not from the import date forward. Best practice for a mid-year migration: export the source system's behandlingshistorik for the full fiscal year and archive it alongside the SIE file. Accounted starts a fresh behandlingshistorik from the import date forward; the pre-import portion of the year remains the source system's record.
2026-05-15: Webhooks (Phase 6 PR-1)
- Subscriptions:
POST /webhooks(HMAC secret returned exactly once), GET list + detail, PATCH, DELETE. Per-event-type elevated scope check (salary_run.*andagi.generatedrequirepayroll:read). - Delivery substrate: dispatched immediately after the event is enqueued, with a per-minute Vercel cron at
/api/webhooks/dispatch/cronas the retry and sweep path. Due rows are claimed atomically via theclaim_due_webhook_deliveriesSQL function (FOR UPDATE SKIP LOCKED), with*.pg.test.tscoverage for the claim path and the webhook DB triggers. Exponential backoff1m / 5m / 30m / 2h / 12h / 24h / 48h(7 retries, ~87h total). HTTP 410 from receiver auto-disables the webhook. - Signature:
X-Gnubok-Signature: t=<unix>,v1=<hex-HMAC-SHA256>. Stripe-format. Sample receivers in Node + Python. - SSRF protection: webhook_url must be HTTPS; resolved IPs in private/loopback/link-local/CGNAT/cloud-metadata ranges are rejected at create AND dispatch time. Dispatch pins the validated IP through a DNS-rebinding-safe
node:https.requestagent (lib/webhooks/pinned-fetch.ts); redirects are refused on every outbound POST (any 3xx is treated as a blocked redirect). - Audit + retention: webhook delivery rows are behandlingshistorik per BFNAR 2013:2 kap 8 §: immutable once terminal so the audit trail of what an integration was notified of stays intact. Delivery rows are NOT räkenskapsinformation themselves; the 7-year statutory retention under BFL 7 kap 1 § applies only to the underlying verifikation / faktura / AGI XML in its own table, NOT to the delivery envelope. Accounted keeps accounting-event delivery rows for 7 years as a voluntary operational policy (the duration aligns with BFL 7 kap on the underlying records but is not itself a statutory obligation on delivery rows). Webhook DELETE preserves the delivery audit trail (
ON DELETE SET NULLonwebhook_id). Webhook lifecycle events (create / update / delete, plus dispatcher auto-disable) each write a V16audit_logentry. - Verbs:
POST /webhooks/{id}/testenqueues a synthetic event;POST /webhook-deliveries/{id}/retryre-enqueues a dead/delivered delivery.
Coming soon (Phase 6 PR-2 hardening)
- 90-day TTL cleanup cron for non-accounting webhook deliveries
- Per-route rate limits on
:test,:retry, and webhook:create - Populated
previous_attributesfor update-style webhook events