Parameters

The ability to search is limited to a small amount of fields. These fields are listed in the table under the section “Query Parameters” in the documentation for each resource.

All fields with the parameter “Query Parameters” can be used in the search. Please note that only one resource specific filter can be used at a time. You can combine a resource specific parameter and a global parameter like "lastmodified".

Example

GET https://api.fortnox.se/3/invoices/?customername=Testing&lastmodified=2021-06-01

In this case “customername” is the GET parameter and also the name of the field in which the search is made. The value “Testing” is the search value.

The search query is in this example will use the LIKE parameter: SELECT * FROM Article WHERE ArticleNumber ILIKE ‘%Testing%’
This means that we will return all invoices with a customer name containing A100, for example A1001 or 1A100 including lowercase letters.

Filter

It’s possible to filter the results so that only specific items will be returned. The available filters is listed under the section “Filters” in the documentation for each resource.

This is made in the same way as the search, by adding GET parameters. The parameter named “filter” is used to set a specific filter for the request.

Example

GET https://api.fortnox.se/3/invoices/?filter=unpaid

In this case the filter is unpaid, which only retrieves invoices that are unpaid.

There are also global search parameters that can be used in almost every endpoint to limit the amount is data in the response. Note that the search params only support lower case characters but example values can vary.

Example

GET https://api.fortnox.se/3/invoices?lastmodified=2022-11-25 06:00

Search nameDescriptionExample value
lastmodifiedRetrieves all records since the provided timestamp.2019-03-10 12:30
financialyearSelects what financial year that should be used5
financialyeardateSelects by date, what financial year that should be used2022-11-01
fromdateDefines a selection based on a start date. Only available for invoices, orders, offers, vouchers and supplierinvoices2022-11-01
todateDefines a selection based on an end date. Only available for invoices, orders, offers, vouchers and supplierinvoices 2022-11-01
Sorting

A result can be sorted, either ascending or descending, by specific fields. These fields are listed in the table under the section “Fields” in the documentation for each resource.

This is made in the same way as the search and the filter, by adding GET parameters. Apart from the filters and the search, sorting uses two parameters. One named “sortby”, which specifies the field that the result should be sorted by and one named “sortorder”, which specifies the order in which the sorting should be made.

Example

GET https://api.fortnox.se/3/invoices/?sortby=customernumber&sortorder=ascending

In the case above, the invoices is being sorted ascending by the field “customernumber”.

Limit & Offset

Because of performance reasons both on our side and on yours, we encourage you to use the parameter limit as much as possible.

This parameter limits the count of records that will be returned, by default this is set to 100, but you can go as low as to 1 or as high as to 500.

When retrieving a list of records you sometimes want to choose what record to start from, this is done by using the parameter offset.

By default the offset parameter is set to 0, but you can of course start from whatever record you like.

If the request returns multiple pages with records you need to paginate to access all records.

This is done with the parameter page, you should specify the page number that you want to retrieve.

Example

GET https://api.fortnox.se/3/invoices/?page=3
Documentation

See our comprehensive documentation regarding the Fortnox API.

Subscribe to our blog

By contacting Fortnox, your personal information will be processed in accordance with Fortnox's Privacy Notice

Join us

Approximately half a million customers are waiting for your integration at our Integrations page.