IKontist
This repository is not an official repository of the Kontist GmbH.
It connects to a currently undocumented REST API.
What does it do?
We provide
- a command line tool and
- a JavaScript API.
Currently it can fetch transactions, transfers, statements and can create and confirm new transfers.
Please note that this project is in a early stage and support is welcome.
How to use the CLI
Prerequisites
- node and npm installed
- Add your Kontist username and password either to ENVs called
KONTIST_USER
and KONTIST_PASSWORD
or a .env file (just rename .env-template
to .env
and replace the credentials).
Examples
node cli.js transaction list json
will return
[
{
"id": 1234,
"from": null,
"to": 1234,
"amount": 1234,
"type": null,
"meta": null,
"figo_id": null,
"checksum": "xxx",
"pending_from": null,
"user_id": 1234,
"date": "2017-08-02T00:00:00.000Z",
"category": "vat19",
"name": "Example GmbH",
"iban": "DE123456...",
"purpose": "RNr. ABC",
"solaris_id": "xxx",
"debitoor_invoice_id": null,
"debitoor_invoice_number": null,
"wirecard_last_attempt_date": null,
"wirecard_success_date": null,
"wirecard_unique_request_id": "xxx",
"e2e_id": "xxx",
...
"booking_date": "2017-08-02T00:00:00.000Z",
"valuta_date": "2017-08-02T00:00:00.000Z",
"booking_type": "SEPA_CREDIT_TRANSFER",
"source": "solaris",
"wirecard_processor_message_state": null,
"wirecard_processed_date": null,
"wirecard_booking_type": null,
"wirecard_booking_status": null,
"createdAt": "2017-08-02T06:20:35.178Z",
"updatedAt": "2017-08-02T06:31:52.486Z",
"deletedAt": null
},
...
]
node cli.js transaction list qif
will return
!Type:Bank
D8/2/2017
T8199
PExample GmbH
MRNr. ABC
^
D8/2/2017
T2142
PExample
Mdescription
^
So an easy way to create a qif export would be:
node cli.js transaction list qif > my-account.qif
To start a transfer you can use transfer init
and transfer confirm
:
node cli.js transfer init "John Doe" DE89370400440532013000 100 "test description"
node cli.js transfer confirm 720140159196d55d53d4af87e1c38f46ctrx 252899 "John Doe" DE89370400440532013000 100 "test description"
See more commands with
node cli.js --help
How to use the API
After instantiation of the class you need to login with your Kontist username and password, e.g.
const KontistClient = require("kontist-client");
const client = new KontistClient();
client.login(process.env.KONTIST_USER, process.env.KONTIST_PASSWORD).then(function() {
// do further calls to kontist here
})
Please have a look at the kontist-client.js
. Currently it provides methods for the following endpoints:
login(email, password)
getUser()
getAccounts()
getTransactions(accountId)
getTransfers(accountId)
initiateTransfer(accountId, recipient, iban, amount, note)
confirmTransfer(accountId, transferId, authorizationToken, recipient, iban, amount, note)
getStatement(accountId, year, month)