maesn
Coming soon

The Fiken API, explained for teams building for Norway

Fiken is a Norwegian online accounting system from Fiken AS, aimed at making accounting easy for small businesses. If your customers in Norway keep their books in Fiken, here is how its API handles authentication, invoices and sales, the way to production status, the rules for requests and EHF e-invoices, as the vendor documents it. The maesn integration is coming soon.

YOUR PRODUCT+28
Trusted by winning software teams
HubSpotTipaltiPaywiseRallyQredNordhealthFindityFintoClockinHEROHolviLanes & PlanesAgicapHubSpotTipaltiPaywiseRallyQredNordhealthFindityFintoClockinHEROHolviLanes & PlanesAgicap
The system

What Fiken does for Norwegian businesses

Fiken is an online accounting system that helps businesses with their bookkeeping and the work around it, such as time tracking, salary payments and invoicing.

Fiken is made for businesses, from the sole proprietorship (enkeltpersonforetak) run as a hobby next to a job to the limited company (AS) with several employees. Accountants are a target group of their own.

Function areas
  • Invoicing

    Recurring invoices can go out automatically, and Fiken can send reminders when a customer has forgotten to pay.

  • Purchases and receipts

    Take a photo of a receipt with the Fiken app, and Fiken suggests how to record the purchase.

  • Bank

    Connected to the bank, Fiken fetches purchases and sales from the account into the bookkeeping.

  • Tax return and annual accounts

    Fiken can fill in the tax return from the bookkeeping, for a limited company also the annual accounts, and gives notice when deadlines approach.

  • Payroll

    Salaries for the owner and the employees are paid out from Fiken.

  • Accountants

    A company can hand its bookkeeping to an accountant, who gets a status page across all clients and a reconciliation module.

The API

How the Fiken API is built

Every address of the Fiken API starts with https://api.fiken.no/api/v2. Connections need TLS, the API takes and returns JSON, and attachments are uploaded as files.

After the base address, every endpoint for a company's data begins with /companies/{companySlug}, the slug that names the company. GET /companies returns the companies a user has access to, and the user decides in Fiken which of them an app may reach.

A successful POST usually answers 201 with an empty body and a Location header for what was created.

How Fiken writes valuesFrom the vendor's API documentation
Amount
"gross":
5000cents

50.00 in the invoice currency, NOK by default. Amounts count cents, and fractions are ignored.

Account
"customerAccountCode":
1500Account:20001Reskontro

Account 1500 with the reskontro 20001, the sub-ledger account of one customer; a supplier's runs under 2400. A plain account has four digits, such as 3020.

Date
"issueDate":
2018Year-04Month-03Day

A date in the form yyyy-MM-dd, without a time of day. An object's last change, lastModifiedDate, has the same form, except on time entries and time users, which carry a timestamp.

The vendor's OpenAPI specification, the machine-readable description of the API, lists 191 operations in 24 groups. Fiken writes that it built the API mainly to create invoices and general journal entries, with a search service for company data such as customers and suppliers.

What the API reaches191 operations in 24 groups, counted in the vendor's OpenAPI specification and sorted by area
  • Selling108 operations
    • Sales26
    • Invoices20
    • Credit notes16
    • Offers14
    • Order confirmations14
    • Recurring invoices11
    • Products6
    • Customer groups1
  • Buying31 operations
    • Purchases25
    • Inbox4
    • EHF documents2
  • Ledger and bank18 operations
    • Journal entries7
    • Transactions3
    • Bank accounts3
    • Accounts2
    • Account balances2
    • Bank balances1
  • Time and projects18 operations
    • Time entries6
    • Projects5
    • Activities5
    • Time users2
Shared by all areas16 operations
  • Contacts13
  • Companies2
  • User1
Invoices and sales

Where an invoice lands in Fiken

Revenue reaches Fiken in two ways. When the invoice document and the invoice number were created outside Fiken, Fiken's endpoint for a sale applies, Annet salg (other sale) in Fiken. Otherwise the invoice endpoints apply, and Fiken issues the invoice itself.

Two ways to book a sale

… stands for https://api.fiken.no/api/v2/companies/{companySlug}

Your product records a sale

Fiken issues the invoice

Fiken numbers the invoice and can send it

  1. POST…/invoices/drafts

    Creates an invoice draft

  2. POST…/invoices/drafts/{draftId}/createInvoice

    Creates the invoice from the draft

  3. POST…/invoices/send

    Sends the invoice to the customer

Numbering starts with POST …/invoices/counter: with an empty request the first invoice number is 10001, or the company sets another starting value.

The invoice can also be created in one request, POST …/invoices, the same as a new invoice (Ny faktura) in Fiken. Sending stays a request of its own.

Invoice issued elsewhere

