Fortnox API (experimental)

Download OpenAPI specification:Download

Introduction

Welcome to Fortnox dedicated portal for Alpha and Beta APIs!

This space is designed to provide early access to our latest API developments, allowing you to explore, experiment, and provide valuable feedback that helps shape the future of our API offerings.

Happy coding!

Getting Started

Access and Authentication

To use these APIs, you need to follow specific steps for authentication and access.

Detailed instructions can be found in the respective sections for Alpha and Beta APIs.

Documentation: Each API is thoroughly documented with detailed descriptions, example requests and responses, error handling guidelines, and more to help you get started quickly

Giving Feedback

Your feedback is crucial for us to improve and enhance our APIs. Please use the feedback mechanisms provided within the portal to share your thoughts, report issues, or suggest new features. Your input directly influences the development and stability of our APIs.

Best Practices

While using Alpha and Beta APIs, the same best practices apply, including rate limiting and error handling, to ensure a smooth and efficient integration experience.

You can read more about this in our Developer documentation and the stable API documentation.

Support

We are here to help you make the most out of our Alpha and Beta APIs.

Please reach out to us from the Developer guide on fortnox.se https://www.fortnox.se/developer/support

Thank you for participating in our Alpha and Beta API development. We look forward to your innovative implementations and valuable feedback as we strive to build APIs that meet your needs and exceed your expectations.

Alpha endpoints

About Alpha APIs

Alpha APIs are our cutting-edge, experimental APIs that are in the early stages of development. These APIs are provided to gather feedback and insights on new features and functionalities. As a result, Alpha APIs are subject to change and may experience occasional instability.

We encourage you to use these APIs to experiment and provide feedback, but please be aware of their experimental nature and plan their integration accordingly.

Please check each API for the best way to give feedback!

Retrieve a list of articles

Retrieves a list of articles. The articles are returned sorted by article number with the lowest number appearing first.

query Parameters
filter
string
Enum: "active" "inactive"

possibility to filter supplier invoices

sortby
string
Enum: "articlenumber" "quantityinstock" "reservedquantity" "stockvalue"

field to sort returned list

articlenumber
string

filter by article number

description
string

filter by description

ean
string

filter by ean

suppliernumber
string

filter by supplier number

manufacturer
string

filter by manufacturer

manufacturerarticlenumber
string

filter by manufacturerarticlenumber

webshop
string

filter by web shop

lastmodified
string

filter by lastmodified

Responses

Response samples

Content type
application/json
{
  • "Articles": [
    ]
}

Create an article

The created article will be returned if everything succeeded, if there were any problems an error will be returned.

