Ledger export file
A ReconHub export rule with the export format Generic creates an export in the CSV format described in this document
The mapping to the specific fields is configured in the posting rules attached to the export rule.
Format
The CSV uses the semicolon as separator. Each line begins with a number that identifies the record type.
The following record types are supported:
Record type | Description |
---|---|
100 | Header row |
200 | Posting row |
999 | Footer row |
The structure of the CSV file is as follows:
- Header row (100)
- Posting row (200) - 0 to n repetitions
- ...
- Footer row (999)
Notes and constraints
- A semicolon (;) is used as field separator.
- Values containing a semicolon will be enclosed with double quotation marks (").
- The export file is UTF-8 encoded.
- The currency of a source account and target account must be identical.
- All fields of a record are required but are left empty if the field is defined as optional.
- Due to the automated processing of posting data, it is possible for the external program to generate postings outside the current fiscal year. It is recommended that when importing into the accounting software, a check is carried out which, in the event of an error, discards the respective entry and issues a corresponding warning.
Data types
Data type | Description | Example |
---|---|---|
numeric | Integer value [0-9] without prefix and separator. | 1234 |
amount | Numeric decimal number with possible sign. Decimal separator = decimal point (.), symbol for negative sign = minus (-), a negative sign is output left-justified, a number grouping is not used. The maximum length refers to the sum of the numeric characters including decimal point and sign. | -123.15 (with currency CHF) -123 (with currency JPY) |
string | Alphanumeric character string. If the character string itself contains the separator (semicolon), the entire string will be enclosed in double quotation marks ((see Constraints). | This is an example |
date | Date in format 'yyyyMMdd'. | 21090509 |
time | Time in format 'HHmmss'. | 164930 |
currency | 3-digit currency code according to ISO 4217 (see [ISO4217]). | CHF |
Field definitions
Legend
Abbreviation | Value | Description |
---|---|---|
C | Conditional | The value of the field is based on a condition. |
O | Optional | Field is optional and can be empty. |
M | Mandatory | Field is mandatory and must not be empty. |
100 Header row
Field | Name | Data type | Length | Mandatory | Description | Example |
---|---|---|---|---|---|---|
1 | Recordtype | numeric | 3 | M | Constant 100 | 100 |
2 | Version | string | 10 | M | Version of the ledger generic interface | 1.0 |
3 | ExportDate | date | 8 | M | Date of export creation | 20190430 |
4 | ExportTime | time | 6 | M | Time of export creation | 163258 |
200 Posting row
Field | Name | Data type | Length | Mandatory | Description | Example |
---|---|---|---|---|---|---|
1 | Recordtype | numeric | 3 | M | Constant 200 | 200 |
2 | BookingDate | date | 8 | M | Postingdate | 20190215 |
3 | DebitElement1 | string | 50 | O | Freely usable, e.g. account number | 10020015 |
4 | DebitElement2 | string | 50 | O | Freely usable, e.g. cost center | 10008 |
5 | DebitElement3 | string | 50 | O | Freely usable, e.g. business area | Food |
6 | DebitElement4 | string | 50 | O | Freely usable, e.g. branch | LU05 |
7 | DebitElement5 | string | 50 | O | Freely usable, e.g. document type | CSV |
8 | CreditElement1 | string | 50 | O | Freely usable, e.g. account number | 10020025 |
9 | CreditElement2 | string | 50 | O | Freely usable, e.g. cost center | 10008 |
10 | CreditElement3 | string | 50 | O | Freely usable, e.g. business area | Food |
11 | CreditElement4 | string | 50 | O | Freely usable, e.g. branch | LU05 |
12 | CreditElement5 | string | 50 | O | Freely usable, e.g. document type | CSV |
13 | Amount | amount | 50 | M | Postingamount | 20.70 |
14 | Currency | currency | 3 | M | Currency of the posting amount | EUR |
15 | BookingText | string | 500 | O | Postingtext | Credit VISA Berlin |
16 | VATFlag | numeric | 1 | M | Defines whether the booking contains a VAT code and, if so, on which side of the posting. Possible values: 0 = inactive 1 = debit * 2 = credit | 0 |
17 | VATCode | string | 50 | C | VAT code of the accounting department. This field will be ignored if VATFlag is set to 0 (inactive). | DE999999999 |
999 Footer row
Field | Name | Data type | Field | Mandatory | Description | Example |
---|---|---|---|---|---|---|
1 | Recordtype | numeric | 3 | M | Constant 999 | 999 |
2 | BookingCount | numeric | 10 | M | Number of postings in the file | 154 |
Example
Structure
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
100; | 1.0; | 20190509; | 175001 | |||||||||||||
200; | 20190410; | D1; | D2; | D3; | D4; | D5; | C1; | C2; | C3; | C4; | C5; | 2640; | CHF; | "Bookingtext example; For spec"; | 1; | DE999999999 |
200; | 20190411; | D1; | D2; | D3; | D4; | D5; | C1; | C2; | C3; | C4; | C5; | 5800; | CHF; | Bookingtext example; | 2; | DE999999999 |
200; | 20190413; | D1; | D2; | D3; | D4; | D5; | C1; | C2; | C3; | C4; | C5; | 5800; | CHF; | Bookingtext example; | 0; | |
... | ||||||||||||||||
999; | 30 |
Content
100;1.0;20190509;175001
200;20190410;D1;D2;D3;D4;D5;C1;C2;C3;C4;C5;2640;CHF;"Bookingtext example; For spec";0;
200;20190411;D1;D2;D3;D4;D5;C1;C2;C3;C4;C5;5800;CHF;Bookingtext example;0;DE999999999
...
999;31