Annet salg in Fiken, with your own invoice number

  1. POST…/sales

    Creates the sale, with the invoice document and number from outside Fiken

  2. POST…/sales/{saleId}/payments

    Creates a payment for the sale

Purchases have their own endpoint, POST …/purchases, and like sales and invoices they can start as a draft. A purchase can carry its documentation as an attachment:

  • an uploaded file
  • a document from the inbox
  • a received EHF document, an incoming e-invoice already in Fiken

A deleted sale stays in the books. PATCH …/sales/{saleId}/delete asks for a description, adds counter postings that null out the original postings in the same transaction and sets the deleted flag. Purchases and transactions work the same way.

A payment is removed only while it is open; a closed one gets counter postings, so the audit trail is kept.

Access

OAuth and company access in the Fiken API

The Fiken API offers two ways to authorise requests, and Fiken sets who may use which: a third party that integrates on behalf of its customers must use OAuth 2.0.

After the user's consent, an OAuth app holds an access token and a refresh token. The refresh token stops working once the user withdraws consent, and the Revoke Token endpoint ends the grant with both tokens.

Which companies an app can reach
One Fiken user
  • Company AShared with the app
  • Company BShared with the app
  • Company CNot shared
  • Company DCreated after consent: the user adds it by hand

The user manages these companies in the security settings of the Fiken account and can revoke access to any of them.

Two ways to authorise
Personal API token
Who may use itA Fiken customer, for its own solutions. In third-party software it breaks Fiken's terms of service and may end API access immediately.
How it worksCreated in the Fiken account and sent as a bearer token
Lifetime and revocationNever expires, revoked where it was created
OAuth 2.0 app
Who may use itRequired for third parties that integrate on behalf of their customers
How it worksThe user consents in Fiken, and the app receives an access token and a refresh token
Lifetime and revocationThe Revoke Token endpoint ends the grant and both tokens

An app on the user's device cannot keep a secret, so Fiken asks it to register as a public client with PKCE, a proof at every login that the same app started the flow.

A public client's refresh token changes with every refresh; reusing an old one can make Fiken revoke the whole chain, and an unused one expires after 90 days.

Going live

From test company to production status

During development, a Fiken app works with up to five users. For more users and production status, the developer writes to Fiken by email, and Fiken asks that a third-party integration onboards two to three real users first.

Five users, then production status
Development: up to 5 users
  1. User 1
  2. User 2
  3. User 3
  4. User 4
  5. User 5
2 to 3 real users before the request
Production status

Requested by email to Fiken. With it, the app works with more than 5 users.

Before the first user
  1. Without a Fiken account: create a free test company outside the Brønnøysund Register

  2. Tick the developer box in the Fiken profile

  3. Create an app and receive its Client ID and Client Secret

Development can run in a free test company, created in Fiken without an entry in the Brønnøysund Register. Fiken asks for a name that marks it clearly as a test and grants free access beyond the 30-day trial on request by email.

For a real company registered in the Brønnøysund Register, the API is an add-on module that the company orders itself in Fiken. According to Fiken, use on live data normally comes with a fee for the company.

Rules for requests

Fiken API rules for requests and retries

Fiken allows only one concurrent request, so requests go one after the other. Concurrent requests may receive a 429 error response, a client that breaks the rule may be banned, and lifting a ban takes a message to Fiken.

The rules at a glanceFrom the vendor's API documentation
Concurrent requests
One. Concurrent requests may receive a 429 error response.
Speed
Requests may be slowed above 4 per second.
Page size
25 by default, 100 at most, set with pageSize; page picks the page. Fiken-Api-Page-Count and Fiken-Api-Result-Count report pages and elements.
Changes
A lastModified filter on nine lists: a date on eight, a timestamp on time entries.

For retries, every POST except the report endpoint /products/salesReport accepts an Idempotency-Key header, so a request repeated after a timeout or network error creates or sends nothing twice.

The PATCH operations that delete, mark a sale or purchase as settled without payment (settled) or write a sale off (writeOff) ignore the header, because repeating one of them returns the same result as the first call.

Retrying with an Idempotency-Key
POSThttps://api.fiken.no/api/v2/companies/{companySlug}/salesIdempotency-Key: <your key, up to 255 characters>
Same key, same body: the original status code and Location header, without a body and with the header Idempotent-Replayed: true. Nothing is created or sent again.
Idempotent-Replayed: true
Same key with a different body or URL
422
The first request with this key is still being processed
409
A body that is malformed or larger than 10 MB
400
The first request failed with a 4xx or 5xx, so the key was not stored
Processed as a new request

Each key is scoped to the company and the API client and kept for one year.

The API documentation describes no webhooks. Changed objects are found through the lastModified filter; lastModifiedGe, for example, returns objects changed on or after a given point.

Norwegian specifics