Request Body schema: */*

Request body for create article

object (fortnox_ArticleV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Article": {
    }
}

Calculate the prices of all included articles in a bundle

This is a helper method to calculate the prices for all sub items in a bundle. Several bundles can be included in the same request, as separate rows, and be calculated at the same time.

Some properties are required for the price calculation to work:

  • The bundle row (the top row) must have a Price. This is the price of the bundle, which the prices of the sub items will be calculated from. The goal of the calculation is to make the sum of the prices of the sub items equal to this price.
  • Each sub item row must have an AmountInBundle and a SalesPriceInBundle. These values are necessary in order to determine how large part of the bundle's value the sub item represents, and what the price of the sub item must be.
  • If a sub item row has UserPrice set to true, the Price property must also be set. The Price property of the sub items is normally not used as input, but if the UserPrice flag is set, the provided Price will be used as the price of the sub item and not calculated. This works in the same way as if a sub item had a fixed price in the bundle.

This method can also (optionally) calculate the price of the price adjustment row of a bundle. To have the price adjustment row price calculated, an additional sub row having the PriceAdjustment property set to true must be included in the request. If a price adjustment row is provided, in order for its price to be calculated, the following properties must be set (in addition to the properties specified above):

  • The Quantity on all rows, the bundle row and the sub rows.
  • The Discount on the bundle row (if the bundle should be sold with a discount).

This method will only calculate the prices of the sub rows and return these prices in the response. No modifications will be made to any entities in the database.

Example: To add a bundle to an invoice, first get the bundle article from the article registry. Here you will find the sub items included in the bundle, and how many of each there are in a bundle.

GET /3/articles-v2/toolbox

Response (simplified):


 {
     "Article": {
     .
     .
     "Bundle": {
             "Comment": "",
             "PriceAdjustmentRow": {
                 .
                 .
             },
             "SubItems": [
                 {
                     "ArticleNumber": "hammer",
                     "Quantity": "2",
                     "FixedPrice": false
                 },
                 {
                     "ArticleNumber": "wrench",
                     "Quantity": "3",
                     "FixedPrice": false
                 }
             ]
         }
     }
 }
 

Then lookup the sales price for each of the included articles in the price list you intend to use on the invoice. This should always be the sales price for 1 unit of the article, if an article has more than one price, choose the price where "FromQuantity" is equal to 1 or the closest value below 1.

GET /3/prices/sublist/A/hammer

Response (simplified):


 {
     "Prices": [
          {
              "ArticleNumber": "hammer",
              "FromQuantity": 0,
              "PriceList": "A",
              "Price": 200
          }
     ]
 }
 

GET /3/prices/sublist/A/wrench

Response (simplified):


 {
     "Prices": [
          {
              "ArticleNumber": "wrench",
              "FromQuantity": 0,
              "PriceList": "A",
              "Price": 300
          }
     ]
 }
 

Now we have all the information we need to calculate the prices for the bundle. Let's assume that we want to sell this bundle for 1100 SEK, and that the customer bought 2 bundles. We also want the price adjustment to be calculated. We create a bundle price calculation request with the following properties:


 {
     "BundlePriceCalculation": {
         "Rows": [
             {
                 "Price": 1100,    // The price we want to set on the bundle
                 "Quantity": 2,   // The number of bundles sold (only required since we want to calculate the price adjustment row)
                 "Bundle": {
                     "SubRows": [
                         {
                             "Quantity": 4, // The number of hammers on the invoice. The bundle contains 2, but we sold 2 bundles.
                             "BundleSubItem": {
                                 "AmountInBundle": 2, // The amount of hammers in a bundle
                                 "SalesPriceInBundle": 200 // The sales price of the hammer
                             }
                         },
                         {
                             "Quantity": 6,
                             "BundleSubItem": {
                                 "AmountInBundle": 3,
                                 "SalesPriceInBundle": 300
                             }
                         },
                         {
                             "Quantity": 1,
                             "BundleSubItem": {
                                 "PriceAdjustment": true
                             }
                         }
                     ]
                 }
             }
         ]
     }
 }
 

We do the calculation by calling the endpoint with the request above:

POST /3/articles-v2/calculatebundleprices

Response (simplified):


 {
     "BundlePriceCalculation": {
         "Rows": [
             {
                 "Price": 1100,
                 "Quantity": 2,
                 "Bundle": {
                     "SubRows": [
                         {
                             "Price": 169.23,  // The price that the hammer should have on the invoice
                             "Quantity": 4,
                             "BundleSubItem": {
                                 "AmountInBundle": 2,
                                 "SalesPriceInBundle": 200
                             }
                         },
                         {
                             "Price": 253.85, // The price that the wrench should have on the invoice
                             "Quantity": 6,
                             "BundleSubItem": {
                                 "AmountInBundle": 3,
                                 "SalesPriceInBundle": 300
                             }
                         },
                         {
                             "Price": -0.02,  // The price to set on the price adjustment row
                             "Quantity": 1,   // Quantity is always 1 on a price adjustment row
                             "BundleSubItem": {
                                 "AmountInBundle": 0,
                                 "PriceAdjustment": true,
                                 "SalesPriceInBundle": 0
                             }
                         }
                     ]
                 }
             }
         ]
     }
 }
 

And there we have it. When we create our invoice, the price of the hammer should be set to 169.23 SEK, the price of the wrench must be set to 253.85 SEK, and the price adjustment row must be set to -0.02 SEK. The closest we could get to the desired price of 1100 SEK was 1100.01 SEK (2 * 169.23 + 3 * 253.85 = 1100.01 SEK), so the price for one bundle needed to be adjusted by -0.01 SEK. Since we calculated the price for 2 bundles, the total adjustment was -0.02 SEK.

Worth noting is that the prices for the articles in a bundle is always calculated based on exactly 1.0 bundle, the prices of the articles is not effected by the number of bundles sold. However, as seen in this example, the price adjustment might be. The same goes for discount. If a bundle is sold with a discount, the discount will not affect the calculated prices of the individual sub articles in the bundle, but it might affect the price on the price adjustment row.

Request Body schema: */*

Request body for update article

object (fortnox_ArticleV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Article": {
    }
}

Delete an article

Deletes the article permanently.

You need to supply the unique article number that was returned when the article was created or retrieved from the list of articles.

path Parameters
ArticleNumber
required
integer <int32>

identifies the article

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

Retrieve an article

Retrieves the details of an article. You need to supply the unique article number that was returned when the article was created or retrieved from the list of articles.

path Parameters
ArticleNumber
required
integer <int32>

identifies the article

Responses

Response samples

Content type
application/json
{
  • "Article": {
    }
}

Update an article

Updates the specified article with the values provided in the properties. Any property not provided will be left unchanged. You need to supply the unique article number that was returned when the article was created or retrieved from the list of articles. Note that even though the article number is writeable you can not change the number of an existing article.

path Parameters
ArticleNumber
required
integer <int32>

identifies the article

Request Body schema: */*

Request body for update article

object (fortnox_ArticleV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Article": {
    }
}

Retrieve a list of invoices

Get invoices

query Parameters
tofinalpaydate
string

Tofinalpaydate of invoices to list

fromfinalpaydate
string

Fromfinalpaydate of invoices to list

filter
string
Enum: "cancelled" "fullypaid" "unpaid" "unpaidoverdue" "unbooked"

possibility to filter invoices

sortby
string
Enum: "customername" "customernumber" "documentnumber" "invoicedate" "ocr" "total"

field to sort returned list on

costcenter
string

Costcenter of invoices to list

customername
string

Customername of invoices to list

customernumber
string

Customernumber of invoices to list

label
string

Label of invoices to list

documentnumber
string

Documentnumber of invoices to list

fromdate
string

Fromdate of invoices to list

todate
string

Todate of invoices to list

lastmodified
string

Lastmodified of invoices to list

notcompleted
string

Notcompleted of invoices to list

ocr
string

Ocr of invoices to list

ourreference
string

Ourreference of invoices to list

project
string

Project of invoices to list

sent
string

Sent of invoices to list

externalinvoicereference1
string

Externalinvoicereference1 of invoices to list

externalinvoicereference2
string

Externalinvoicereference2 of invoices to list

yourreference
string

Yourreference of invoices to list

invoicetype
string

Invoicetype of invoices to list

articlenumber
string

Articlenumber of invoices to list

articledescription
string

Articledescription of invoices to list

currency
string

Currency of invoices to list

accountnumberfrom
string

Accountnumberfrom of invoices to list

accountnumberto
string

Accountnumberto of invoices to list

yourordernumber
string

Yourordernumber of invoices to list

credit
string

Credit of invoices to list

Responses

Response samples

Content type
application/json
{
  • "Invoices": [
    ]
}

Create an invoice

An endpoint for creating an invoice. While it is possible to create an invoice without rows, we encourage you to add them if you can. Omitted values in the payload will be supplied by Predefined values which can be edited in the Fortnox account settings. Note that Predefined values will always be overwritten by values provided through the API.

Should you have EasyVat enabled, it is mandatory to provide an account in the request should you use a custom VAT rate.

This endpoint can produce errors, some of which may only be relevant for EasyVat. Refer to the table below.

Errors that can be raised by this endpoint.
Error Code HTTP Code Description Solution
2004167 400 An account must be provided when using a custom VAT rate and EasyVat has been enabled. Supply each row which has a custom VAT rate with an account.

Note: The EuQuarterlyReport property will become obsolete at 2021-12-01. This property is currently used by the Quarterly report as one of the conditions that determine if an invoice should be included in the report or not. A new version of the Quarterly report is released at 2021-12-01. In the new report, this property will not be used when determining if an invoice should be included in the report or not, with one exception: if the invoice is created before 2021-12-01, and this property is false, the invoice will be excluded from the report. For invoices created 2021-12-01 and later, this property will have no effect.

Request Body schema: */*

