# Fortnox — Accounting API: gotchas

> Canonical URL: https://developers.apideck.com/apis/accounting/fortnox/gotchas

## GET /accounting/journals

Use `code` as `journal_symbol` when creating a journal entry — it is the same series letter (e.g. "A") used there. `type` is derived from whether the series is manually posted to: manual series report as `general`, and every other series (invoice series, and any other automated series) reports as `other`, since Fortnox does not expose a specific sales/purchase/cash/bank category for non-manual series; `allow_vat` and `currency` are not exposed and are always absent.

## GET /accounting/fiscal-periods

Fortnox exposes financial years only, so every record has `type: year` and `period_number` is null. `name` and `fiscal_year` are the year in which the financial year ends. `status` comes from the company's locked period: `locked` when the year ends on or before it, otherwise `open`; a lock date inside a year leaves it `open`. Fortnox lets an administrator lock a period for some or all users and returns one date without saying which, so `closed` is never returned. `locked_through` is the locked date capped at the year's end, when it is on or after the year's start, otherwise null. Reading the locked period needs the opt-in Fortnox `settings` scope, which connections do not request by default: a connection authorized without it gets `status` and `locked_through` null. Connections store the scopes Fortnox granted and skip the locked period call when `settings` is not among them; connections authorized before that was stored try the call and treat Fortnox error code 2000663 (no access to the scope) as the same case.

## GET /accounting/tracking-categories

Fortnox has multiple analytic dimensions (`projects`, `cost-centers`, `DimAx1-3`). The unified
`tracking-categories` resource exposes a **single** dimension (`projects`) to keep ids unambiguous.

If you need values from another dimension, or values from multiple dimensions in one response, use
`?raw=true` to retrieve the raw Fortnox payload and inspect the dimension you need. Note that
Fortnox category codes are unique only within a dimension -- e.g. code `"100"` may exist on both
`projects` and `cost-centers` and refer to different things. The unified id is the project number
only; cross-dimension uniqueness is not guaranteed when raw-mode-merging happens client-side.

For multi-dimension awareness in the unified API, see the upcoming `analytic-plans` /
`analytic-categories` resources (parallel-resource path; non-breaking to this endpoint).

## GET /accounting/sales-orders

Sales orders are Fortnox customer orders (`/3/orders`, scope `order`). `status` is derived: `cancelled` when the order is cancelled, `invoiced` once an invoice has been created from it (`invoice_id` then carries that invoice's number), `open` when it has been sent or marked not completed, otherwise `draft`. `quote_id` is the offer the order was created from, when any. Fortnox has no timestamps on orders, so `created_at`/`updated_at` are not returned; `filter[updated_since]` uses Fortnox's `lastmodified` and is accurate to the minute.
The list returns Fortnox's order headers only: `line_items`, amounts other than `total`, addresses, references and memos come back on get-by-id. On the list `status` can only be `cancelled`, `open` or `draft`; whether an order has been invoiced is visible on get-by-id (`invoiced`, with `invoice_id`). `po_number` is the customer's order number (*Your order number*); `reference` is not returned.

## POST /accounting/sales-orders

`customer.id` (the Fortnox customer number) is required; Fortnox assigns `number`. Lines take `item.id` (or `code`) as the article number, `quantity`, `unit_price`, `unit_of_measure`, `tax_rate.rate` (the VAT percentage) and `discount_percentage`; a line without an article needs `description` and `ledger_account.code`. Totals and tax are computed by Fortnox. `po_number` is written as the customer's order number (*Your order number*); `reference` is not written. `status` is not written on create — an order starts as a draft; cancel it with `DELETE`. Address `string` holds the street line, as on Invoices.

## PATCH /accounting/sales-orders/{id}

Updates are a PUT of the fields you send, and Fortnox replaces the whole row list with the `line_items` you send: include every line you want to keep (with its `line_items[].id`, the Fortnox row id), because lines you omit are removed. An order that has been invoiced or cancelled cannot be updated.

## DELETE /accounting/sales-orders/{id}

Fortnox does not delete orders. `DELETE` cancels the order (it stays readable with `status: cancelled`), as with Invoices on this connector.


[API reference](https://developers.apideck.com/apis/accounting/reference.md) · [Coverage matrix](https://developers.apideck.com/apis/accounting/coverage)
