PHPackages                             friendsofapi/fortnox - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. friendsofapi/fortnox

ActiveLibrary[API Development](/categories/api)

friendsofapi/fortnox
====================

An API client for Fortnox.se

0.2.4(5y ago)59852[1 issues](https://github.com/FriendsOfApi/fortnox/issues)MITPHPPHP ^7.1CI failing

Since Oct 18Pushed 5y ago3 watchersCompare

[ Source](https://github.com/FriendsOfApi/fortnox)[ Packagist](https://packagist.org/packages/friendsofapi/fortnox)[ RSS](/packages/friendsofapi-fortnox/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (5)Dependencies (10)Versions (7)Used By (0)

FriendsOfApi Fortnox
====================

[](#friendsofapi-fortnox)

[![Latest Version](https://camo.githubusercontent.com/4f4110590935f6a68229d62a5611867320b4245916df4fbfcde254a00d156ed7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f467269656e64734f664170692f666f72746e6f782e7376673f7374796c653d666c61742d737175617265)](https://github.com/FriendsOfApi/fortnox/releases)[![Build Status](https://camo.githubusercontent.com/23c2a3627e74c3f4ccf1624254a8c3bf5289164e62c9089b1e78fcf9e2b0651c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f467269656e64734f664170692f666f72746e6f782f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/FriendsOfApi/fortnox)[![Code Coverage](https://camo.githubusercontent.com/4251f9da8277f278067ea33d3027f9cfa523302d91b766e2fce1d4d6b3545ed6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f467269656e64734f664170692f666f72746e6f782e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/FriendsOfApi/fortnox)[![Quality Score](https://camo.githubusercontent.com/a5f830581674780880968054c553f0d52cf2b9c25ea9fa61417cafdf667cb38d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f467269656e64734f664170692f666f72746e6f782e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/FriendsOfApi/fortnox)[![Total Downloads](https://camo.githubusercontent.com/50ad5795628dcf67f75642efd51b57865cbffb0cb43b0fb26185007aba00cc9c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667269656e64736f666170692f666f72746e6f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/friendsofapi/fortnox)

Install
-------

[](#install)

Via Composer

```
composer require friendsofapi/fortnox
```

Usage
-----

[](#usage)

You need to follow the steps described on to get an access token. Once you got that token you can start playing with the API client.

```
$apiClient = new ApiClient();
$total = $apiClient->stats()->total();
echo $total->getCount(); // 22;
```

Errors
------

[](#errors)

See a list of error codes on [Fortnox](https://developer.fortnox.se/documentation/general/errors/).

Develop
-------

[](#develop)

APIs are usually split into categories, called **Resources**. In your implementation you should also reflect these categories, for example by having their own classes in `Api/`. Let's take a look at `Api/Stats` in our case. The response of any call should be an object in `Model/Stats/X`, like `Model/Stats/Total`.

### Hydrator

[](#hydrator)

The end user chooses which hydrator to use. The default one should return domain objects.

### Request builder

[](#request-builder)

The request builder creates a PSR-7 request with a multipart stream when necessary If the API does not require multipart streams you should remove the `RequestBuilder`and replace it with a `RequestFactory`.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~137 days

Recently: every ~161 days

Total

6

Last Release

2081d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/401ccc5eea13c60cf807ae982af00e368e2166e2f26d8eb541dcd881a57385bc?d=identicon)[Nyholm](/maintainers/Nyholm)

---

Top Contributors

[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (13 commits)")[![aradoje](https://avatars.githubusercontent.com/u/30075502?v=4)](https://github.com/aradoje "aradoje (2 commits)")[![kaszim](https://avatars.githubusercontent.com/u/12778025?v=4)](https://github.com/kaszim "kaszim (1 commits)")

---

Tags

api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/friendsofapi-fortnox/health.svg)

```
[![Health](https://phpackages.com/badges/friendsofapi-fortnox/health.svg)](https://phpackages.com/packages/friendsofapi-fortnox)
```

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[m4tthumphrey/php-gitlab-api

GitLab API v4 client for PHP

9485.4M64](/packages/m4tthumphrey-php-gitlab-api)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[deeplcom/deepl-php

Official DeepL API Client Library

2616.2M66](/packages/deeplcom-deepl-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