Request body for create invoice

object (fortnox_Kf_InvoiceV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Retrieve a single invoice

Retrieve an invoice

path Parameters
DocumentNumber
required
string

identifies the invoice

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Update an invoice

Note that there are two approaches for updating the rows on an invoice.

If RowId is not specified on any row, the rows will be mapped and updated in the order in which they are set in the array. All rows that should remain on the invoice needs to be provided.

If RowId is specified on one or more rows the following goes: Corresponding row with that id will be updated. The rows without RowId will be interpreted as new rows. If a row should not be updated but remain on the invoice then specify only RowId like { "RowId": 123 }, otherwise it will be removed. Note that new RowIds are generated for all rows every time an invoice is updated.

Note: The EuQuarterlyReport property will become obsolete at 2021-12-01. This property is currently used by the Quarterly report as one of the conditions that determine if an invoice should be included in the report or not. A new version of the Quarterly report is released at 2021-12-01. In the new report, this property will not be used when determining if an invoice should be included in the report or not, with one exception: if the invoice is created before 2021-12-01, and this property is false, the invoice will be excluded from the report. For invoices created 2021-12-01 and later, this property will have no effect.

path Parameters
DocumentNumber
required
string

identifies the invoice

Request Body schema: */*

Request body for update invoice

object (fortnox_Kf_InvoiceV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Bookkeep an invoice

Update an invoice

path Parameters
DocumentNumber
required
string

identifies the invoice

Request Body schema: */*

Request body for update invoice

object (fortnox_Kf_InvoiceV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Cancel an invoice

Update an invoice

path Parameters
DocumentNumber
required
string

identifies the invoice

Request Body schema: */*

Request body for update invoice

object (fortnox_Kf_InvoiceV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Credit an invoice

The created credit invoice will be referenced in the property CreditInvoiceReference.

path Parameters
DocumentNumber
required
string

identifies the invoice

Request Body schema: */*

Request body for update invoice

object (fortnox_Kf_InvoiceV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Send an invoice as e-invoice

Should the invoice contain a delivery address (DeliveryAddress1, DeliveryAddress2, DeliveryZipCode or DeliveryCity), it is mandatory to also provide DeliveryCountry. Should the invoice use the EU reverse charge tax type, it is mandatory to provide DeliveryDate.

path Parameters
DocumentNumber
required
string

identifies the invoice

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Send an invoice as email

You can use the properties in the EmailInformation to customize the e-mail message on each invoice.

path Parameters
DocumentNumber
required
string

identifies the invoice

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Send an invoice as e-print

Retrieve an invoice

path Parameters
DocumentNumber
required
string

identifies the invoice

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Set an invoice as sent

Use this endpoint to set invoice as sent, without generating an invoice.

path Parameters
DocumentNumber
required
string

identifies the invoice

Request Body schema: */*

Request body for update invoice

object (fortnox_Kf_InvoiceV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Preview an invoice

The difference between this and the print-endpoint is that property Sent is not set to TRUE.

path Parameters
DocumentNumber
required
string

identifies the invoice

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

Print an invoice

Retrieve an invoice

path Parameters
DocumentNumber
required
string

identifies the invoice

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

Print an invoice as reminder

Retrieve an invoice

path Parameters
DocumentNumber
required
string

identifies the invoice

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

Set an invoice as done

Used for marking a document as ready in the warehouse module. DeliveryState needs to be set to "delivery".

path Parameters
DocumentNumber
required
string

identifies the invoice

Request Body schema: */*

Request body for update invoice

object (fortnox_Kf_InvoiceV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Invoice": {
    }
}

Retrieve a list of offers

Get offers

query Parameters
todate
string

filter by to date

fromdate
string

filter by from date

filter
string
Enum: "cancelled" "expired" "completed" "notcompleted" "ordercreated" "ordernotcreated"

possibility to filter offers

sortby
string
Enum: "customerName" "id" "transactionDate" "total"

sort returned list of offers

customername
string

filter by customer name

customernumber
string

filter by customer number

documentnumber
string

filter by document number

costcenter
string

filter by cost center

label
string

filter by label

project
string

filter by project

sent
boolean

filter by sent

notcompleted
boolean

filter by not completed

ourreference
string

filter by our reference

yourreference
string

filter by your reference

lastmodified
string

filter by last modified

Responses

Response samples

Content type
application/json
{
  • "Offers": [
    ]
}

Create an offer

An endpoint for creating an offer.

Should you have EasyVat enabled, it is mandatory to provide an account in the request should you use a custom VAT rate.

This endpoint can produce errors, some of which may only be relevant for EasyVat. Refer to the table below.

Errors that can be raised by this endpoint.
Error Code HTTP Code Description Solution
2004167 400 An account must be provided when using a custom VAT rate and EasyVat has been enabled. Supply each row which has a custom VAT rate with an account.

Request Body schema: */*

Request body for create offer

object (fortnox_Offer_OfferV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Retrieve a single offer

Retrieve an offer

path Parameters
DocumentNumber
required
string

identifies the offer

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Update an offer

Note that there are two approaches for updating the rows on an offer.

If RowId is not specified on any row, the rows will be mapped and updated in the order in which they are set in the array. All rows that should remain on the offer needs to be provided.

If RowId is specified on one or more rows the following goes: Corresponding row with that id will be updated. The rows without RowId will be interpreted as new rows. If a row should not be updated but remain on the offer then specify only RowId like { "RowId": 123 }, otherwise it will be removed. Note that new RowIds are generated for all rows every time an offer is updated.

path Parameters
DocumentNumber
required
string

identifies the offer

Request Body schema: */*

Request body for update offer

object (fortnox_Offer_OfferV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Cancels given offer

Update an offer

path Parameters
DocumentNumber
required
string

identifies the offer

Request Body schema: */*

Request body for update offer

object (fortnox_Offer_OfferV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Create invoice out of given offer

Update an offer

path Parameters
DocumentNumber
required
string

identifies the offer

Request Body schema: */*

Request body for update offer

object (fortnox_Offer_OfferV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Create order out of given offer

Update an offer

path Parameters
DocumentNumber
required
string

identifies the offer

Request Body schema: */*

Request body for update offer

object (fortnox_Offer_OfferV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Send given offer as email

You can use the properties in the EmailInformation to customize the e-mail message on each offer.

path Parameters
DocumentNumber
required
string

identifies the offer

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Set given offer as sent

Use this endpoint to set offer as sent, without generating an offer.

path Parameters
DocumentNumber
required
string

identifies the offer

Request Body schema: */*

Request body for update offer

object (fortnox_Offer_OfferV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Offer": {
    }
}

Preview given offer

The difference between this and the print-endpoint is that property Sent is not set to TRUE.

path Parameters
DocumentNumber
required
string

identifies the offer

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

Print given offer

Retrieve an offer

path Parameters
DocumentNumber
required
string

identifies the offer

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

Retrieve a list of orders

Get orders

query Parameters
todate
string

filter by to date

fromdate
string

filter by from date

filter
string
Enum: "cancelled" "expired" "invoicecreated" "invoicenotcreated"

possibility to filter orders

sortby
string
Enum: "customername" "customernumber" "orderdate" "documentnumber" "total"

field to sort returned list

customername
string

filter by customer name

customernumber
string

filter by customer number

label
string

filter by label

documentnumber
string

filter by document number

externalinvoicereference1
string

filter by external invoice reference 1

externalinvoicereference2
string

filter by external invoice reference 2

costcenter
string

filter by cost center

project
string

filter by project

sent
boolean

filter by sent

notcompleted
boolean

filter by not completed

ourreference
string

filter by ourreference

yourreference
string

filter by your reference

lastmodified
string

filter by lastmodified

ordertype
string

filter by order type

Responses

Response samples

Content type
application/json
{
  • "Orders": [
    ]
}

Create a new order

An endpoint for creating an order.

Should you have EasyVat enabled, it is mandatory to provide an account in the request should you use a custom VAT rate.

This endpoint can produce errors, some of which may only be relevant for EasyVat. Refer to the table below.

Errors that can be raised by this endpoint.
Error Code HTTP Code Description Solution
2004167 400 An account must be provided when using a custom VAT rate and EasyVat has been enabled. Supply each row which has a custom VAT rate with an account.

Request Body schema: */*

Request body for create order

object (fortnox_Order_OrderV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Order": {
    }
}

Retrieve a single order

Retrieve an order

path Parameters
DocumentNumber
required
string

identifies the order

Responses

Response samples

Content type
application/json
{
  • "Order": {
    }
}

Update an order

Note that there are two approaches for updating the rows on an order.

If RowId is not specified on any row, the rows will be mapped and updated in the order in which they are set in the array. All rows that should remain on the order needs to be provided.

If RowId is specified on one or more rows the following goes: Corresponding row with that id will be updated. The rows without RowId will be interpreted as new rows. If a row should not be updated but remain on the order then specify only RowId like { "RowId": 123 }, otherwise it will be removed. Note that new RowIds are generated for all rows every time an order is updated.

path Parameters
DocumentNumber
required
string

identifies the order

Request Body schema: */*

Request body for update order

object (fortnox_Order_OrderV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Order": {
    }
}

Cancels given order

Update an order

path Parameters
DocumentNumber
required
string

identifies the order

Request Body schema: */*

Request body for update order

object (fortnox_Order_OrderV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Order": {
    }
}

Create invoice out of given order

Update an order

path Parameters
DocumentNumber
required
string

identifies the order

Request Body schema: */*

Request body for update order

object (fortnox_Order_OrderV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Order": {
    }
}

Send given order as email

You can use the properties in the EmailInformation to customize the e-mail message on each order.

path Parameters
DocumentNumber
required
string

identifies the order

Responses

Response samples

Content type
application/json
{
  • "Order": {
    }
}

Set given order as sent

Use this endpoint to set order as sent, without generating an order.

path Parameters
DocumentNumber
required
string

identifies the order

Request Body schema: */*

Request body for update order

object (fortnox_Order_OrderV2SinglePayloadItem)

Responses

Response samples

Content type
application/json
{
  • "Order": {
    }
}

Preview given offer

The difference between this and the print-endpoint is that property Sent is not set to TRUE.

path Parameters
DocumentNumber
required
string

identifies the offer

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

Print given order

Retrieve an order

path Parameters
DocumentNumber
required
string

identifies the order

Responses

Response samples

Content type
application/json
{
  • "ErrorInformation": {
    }
}

List all invoice requests

Returns invoice requests (the administrative records for invoice generation) for the supplied recurring IDs, optionally narrowed by status.

query Parameters
status
Array of strings (Recurring-API_InvoiceRequestStatus)

Filter by invoice request status. Multiple values must be comma-separated (e.g. status=PENDING,FAILED).

recurring-ids
required
Array of strings <uuid> [ 1 .. 100 ] items [ items <uuid > ]

Recurring IDs to return invoice requests for. At least one and at most 100 IDs, comma-separated.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create invoice requests for multiple recurrings

Generates invoices for the supplied recurrings. With processing-mode=SYNC (the default) the invoices are created immediately and the completed request is returned, limited to at most 100 recurring IDs. With processing-mode=ASYNC the request is persisted and processed in the background, supports larger batches, and is returned with status PENDING/PROCESSING. A recurring that already has an in-flight request causes the new request to be rejected with 409.

query Parameters
processing-mode
string
Default: "SYNC"
Enum: "SYNC" "ASYNC"

Controls how invoice creation is processed. SYNC processes immediately and returns the result, but is limited to a maximum of 100 recurring IDs. ASYNC accepts any number of IDs, persists the request, and processes it in the background — use this for batches larger than 100.

Request Body schema: application/json
required
recurring_ids
required
Array of strings <uuid> [ items <uuid > ]

List of recurring IDs to create invoices for. When using SYNC processing mode, a maximum of 100 IDs is allowed. For larger batches, use ASYNC processing mode.

Responses

Request samples

Content type
application/json
{
  • "recurring_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "items": [
    ],
  • "modified_at": "2019-08-24T14:15:22Z",
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processing_mode": "SYNC",
  • "status": "string"
}

Get an invoice request by ID

Returns a single invoice request including its per-recurring items, overall status and the generated invoice numbers. Use this to poll the result of an asynchronous request.

path Parameters
invoice-request-id
required
string <uuid>

The unique identifier of the invoice request.

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "items": [
    ],
  • "modified_at": "2019-08-24T14:15:22Z",
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processing_mode": "SYNC",
  • "status": "string"
}

List all recurring contracts

Returns a paginated list of recurring contracts for the authenticated tenant. The result can be narrowed with the customer-numbers, statuses, invoice-handlings and error-status filters, ordered with sortby and order, and paged with offset and limit (1-100, default 100). Pagination metadata is returned in the X-PAGINATION and X-LAST-RECORD response headers.

query Parameters
customer-numbers
Array of strings

Filter by customer numbers. Multiple values must be comma-separated (e.g. customer-numbers=1,2,3).

statuses
Array of strings (Recurring-API_RecurringStatus)
Items Enum: "DRAFT" "ACTIVE" "INACTIVE" "FINISHED"

Filter by recurring statuses. Multiple values must be comma-separated (e.g. statuses=ACTIVE,DRAFT).

invoice-handlings
Array of strings (Recurring-API_InvoiceHandling)

Filter by invoice handling types. Multiple values must be comma-separated (e.g. invoice-handlings=MANUAL,AUTOMATIC).

error-status
string (Recurring-API_ErrorStatus)
Enum: "HAS_ERROR" "HAS_NO_ERROR"

Filter recurrings by error status

offset
integer >= 0
Default: 0

Number of items to skip

limit
integer [ 1 .. 100 ]
Default: 100

Maximum number of items to return

sortby
string
Default: "SERIAL_NUMBER"

Field to sort by

order
string
Default: "ASC"
Enum: "ASC" "DESC"

Sort order direction

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new Recurring

Creates a new recurring contract. The created recurring is always persisted with status ACTIVE. The full created representation is returned together with a Location header pointing to it, plus ETag and Last-Modified headers for subsequent optimistic concurrency control.

Request Body schema: application/json
required
object (Recurring-API_CreateAccrual)
amount_per_invoicing
integer [ 1 .. 12 ]
Default: 1

Number of recurring periods combined onto a single invoice. For example, with a monthly recurring an amount of 3 invoices a full quarter at once. Must be between 1 and 12. Defaults to 1.

cost_center_id
string

Identifier of the cost center the recurring and its invoices are booked against.

currency
string

ISO 4217 currency code the recurring is invoiced in (e.g. SEK, EUR).

required
object (Recurring-API_RecurringCustomer)
required
object (Recurring-API_CreateRecurringDates)

Scheduling supplied when creating a recurring. Only dates is required.

Supply the first occurrence in dates (invoice_processing_date and period_start_date are required). rules is optional: omit it to accept the defaults (interval 1, frequency MONTH). Anchors (invoice_anchor, period_anchor) are derived from the supplied dates when omitted — e.g. invoice_processing_date 2026-02-28 with frequency MONTH yields invoice_anchor LAST_DAY. invoice_date is computed by the server and is therefore not part of the create input.

object (Recurring-API_RecurringDelivery)
distribution_method
string (Recurring-API_DistributionMethod)

How the generated invoices are delivered to the customer:

  • EMAIL: Sent as a PDF by email.
  • E_INVOICE: Sent as a structured electronic invoice.
  • LETTER: Printed and sent by physical mail. (only usable with invoice service)
object (Recurring-API_RecurringEmail)
invoice_handling
string (Recurring-API_InvoiceHandling)

How invoices are produced and managed for the recurring:

  • MANUAL: Invoices are created on demand; nothing is generated automatically.
  • AUTOMATIC: Invoices are generated automatically on schedule.
  • INVOICE_SERVICE_WITH_REMINDERS: Invoices are generated and handled by the Fortnox invoice service, including reminders.
  • INVOICE_SERVICE_WITHOUT_REMINDERS: Invoices are generated and handled by the Fortnox invoice service, only invoice creation and delivery without automatic reminders.
order_number
string

Customer purchase order number printed on the generated invoices.

our_reference
string

The seller's own reference (e.g. the responsible employee) printed on the invoice.

payment_terms
string

Payment terms code applied to the generated invoices (e.g. days until due).

price_list_id
string

Identifier of the price list used to resolve article prices for this recurring.

object (Recurring-API_PrintConfiguration)
project_id
string

Identifier of the project the recurring and its invoices are booked against.

remark
string

Free-text remark printed on the generated invoices.

required
Array of any (Recurring-API_CreateRecurringRow)

The line items of the recurring. At least one row is required.

tax_reduction_category
string
Default: "NONE"

The household/green tax reduction scheme applied to the recurring:

  • NONE: No tax reduction.
  • RUT: Swedish RUT deduction for household services.
Array of objects (Recurring-API_CreateTaxReduction)

Tax reduction records to attach to the recurring, one per applicant.

vat_option
string (Recurring-API_VatOption)
Enum: "INCLUSIVE" "EXCLUSIVE"

Indicates if the prices are shown including VAT (INCLUSIVE) or excluding VAT (EXCLUSIVE)

vat_payment_type
string (Recurring-API_VatPaymentType)

The VAT scheme applied to the invoice:

  • SEVAT: Swedish domestic VAT.
  • SEREVERSEDVAT: Swedish domestic reverse-charge VAT (buyer accounts for VAT).
  • EUREVERSEDVAT: Reverse-charge VAT for EU trade (buyer accounts for VAT).
  • EUVAT: EU VAT.
  • EXPORT: Export outside the EU; no VAT charged.
your_reference
string

The customer's reference (e.g. their contact person) printed on the invoice.

Responses

Request samples

Content type
application/json
{
  • "accrual": {
    },
  • "amount_per_invoicing": 1,
  • "cost_center_id": "string",
  • "currency": "string",
  • "customer": {
    },
  • "dates": {
    },
  • "delivery": {
    },
  • "distribution_method": "string",
  • "email": {
    },
  • "invoice_handling": "string",
  • "order_number": "string",
  • "our_reference": "string",
  • "payment_terms": "string",
  • "price_list_id": "string",
  • "print_configuration": {
    },
  • "project_id": "string",
  • "remark": "string",
  • "rows": [
    ],
  • "tax_reduction_category": "NONE",
  • "tax_reductions": [
    ],
  • "vat_option": "INCLUSIVE",
  • "vat_payment_type": "string",
  • "your_reference": "string"
}

Response samples

Content type
application/json
{
  • "amount_per_invoicing": 1,
  • "cost_center_id": "string",
  • "currency": "string",
  • "customer": {
    },
  • "delivery": {
    },
  • "distribution_method": "string",
  • "email": {
    },
  • "invoice_handling": "string",
  • "order_number": "string",
  • "our_reference": "string",
  • "payment_terms": "string",
  • "price_list_id": "string",
  • "print_configuration": {
    },
  • "project_id": "string",
  • "remark": "string",
  • "status": "DRAFT",
  • "tax_reduction_category": "NONE",
  • "vat_option": "INCLUSIVE",
  • "vat_payment_type": "string",
  • "your_reference": "string",
  • "accrual": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "string",
  • "dates": {
    },
  • "error_logs": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "modified_by": "string",
  • "rows": [
    ],
  • "serial_number": 0,
  • "tax_reductions": [
    ],
  • "totals": {
    }
}

Get a recurring by ID

Returns the full representation of a single recurring contract, including its rows, accrual, tax reductions, calculated totals and any accumulated error logs. The ETag and Last-Modified response headers can be used for later conditional updates.

path Parameters
recurring-id
required
string <uuid>

The unique identifier of the recurring contract.

Responses

Response samples

Content type
application/json
{
  • "amount_per_invoicing": 1,
  • "cost_center_id": "string",
  • "currency": "string",
  • "customer": {
    },
  • "delivery": {
    },
  • "distribution_method": "string",
  • "email": {
    },
  • "invoice_handling": "string",
  • "order_number": "string",
  • "our_reference": "string",
  • "payment_terms": "string",
  • "price_list_id": "string",
  • "print_configuration": {
    },
  • "project_id": "string",
  • "remark": "string",
  • "status": "DRAFT",
  • "tax_reduction_category": "NONE",
  • "vat_option": "INCLUSIVE",
  • "vat_payment_type": "string",
  • "your_reference": "string",
  • "accrual": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "string",
  • "dates": {
    },
  • "error_logs": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "modified_by": "string",
  • "rows": [
    ],
  • "serial_number": 0,
  • "tax_reductions": [
    ],
  • "totals": {
    }
}

Update only specified fields of a Recurring by ID

Applies JSON Patch operations to editable recurring fields. Supported operations are add, remove, and replace. Allowed root paths are: /accrual, /project_id, /cost_center_id, /price_list_id, /dates, /amount_per_invoicing, /status, /invoice_handling, /distribution_method, /payment_terms, /our_reference, /your_reference, /remark, /order_number, /print_configuration, /vat_option, /vat_payment_type, /currency, /email, /customer, /delivery, /tax_reduction_category, /tax_reductions, /rows. Deviation-related paths are not supported on this endpoint and return 400. JSON Pointer escape sequences are supported (~0 for ~, ~1 for /). The If-Match (ETag) header is mandatory: requests without it are rejected with 428, and a stale ETag is rejected with 412.

path Parameters
recurring-id
required
string <uuid>

The unique identifier of the recurring contract to patch.

header Parameters
If-Match
required
string

Required strong ETag for optimistic concurrency control; standard comma-separated If-Match lists are also accepted. Requests without this header are rejected with 428.

If-Unmodified-Since
string

Optional expected Last-Modified value for optimistic concurrency control, formatted as an RFC 1123 date in GMT. Evaluated only after If-Match succeeds.

Request Body schema: application/json
required

The Content-Type header must be set to application/json. The body is fully JSON Patch compliant (RFC 6902).

Array
op
required
string
Enum: "add" "remove" "replace"

The JSON Patch operation to perform (RFC 6902).

path
required
string

JSON Pointer (RFC 6901) to the target location the operation applies to.

string or number or integer or boolean or Recurring-API_PartialRecurring (object) or Recurring-API_PartialDeviation (object) or Recurring-API_PartialRecurringRow (object) or Recurring-API_PartialDeviationRow (object) or Recurring-API_PartialTaxReduction (object) or Recurring-API_PartialAccrual (object) or Recurring-API_PartialAccrualRow (object) or Recurring-API_RecurringDates (object) or Recurring-API_PartialRecurringCustomer (object)

Value used by add, replace, and remove operations.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "amount_per_invoicing": 1,
  • "cost_center_id": "string",
  • "currency": "string",
  • "customer": {
    },
  • "delivery": {
    },
  • "distribution_method": "string",
  • "email": {
    },
  • "invoice_handling": "string",
  • "order_number": "string",
  • "our_reference": "string",
  • "payment_terms": "string",
  • "price_list_id": "string",
  • "print_configuration": {
    },
  • "project_id": "string",
  • "remark": "string",
  • "status": "DRAFT",
  • "tax_reduction_category": "NONE",
  • "vat_option": "INCLUSIVE",
  • "vat_payment_type": "string",
  • "your_reference": "string",
  • "accrual": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "string",
  • "dates": {
    },
  • "error_logs": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "modified_by": "string",
  • "rows": [
    ],
  • "serial_number": 0,
  • "tax_reductions": [
    ],
  • "totals": {
    }
}

Update a Recurring by ID

Replaces the editable fields of an existing recurring with the supplied representation. The If-Match (ETag) header is mandatory for optimistic concurrency control: requests without it are rejected with 428, and requests whose ETag no longer matches the current recurring are rejected with 412. The current ETag is returned by GET and by every successful mutation. The optional If-Unmodified-Since header may be supplied as an additional check.

path Parameters
recurring-id
required
string <uuid>

The unique identifier of the recurring contract to update.

header Parameters
If-Match
required
string

Required strong ETag for optimistic concurrency control; standard comma-separated If-Match lists are also accepted. Requests without this header are rejected with 428.

If-Unmodified-Since
string

Optional expected Last-Modified value for optimistic concurrency control, formatted as an RFC 1123 date in GMT. Evaluated only after If-Match succeeds.

Request Body schema: application/json
required
amount_per_invoicing
required
integer [ 1 .. 12 ]
Default: 1

Number of recurring periods combined onto a single invoice. For example, with a monthly recurring an amount of 3 invoices a full quarter at once. Must be between 1 and 12. Defaults to 1.

cost_center_id
string

Identifier of the cost center the recurring and its invoices are booked against.

currency
string

ISO 4217 currency code the recurring is invoiced in (e.g. SEK, EUR).

required
object (Recurring-API_RecurringCustomer)
object (Recurring-API_RecurringDelivery)
distribution_method
string (Recurring-API_DistributionMethod)

How the generated invoices are delivered to the customer:

  • EMAIL: Sent as a PDF by email.
  • E_INVOICE: Sent as a structured electronic invoice.
  • LETTER: Printed and sent by physical mail. (only usable with invoice service)
object (Recurring-API_RecurringEmail)
invoice_handling
required
string (Recurring-API_InvoiceHandling)

How invoices are produced and managed for the recurring:

  • MANUAL: Invoices are created on demand; nothing is generated automatically.
  • AUTOMATIC: Invoices are generated automatically on schedule.
  • INVOICE_SERVICE_WITH_REMINDERS: Invoices are generated and handled by the Fortnox invoice service, including reminders.
  • INVOICE_SERVICE_WITHOUT_REMINDERS: Invoices are generated and handled by the Fortnox invoice service, only invoice creation and delivery without automatic reminders.
order_number
string

Customer purchase order number printed on the generated invoices.

our_reference
string

The seller's own reference (e.g. the responsible employee) printed on the invoice.

payment_terms
string

Payment terms applied to the generated invoices (e.g. days until due).

price_list_id
string

Identifier of the price list used to resolve article prices for this recurring.

object (Recurring-API_PrintConfiguration)
project_id
string

Identifier of the project the recurring and its invoices are booked against.

remark
string

Free-text remark printed on the generated invoices.

status
required
string (Recurring-API_RecurringStatus)
Enum: "DRAFT" "ACTIVE" "INACTIVE" "FINISHED"

Lifecycle status of a recurring contract:

  • DRAFT: Saved but not yet activated; does not generate invoices.
  • ACTIVE: Live; generates invoices according to its schedule (if automatic or invoice service).
  • INACTIVE: Paused; retained but not generating invoices.
  • FINISHED: Reached its end date; no further invoices will be generated.
tax_reduction_category
required
string
Default: "NONE"

The household/green tax reduction scheme applied to the recurring:

  • NONE: No tax reduction.
  • RUT: Swedish RUT deduction for household services.
vat_option
string (Recurring-API_VatOption)
Enum: "INCLUSIVE" "EXCLUSIVE"

Indicates if the prices are shown including VAT (INCLUSIVE) or excluding VAT (EXCLUSIVE)

vat_payment_type
string (Recurring-API_VatPaymentType)

The VAT scheme applied to the invoice:

  • SEVAT: Swedish domestic VAT.
  • SEREVERSEDVAT: Swedish domestic reverse-charge VAT (buyer accounts for VAT).
  • EUREVERSEDVAT: Reverse-charge VAT for EU trade (buyer accounts for VAT).
  • EUVAT: EU VAT.
  • EXPORT: Export outside the EU; no VAT charged.
your_reference
string

The customer's reference (e.g. their contact person) printed on the invoice.

object (Recurring-API_UpdateAccrual)

Full representation of the accrual used when updating. All fields must be supplied; data not sent is cleared.

required
object (Recurring-API_UpdateRecurringDates)

Scheduling supplied when updating a recurring. Both rules and dates are required.

Anchors and next dates stay in sync: changing the dates in dates re-derives the rule's anchors, and changing the anchors in rules re-derives the next dates within the current cycle. If a date and its anchor are both changed for the same field, the date wins. invoice_date is computed by the server and is not part of the update input.

Array of any (Recurring-API_UpdateRecurringRow)

The line items of the recurring. Replaces the existing rows.

Array of objects (Recurring-API_UpdateTaxReduction)

Tax reduction records for the recurring, one per applicant. Replaces the existing set.

Responses

Request samples

Content type
application/json
{
  • "amount_per_invoicing": 1,
  • "cost_center_id": "string",
  • "currency": "string",
  • "customer": {
    },
  • "delivery": {
    },
  • "distribution_method": "string",
  • "email": {
    },
  • "invoice_handling": "string",
  • "order_number": "string",
  • "our_reference": "string",
  • "payment_terms": "string",
  • "price_list_id": "string",
  • "print_configuration": {
    },
  • "project_id": "string",
  • "remark": "string",
  • "status": "DRAFT",
  • "tax_reduction_category": "NONE",
  • "vat_option": "INCLUSIVE",
  • "vat_payment_type": "string",
  • "your_reference": "string",
  • "accrual": {
    },
  • "dates": {
    },
  • "rows": [
    ],
  • "tax_reductions": [
    ]
}

Response samples

Content type
application/json
{
  • "amount_per_invoicing": 1,
  • "cost_center_id": "string",
  • "currency": "string",
  • "customer": {
    },
  • "delivery": {
    },
  • "distribution_method": "string",
  • "email": {
    },
  • "invoice_handling": "string",
  • "order_number": "string",
  • "our_reference": "string",
  • "payment_terms": "string",
  • "price_list_id": "string",
  • "print_configuration": {
    },
  • "project_id": "string",
  • "remark": "string",
  • "status": "DRAFT",
  • "tax_reduction_category": "NONE",
  • "vat_option": "INCLUSIVE",
  • "vat_payment_type": "string",
  • "your_reference": "string",
  • "accrual": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "string",
  • "dates": {
    },
  • "error_logs": [
    ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "modified_by": "string",
  • "rows": [
    ],
  • "serial_number": 0,
  • "tax_reductions": [
    ],
  • "totals": {
    }
}

List all deviations for a recurring

Returns the deviations defined for a recurring. A deviation overrides the normal invoicing for one or more occurrences of the recurring — either changing the rows (ROWS) or skipping the invoice entirely (SKIP).

path Parameters
recurring-id
required
string <uuid>

The unique identifier of the recurring contract.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a deviation by ID

Returns a single deviation for a recurring, including its rows and any accrual override.

path Parameters
recurring-id
required
string <uuid>

The unique identifier of the recurring contract.

deviation-id
required
string <uuid>

The unique identifier of the deviation.

Responses

Response samples

Content type
application/json
{
  • "deviation_type": "string",
  • "repeat_interval": 0,
  • "target_invoice_index": 0,
  • "accrual": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "recurring_id": "873dc1c0-e440-4539-ab09-97a3afc5b848",
  • "rows": [
    ]
}

Beta endpoints

About Beta APIs

Beta APIs represent a more stable state than Alpha APIs and are nearing completion for full production use. While they are still subject to changes based on user feedback and final adjustments, Beta APIs offer more reliability and completeness compared to their Alpha counterparts.

We highly value your feedback during this phase to fine-tune these APIs before they become part of our stable API suite.

Please check each API for the best way to give feedback!