blog

/journals in the REST API

July 18, 2017

Journals are probably one of the most critical endpoints for all consumers using our application.

For those unfamiliar with the accounting jargon – journals (known in danish as kassekladder) contain draft transactions (entries), that represents transaction in your accounting.

/journals-experimental

Currently journals are exposed as experimental, which means that endpoint signature might be changed as we go along. We do not expect heavy changes (if any), due to the fact that the endpoint has been already tested by the selected partners, who confirmed it’s stability.

As of now, we recommend using this endpoint in sandbox environment only, away from the production agreements – until it gets to the stable state. Remaining text will be referencing to the official endpoint name – /journals, however during the experimental phase – /journals-experimental is enforced.

Journals

Calling GET method on /journals provides you with an overview for the journals that are created on the accounting agreement, among with some of the important settings such as minimum and maximum voucher number allowed for the given journal. Besides that we provide convenience links to vouchers collection (entries as assigned by the voucher number), entries (entries in the journal, sorted by entry type they belong to) – this gives different perspectives on the data, and you can decide on which view is more suitable for your needs.

Entry types

Currently in e-conomic web application we support 5 types of entries:

Journal entry

Supplier invoice

Supplier payment

Manual customer invoice

Customer payment

And now they can all be created using REST API by calling POST on /journals/:journalNumber/vouchers. Furthermore – we also support bulk creation of different types in one call, to make it as robust as possible.

Attachments on vouchers

We now also support attachments on vouchers – functionality that was heavily used by many of our consumers in SOAP (using CashBook_RegisterPdfVoucher method) is now present in REST API with even more functionality added to it.

Besides supporting .pdf we now also support .jpg, .jpeg, .gif and .png formats, which allows for more flexibility. We have also introduced PATCH method, that enables for adding more pages to the already attached document. This eliminates the need to process the document on your own end, in order to be able to add more pages to it.

You do not need any special approval for being able to use /journals-experimental looking at your error It seems that your e-conomic user has different role than the app that you are requesting (they need to match), so that if your user has bookkeeping and your app has bookkeeping and sales, that would fail. Feel free to reach out to our support at api@e-conomic.com we will be able to guide you, if needed.