Integrated Web Server

Documentatie •
In dit artikel

Banana Accounting has an integrated web server that allow to access the accounting data through a browser or another software through a RESTful API, that can be accessed through with an http protocol. 

This feature is only available with the Advanced plan.

Excel, Word, Access and other software have the ability to integrate documents and data made available through the internet protocol.

Starting the web server

The web server enables you to access the accounting data through http.
The web server is started from the Program Options dialog under the Tools menu.
Once the web server is started you can access to the server by typing the address "http://localhost:8081/" in your browser or in your application.

Settings

The settings of the file server, like the listening port number and others, are stored in the following file:

Windows: "C:/Users/{user_name}/AppData/Local/Banana.ch/BananaPlus/10.0/httpconfig.ini"
Mac: "/Users/{user_name}/Library/Application Support/Banana.ch/BananaPlus/10.0/httpconfig.ini"
Linux: "/home/{user_name}/.local/share/data/Banana.ch/BananaPlus/10.0/httpconfig.ini"

Security

To limit access to the web server, it is possible to set an access token in the settings parameter Banana/accessToken. 

[Banana]
accessControlAllowOrigin=https://www.banana.ch
accessToken=b8nmr1a

In this case the caller have to send the request with the same accessToken set in the http header "X-Banana-Access-Token" or in the query parameter "acstkn". If the token doesn't match the server will answer with a 401 unauthorised.

http://localhost:8081/v1?acstkn=b8nmr1a

The settings parameter Banana/accessControlAllowOrigin=https://www.banana.ch is needed to allow the Banana Excel Addin to access the web server. You can set it to '*' if you want to allow the access from other Addins too.

Since Banana 9.1.0

 

API

The latest version of BananaPlus support both versions V1 and V2. Previous versions of Banana Accounting support only the V1 version. The version V1 is no longer developed.

  • API Version V2
    This is the currently developed version. It is supported by BananaPlus.
  • API Version V1 (outdated)
    This is the legacy version, supported by Banana9 and BananaPlus. It is no longer developed.

Data formats

Date

Date values are in ISO 8601 format 'YYYY-MM-DD'.

Decimal

Decimal values have a '.' (dot) as decimal separator and doesn't have a group separator. For example: '12345.67'.
Decimal values are rounded according to the accounting settings.

Text

Text values can contain any character supported by UTF-8.

Time

Time values are in ISO 8601 format 'HH:MM:SS'. The formats 'HH:MM' and 'HH:MM:SS.ZZZ are also accepted.

help_id
webserverv1

Help ons de documentatie te verbeteren

We horen graag uw feedback over hoe we deze pagina kunnen verbeteren.

Vertel ons welk thema een betere uitleg nodig heeft of hoe we een onderwerp kunnen verduidelijken.

Share this article: Twitter | Facebook | LinkedIn | Email