NONOX Connect API · v1.1.0 · OpenAPI 3.1
API reference
The public API of NONOX Ekonomisystem, an open-source Swedish bookkeeping system.
Authentication. Apps use OAuth 2.0 authorization code with PKCE (S256 is required for every client; implicit, password, client credentials and device grants do not exist). An owner or administrator approves the app on the Swedish consent screen with a passkey and chooses one company. Access tokens live at most 15 minutes; refresh tokens rotate on every use, and a refresh token (or authorization code) used twice revokes the whole grant. Scripts use API keys (nnx_…) created under Anslutningar: one company, chosen scopes, mandatory expiry, optional IP allowlist, shown once and stored hashed. Send either as Authorization: Bearer …; cookies are never accepted.
One company per credential. Every token and key belongs to exactly one company. Another company's ids answer 404. While NONOX Connect is turned off for the company, every call answers 404. An archived company can only be read.
Effective rights. A request may do what its scopes allow AND what the person who granted the app or created the key may do in the company right now, evaluated on every request. A changed role reduces access at once; a person who leaves the company takes the credential's access with them.
Rate limits. Per credential 120 requests/minute, per company 600/minute, and 600/minute per IP address before authentication (operators can change these). Every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; 429 adds Retry-After.
Idempotency. Every POST requires an Idempotency-Key, kept 24 hours per credential.
Errors are RFC 9457 application/problem+json with a stable code and a Swedish detail.
Money is integer öre (1 SEK = 100 öre) in fields ending in _ore. Dates are ISO 8601.
Versioning. The version is in the path (/v1). Within v1 changes are additive only (new endpoints, new optional fields, new enum values in responses); anything breaking gets /v2, with v1 kept alongside.
Webhooks (described under webhooks) are set up under Anslutningar by an owner or administrator with a passkey: an https address on the internet, chosen events and a signing secret shown once. Deliveries carry Nonox-Signature: t=<unix>,v1=<hex HMAC-SHA256 of "<t>.<body>"> and Nonox-Event-Id, are sent after the change has committed, and are retried for about a day. Addresses that resolve to private, loopback, link-local, CGNAT or multicast networks are refused.
Booking routes. Issuing an invoice, registering a supplier invoice and registering a payment post a voucher as the person behind the credential, so they need vouchers:create and vouchers:post as well (x-required-scopes).
Revocation. An app revokes its own grant with POST /oauth/revoke (RFC 7009).
Test companies. An operator (php artisan connect:test-company <email>) or an owner under Anslutningar can create a clearly marked test company with demo data to try the API against. It never e-mails documents.
This reference is generated from openapi.yaml (also as openapi.json), the same file the tests check every route against. Load it into Postman, Insomnia or a client generator.
https://nonox.app/api/v1
Company
The company the credential belongs to.
| Endpoints | Does | Scope |
|---|---|---|
GET/company |
Get the company | – |
Bookkeeping
Reference data for bookkeeping: chart of accounts, VAT codes, fiscal years and voucher series.
| Endpoints | Does | Scope |
|---|---|---|
GET/accounts |
List the chart of accounts | vouchers:view |
GET/accounts/{number} |
Get an account | vouchers:view |
GET/vat-codes |
List VAT codes | vouchers:view |
GET/fiscal-years |
List fiscal years | vouchers:view |
GET/fiscal-years/{fiscalYear} |
Get a fiscal year | vouchers:view |
GET/fiscal-years/{fiscalYear}/periods |
List the months of a fiscal year and their lock status | vouchers:view |
GET/fiscal-years/{fiscalYear}/sie |
Export a fiscal year as SIE 4 | export:sie |
GET/voucher-series |
List voucher series | vouchers:view |
Vouchers
Vouchers: drafts, posting, corrections and attachments (underlag). A posted voucher is immutable.
| Endpoints | Does | Scope |
|---|---|---|
GET/vouchers |
List vouchers | vouchers:view |
POST/vouchers |
Create a voucher draft | vouchers:create |
GET/vouchers/{voucher} |
Get a voucher | vouchers:view |
PATCH/vouchers/{voucher} |
Change a voucher draft | vouchers:create |
DELETE/vouchers/{voucher} |
Delete a voucher draft | vouchers:create |
POST/vouchers/{voucher}/post |
Post a voucher | vouchers:post |
POST/vouchers/{voucher}/correct |
Correct a posted voucher | vouchers:correct |
GET/vouchers/{voucher}/attachments |
List a voucher's attachments | vouchers:view |
POST/vouchers/{voucher}/attachments |
Add an attachment | vouchers:create |
GET/vouchers/{voucher}/attachments/{attachment}/content |
Download an attachment | vouchers:view |
Customers
The customer register.
| Endpoints | Does | Scope |
|---|---|---|
GET/customers |
List customers | invoices:view |
POST/customers |
Create a customer | invoices:create |
GET/customers/{customer} |
Get a customer | invoices:view |
PATCH/customers/{customer} |
Change a customer | invoices:create |
Suppliers
The supplier register.
| Endpoints | Does | Scope |
|---|---|---|
GET/suppliers |
List suppliers | supplier-invoices:create supplier-invoices:approve |
POST/suppliers |
Create a supplier | supplier-invoices:create |
GET/suppliers/{supplier} |
Get a supplier | supplier-invoices:create supplier-invoices:approve |
PATCH/suppliers/{supplier} |
Change a supplier | supplier-invoices:create |
Cost centres and projects
Cost centres (SIE dimension 1) and projects (dimension 6).
| Endpoints | Does | Scope |
|---|---|---|
GET/cost-centers |
List cost centres | vouchers:view |
POST/cost-centers |
Create a cost centre | accounts:manage |
GET/cost-centers/{costCenter} |
Get a cost centre | vouchers:view |
PATCH/cost-centers/{costCenter} |
Rename or deactivate a cost centre | accounts:manage |
GET/projects |
List projects | vouchers:view |
POST/projects |
Create a project | accounts:manage |
GET/projects/{project} |
Get a project | vouchers:view |
PATCH/projects/{project} |
Rename or deactivate a project | accounts:manage |
Reports
Trial balance, general ledger, balance sheet and income statement as JSON.
| Endpoints | Does | Scope |
|---|---|---|
GET/reports/trial-balance |
Trial balance (saldobalans) | reports:view |
GET/reports/general-ledger |
General ledger (huvudbok) | reports:view |
GET/reports/balance-sheet |
Balance sheet (balansrapport) | reports:view |
GET/reports/income-statement |
Income statement (resultatrapport) | reports:view |
VAT
VAT periods and the VAT return per period (read-only).
| Endpoints | Does | Scope |
|---|---|---|
GET/vat-periods |
List the VAT periods of a fiscal year | vat:prepare |
GET/vat-return |
Get the VAT return of a period | vat:prepare |
Articles
The article register.
| Endpoints | Does | Scope |
|---|---|---|
GET/articles |
List articles | invoices:view |
POST/articles |
Create an article | invoices:create |
GET/articles/{article} |
Get an article | invoices:view |
PATCH/articles/{article} |
Change an article | invoices:create |
Customer invoices
Customer invoices: drafts, issuing, e-mail, credit, payments and PDF. An issued invoice never changes.
| Endpoints | Does | Scope |
|---|---|---|
GET/invoices |
List customer invoices | invoices:view |
POST/invoices |
Create a draft invoice | invoices:create |
GET/invoices/{invoice} |
Get a customer invoice | invoices:view |
PATCH/invoices/{invoice} |
Change a draft invoice | invoices:create |
POST/invoices/{invoice}/issue |
Issue (book) a draft invoice | invoices:send vouchers:create vouchers:post |
POST/invoices/{invoice}/send |
E-mail an issued invoice | invoices:send |
POST/invoices/{invoice}/credit |
Start a credit invoice | invoices:credit |
POST/invoices/{invoice}/payments |
Register a payment | payments:create vouchers:create vouchers:post |
GET/invoices/{invoice}/pdf |
Download the invoice as PDF | invoices:view |
Supplier invoices
Supplier invoices: drafts, file, registering, approval with segregation of duties and payment.
| Endpoints | Does | Scope |
|---|---|---|
GET/supplier-invoices |
List supplier invoices | supplier-invoices:create supplier-invoices:approve payments:create |
POST/supplier-invoices |
Create a draft supplier invoice | supplier-invoices:create |
GET/supplier-invoices/{supplierInvoice} |
Get a supplier invoice | supplier-invoices:create supplier-invoices:approve payments:create |
PATCH/supplier-invoices/{supplierInvoice} |
Change a draft supplier invoice | supplier-invoices:create |
DELETE/supplier-invoices/{supplierInvoice} |
Delete a draft supplier invoice | supplier-invoices:create |
POST/supplier-invoices/{supplierInvoice}/file |
Add the invoice file | supplier-invoices:create |
POST/supplier-invoices/{supplierInvoice}/register |
Register a supplier invoice | supplier-invoices:create vouchers:create vouchers:post |
POST/supplier-invoices/{supplierInvoice}/approve |
Approve (attest) a supplier invoice | supplier-invoices:approve |
POST/supplier-invoices/{supplierInvoice}/payments |
Register a supplier payment | payments:create vouchers:create vouchers:post |
Payments
Incoming and outgoing payments, read-only.
| Endpoints | Does | Scope |
|---|---|---|
GET/payments |
List incoming payments | invoices:view |
GET/supplier-payments |
List supplier payments | supplier-invoices:create supplier-invoices:approve payments:create |
Webhooks
voucher.posted, invoice.sent, invoice.paid and supplier_invoice.approved are sent to your https address after the bookkeeping is saved, signed with HMAC-SHA256. The webhook guide shows how to verify the signature in PHP, JavaScript and Python.