Journal entries

Journal entry related endpoints are used to create and manage unbooked journal entries, all entries in Zenegy must be created as a journal entry and then booked before they can become a general ledger entry.

🚧

Important information before proceeding.

Integrators should make sure they have understood the general structure og entries in Zenegy Numbers.

Read more about the structures of entries

Required query parameters for journal entries.

  • tenantUid - Uid of a platform.
  • journalUid - Uid of a single journal.
  • entryUid - Uid of a single entry.

Get journal entries bases array.

Get journal entries base array

This endpoint can be used to return an array of base journal entry data within a specific journal, the array can be filtered using the following parameters:

  • Skip - Skip x records in the array.
  • Take - Take x amount of records in the returned array - Default amount is 100 records.
  • sequenceId - Filter entries by sequenceId - Will return only the entries with a sequenceId matching the value.

Create journal entry sequence.

Create journal entry sequence.

This endpoint can be used to create a new sequence with multiple entries. To learn about the meaning of "sequence" and "entries" read this guide about the structure of entires.

The payload for this request is structured like below:

  • Main object: The values of the properties in the main JSON object are shared values that will be added to all entries in the request.
  • entryLines array: The "entryLines" array is structured as an array of objects, each object in the array will be created as individual entries.
    The values of the properties in these objects are saved individually for each entry and is not shared between the rest of the entries.
Property description

The table below can be used to see the description of the base array properties

Required Property Description
:x: sequenceId Sequence id of entry seqence. Value will be defined using the journal number mask if omitted or null.
:white-check-mark: date Date of entry seqence.
:x: dueDate Due date of entries. No value if omitted or null.
:x: invoiceNumber Invoice number of entries. No value if omitted or null.
:x: externalId Custom external id of entries. No value if omitted or null.
:white-check-mark: currencyCode Currency of entries as ISO 4217 standard codes.
entryLines
:x: description Description of individual entry. No value if omitted or null.
:x: amountInBase Amount in base currency of individual entry. When "currencyCode" differs from base currency, value will be calculated using system exchange rate if omitted or null.
:white-check-mark: amount Amount for entry. Should always be uncalculated if "currencyCode" differs from the base currency.
:x:/:white-check-mark: financeAccountUid Unique ID of finance account required for non-main type enties. No value if omitted or null.
:x:/:white-check-mark: supplierUid Unique ID of supplier required for "SUPPLIER" type entry. No value if omitted or null.
:x:/:white-check-mark: customerUid Unique ID of customer required for "CUSTOMER" type entry. No value if omitted or null.
:x:/:white-check-mark: employeeUid Unique ID of employee required for "EMPLOYEE" type entry. No value if omitted or null.
:x: vatGroupUid Unique ID of VAT group connected to entry. No value if omitted or null.
:white-check-mark: type Journal entry type. Value should follow the type combination logic of sequences.

📘

Create entry types overview.

To get a detailed overview of the properties and requirements for creation of entries use this guide.

Entry type combinations

The "type" value of entries within the "entryLines" array must follow the combination rules of the platform.
The first entry in the array must have a "Main entry type" value.
The value of "type" for all subsequent entries should be an allowed combination "type" based on the "Main type entry".

Allowed type combinations in a sequence:

Main entry typeCombinations for main type
"SUPPLIER"."SUPPLIER_PAYMENT" and "EXPENSE".
"CUSTOMER"."CUSTOMER_PAYMENT" and "INVOICE".
"EMPLOYEE"."EMPLOYEE_FINANCE".
"FINANCE"."FINANCE".

Currency calculations

When submitting requests where the "currencyCode" differs from the base currency, the conversion calculation can be done automatically or manually.

  • Manual calculation: To manually control the conversion calculations the "amountInBase" property should be added to the request payload, the value of the property should be the calculated value of the "amount" property.
  • Automatic calculation: If the conversion should be calculated using the Zenegy exchange rates, the "amountInBase" property should be omitted from the request or the value of the property should be "null".

The value of "amount" should always be the un-calculated amount matching the "currencyCode" value.

📘

Decimal values.

When the payload of a request has decimal values the decimal separator should be a DOT(.) and not COMMA(,).


Delete journal entry.

🚧

Important information before proceeding.

Integrators using this endpoint should make sure that they understand the structure of entries in Zenegy Numbers, incorrect usage of this endpoint can result in errors in accounting data.

Read more about the structure of entries

Delete journal entry

This endpoint can be used to delete a journal entry, or multiple entries in a sequence if the request is made for a main entry in a sequence of entries.

See diagram below for explanation of the main entry/sub entry deletion flow in Zenegy Numbers.

The deletion flow of entry sequences in Zenegy Numbers.

The deletion flow of entry sequences in Zenegy Numbers.


📘

Logic information.

To learn more about journal entries in Zenegy use this Help article.


What’s Next

Click on a link below to go to another guide, or click on the last link below to go the API reference for this guide.