Rest API - export of account balances

Timeplan offers the possibility to export account balances per person and per day.

The purpose of this function is to export the information to a business intelligence-system that can compile data from different tools and in this way get a better overview to make better decisions. 

Attention! To make a manual call the administrator needs to be logged into Timeplan. 

Preparations
Before you will be able to make a call in Timeplan you will have to set the "External ID, other systems" for the account you want to get the information from. Go to Agreements - Accounts and choose the account you want:

When you've chosen the account there is a field called "External id, other accounts" where you put the ID that is going to be used in the call to choose what information to export:

You also need to add an External ID on the Department in Timeplan

To do this you go to Administration - Organisation - Department. Choose the department to add the ID in the field for "External number":


Call 
If you are logged into Timeplan you can call the API through the web browser. To do this you go to their URL, example below. The example company is to be changed to your companies URL. 

https://exempelföretag.timeplan.se/api/v1/accountbalanceexport/personcsv?fromDate=2020-08-01&untilDate=2020-08-31

To change the period (to/from date) in the export you just change the dates in the URL.
The result of this will be an csv-file that can be opened in Excel or import directly in other systems that support .csv. 

Automatic calls

For automatic calls an API-key is needed. Contact the support team at Timeplan if you want to access the API-key. Once you've gotten it you use is as a Bearer token in your calls for API. In other words - put the Authorization header to "Bearer <api-key>". An example for call with URL: 

curl -H "Authorization: Bearer <api-nyckel>" https://exempelföretag.timeplan.se/api/v1/accountbalanceexport/personcsv?fromDate=2020-08-01&untilDate=2020-08-31

 

Please feel free to contact the Support team if you have any questions about the confirguration or a quotation with the prices for this setup.