EHF, eFaktura and Norwegian bookkeeping in the Fiken API

When an invoice is sent with the method auto, Fiken chooses the channel from what is registered for the customer. EHF is the electronic invoice to businesses; eFaktura is the electronic invoice that reaches the customer's online bank.

According to Fiken, new rules for e-invoicing in Norway mean that from 1 January 2027, invoices to businesses that can receive EHF have to be sent as EHF instead of PDF.

How the method auto picks the channel

Fiken sends the invoice to the first channel in this order that is available for the customer.

  1. EHF

    Needs the customer's organisation number and a supported currency.

  2. eFaktura

    Needs an approved eFaktura agreement for the company that sends the invoice. For each invoice Fiken checks whether the customer has accepted eFaktura in their online bank.

  3. SMS

    To the customer's phone number, unless the request gives another.

  4. Email

    Last in Fiken's order of priority.

Fiken moves on to the next channel when the one before is not available for this customer.

LetterPrinted and posted by Fiken's postal partner, for addresses in Norway only, at an extra charge per letter. Not part of the auto order; it is chosen by name.

An EHF needs the receiver's organisation number from the Brønnøysund Register; the send request takes one and otherwise uses the number stored for the customer. On invoice lines VAT is given as a type, most commonly HIGH for the high rate, or as a percentage, while the postings of a transaction carry VAT codes, which Fiken bases on the VAT codes of Sticos.

Received EHF documents
unprocessed
  • through the APIusedAttached as documentation to a purchase, sale or journal entry
  • in FikenprocessedBooked as a purchase
  • in FikendeletedRemoved from the inbox

unprocessed: received and still in the inbox. Through the API an EHF document can only be attached; it is booked or deleted in Fiken. GET …/ehf lists the documents, and the raw EHF XML can be downloaded.

With maesn

How the maesn Unified API will cover Fiken

You integrate once against the maesn Unified API and reach 30+ ERP and accounting systems.

Connect once and sync data the exact same way with every system you need to support: one integration, one data model, one authentication flow.

Once the Fiken integration is live, you reach it through the same Unified API as every other system.

The Unified API for connected systems
Trusted by

Fintechs already build their integrations on maesn

Companies including Tipalti, Agicap, Findity and Rally rely on maesn to connect their products to Europe's ERP and accounting landscape.

Maesn is built and hosted in Germany, is ISO 27001 certified and GDPR compliant and passes API calls between your system and the target platform in real time without storing customer data.

If your customers in Norway work with Fiken, tell us which data your product needs.

Fiken FAQ

Fiken API questions

Is the Fiken integration available on maesn today?

The integration is coming soon. Until then there is no object coverage to show and no endpoint to call. This page follows the vendor's documentation. We update and extend it once the integration is live. If Fiken is on your roadmap, book a call.

What is Fiken?

Fiken is a Norwegian online accounting system from Fiken AS, aimed at making accounting easy for small businesses. It addresses sole proprietorships, limited companies, holding companies, associations and accountants. According to the vendor's website, more than 140.000 companies use Fiken, around 25.000 of them with the help of an accountant.

Is the Fiken API included in a Fiken subscription?

No. On Fiken's price page the API is an add-on module, which each company orders itself in Fiken. According to the API documentation, use in production on live data normally comes with a fee for the company. To test the API free of charge, Fiken points to a test company outside the Brønnøysund Register.

How does authentication work in the Fiken API?

Third parties integrating on behalf of their customers must use OAuth 2.0. The user consents in Fiken, the app receives an access token and a refresh token, and the user decides which companies the app reaches. Personal API tokens serve a customer's own solutions; using them in third-party software violates Fiken's terms of service.

What can you do with the Fiken API?

According to Fiken, the API is built mainly to create invoices and general journal entries, with a search service for company data such as customers and suppliers. The OpenAPI specification lists 191 operations in 24 groups. Revenue goes in as an invoice from Fiken or as a sale with an invoice from elsewhere.

Does Fiken send webhooks?

The API documentation describes no webhooks. Changes are found through a lastModified filter, which nine lists accept: contacts, journal entries, transactions, invoices, credit notes, products, sales and purchases with a date, time entries with a timestamp. lastModifiedGe returns what changed on or after that point.

What are the rate limits of the Fiken API?

Fiken allows only one concurrent request. Concurrent requests may get a 429 error response, a client that breaks the rule may be banned, and calls may be slowed above four requests per second. For safe retries after a timeout, every POST except /products/salesReport accepts an Idempotency-Key header.

How does an integration get production status with Fiken?

An integration that needs more than five users requests production status by email to Fiken. Until then an app works with up to five users, and Fiken asks third-party integrations to onboard two to three real users during development before sending that email.

Sources: fiken.no, hjelp.fiken.no, api.fiken.no